About MongoDB Model Context Protocol Server
MongoDB Model Context Protocol Server uses MongoDB to persist models, contexts, protocols, and data, with a gRPC API. It is for developers managing these objects and using the documented Cursor integration.
Key features
- 01Create, list, update, and delete models
- 02Manage contexts with multiple models
- 03Execute protocols and track status
- 04Persist and retrieve data
- 05Provide a gRPC API
- 06Integrate with Cursor
Use cases
- 01Manage model configurations
- 02Organize multi-model task contexts
- 03Run protocols and check status
- 04Access data through the API
MCP support
This MCP server exposes model, context, protocol execution, and data operations through a gRPC API. The README also describes Cursor integration.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMongoDB Model Context Protocol Server
A powerful server implementation for managing models, contexts, and protocols with MongoDB integration and Cursor support.
Features
- Model management (create, list, update, delete)
- Context management with multiple model support
- Protocol execution and status tracking
- Data storage and retrieval
- Cursor integration for enhanced code completion and analysis
- gRPC API for all operations
- MongoDB backend for persistent storage
Requirements
- Go 1.16 or higher
- MongoDB 4.4 or higher
- Cursor IDE (for full integration features)
Installation
- Clone the repository:
git clone https://github.com/yourusername/mongo-mcp-server.git
cd mongo-mcp-server
- Install dependencies:
go mod download
- Start MongoDB:
mongod --dbpath /path/to/data/directory
- Build and run the server:
go build -o mcp-server cmd/server/main.go
./mcp-server
Cursor Integration
The server includes built-in support for Cursor IDE integration. To enable Cursor features:
- Install the Cursor IDE from cursor.sh
- The server will automatically detect and integrate with Cursor when it's running
- Use the
/mcpprefix in Cursor to access MCP features:/mcp model- Manage models/mcp context- Manage contexts/mcp execute- Execute protocols/mcp status- Check protocol status/mcp data- Manage data
API Usage
Models
Create a new model:
grpcurl -plaintext -d '{
"name": "gpt-4",
"type": "llm",
"description": "OpenAI GPT-4 model",
"parameters": {
"temperature": 0.7,
"max_tokens": 2048
}
}' localhost:50051 proto.MCPService/CreateModel
Contexts
Create a new context:
grpcurl -plaintext -d '{
"name": "code-review",
"description": "Code review context",
"model_ids": ["model_id_1", "model_id_2"],
"metadata": {
"language": "go",
"framework": "grpc"
}
}' localhost:50051 proto.MCPService/CreateContext
Protocols
Execute a protocol:
grpcurl -plaintext -d '{
"protocol_id": "protocol_id_1",
"context_id": "context_id_1",
"parameters": {
"input": "Review this code",
"style": "detailed"
}
}' localhost:50051 proto.MCPService/ExecuteProtocol
Check protocol status:
grpcurl -plaintext -d '{
"execution_id": "execution_id_1"
}' localhost:50051 proto.MCPService/GetProtocolStatus
Data
Add data:
grpcurl -plaintext -d '{
"type": "code",
"content": "package main\n\nfunc main() {\n println(\"Hello, World!\")\n}",
"metadata": {
"language": "go",
"author": "John Doe"
}
}' localhost:50051 proto.MCPService/AddData
Get data:
grpcurl -plaintext -d '{
"id": "data_id_1"
}' localhost:50051 proto.MCPService/GetData
List data:
grpcurl -plaintext -d '{
"type": "code",
"page_size": 10,
"page_token": ""
}' localhost:50051 proto.MCPService/ListData
Delete data:
grpcurl -plaintext -d '{
"id": "data_id_1"
}' localhost:50051 proto.MCPService/DeleteData
Security
- All API endpoints require authentication
- MongoDB connection uses secure defaults
- gRPC communication is encrypted
- Cursor integration uses secure channels
License
MIT License - see LICENSE file for details
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.