what is Brain Server?
Brain Server is a powerful MCP (Model Context Protocol) server designed for managing knowledge embeddings and performing vector searches.
how to use Brain Server?
To use Brain Server, clone the repository, install the dependencies, configure the environment variables, and start the server in either development or production mode.
key features of Brain Server?
- High-quality vector embeddings for knowledge content
- Semantic search capabilities to find knowledge based on meaning
- Compliance with Model Context Protocol for AI integration
- Organization of knowledge into domain-specific brains
- Context-aware retrieval for enhanced understanding
- Real-time progress tracking of long-running operations
use cases of Brain Server?
- Managing and retrieving knowledge in AI applications
- Enhancing search functionalities in knowledge management systems
- Organizing domain-specific knowledge for better accessibility
FAQ from Brain Server?
- What is MCP?
MCP stands for Model Context Protocol, which is a framework for integrating AI models with knowledge management systems.
- How do I install Brain Server?
You can install Brain Server by cloning the repository and following the installation instructions provided in the documentation.
- Can I contribute to Brain Server?
Yes! Contributions are welcome, and you can submit a Pull Request.
Brain Server - MCP Knowledge Embedding Service
A powerful MCP (Model Context Protocol) server for managing knowledge embeddings and vector search.
Features
- Vector Embeddings: Generate high-quality embeddings for knowledge content
- Semantic Search: Find knowledge based on meaning, not just keywords
- MCP Compliance: Follows Model Context Protocol for AI integration
- Brain Management: Organize knowledge into domain-specific brains
- Context-Aware Retrieval: Includes surrounding context for better understanding
- Progress Tracking: Real-time monitoring of long-running operations
Installation
# Clone the repository
git clone https://github.com/your-username/brain-server.git
cd brain-server
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Build the project
npm run build
Configuration
Configure the server using environment variables in the .env
file:
# Server Configuration
PORT=3000
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017
# Model Configuration
EMBEDDING_MODEL=Xenova/all-MiniLM-L6-v2
MAX_CHUNK_SIZE=1024
Usage
Starting the Server
# Development mode
npm run dev
# Production mode
npm start
MCP Tool Usage
The server exposes the following MCP tools:
addKnowledge
: Add new knowledge to the vector databasesearchSimilar
: Find semantically similar contentupdateKnowledge
: Update existing knowledge entriesdeleteKnowledge
: Remove knowledge entriesbatchAddKnowledge
: Add multiple knowledge entries in a batchgetEmbedding
: Generate embeddings for text content
Development
Project Structure
src/
├── config/ # Configuration settings
├── controllers/ # Route controllers
├── errors/ # Error definitions
├── middleware/ # Express middleware
├── models/ # Data models and types
├── services/ # Business logic
│ ├── embeddings/ # Embedding providers
│ ├── ingestion/ # Knowledge ingestion
│ ├── processing/ # Knowledge processing
│ └── storage/ # Storage services
├── tools/ # MCP tool definitions
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
├── server.ts # MCP server setup
└── index.ts # Application entry point
Available Scripts
npm run build
: Build the TypeScript projectnpm start
: Run the built applicationnpm run dev
: Run in development mode with hot reloadingnpm test
: Run testsnpm run lint
: Run linter
License
This project is licensed under the ISC License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
