Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default | 
|---|---|---|---|
| MCP_MONGODB_URI | Yes | MongoDB Connection URL | |
| MCP_MONGODB_READONLY | No | MongoDB Connection Read-Only mode. If read-only set to 'true'. | 
Schema
Prompts
Interactive templates invoked by user choice
| Name | Description | 
|---|---|
| analyze_collection | Analyze a MongoDB collection structure and contents | 
Resources
Contextual data attached and managed by the client
| Name | Description | 
|---|---|
| No resources | |
Tools
Functions exposed to the LLM to take actions
| Name | Description | 
|---|---|
| query | Execute a MongoDB query with optional execution plan analysis | 
| aggregate | Execute a MongoDB aggregation pipeline with optional execution plan analysis | 
| update | Update documents in a MongoDB collection | 
| serverInfo | Get MongoDB server information including version, storage engine, and other details | 
| insert | Insert one or more documents into a MongoDB collection | 
| createIndex | Create one or more indexes on a MongoDB collection | 
| count | Count documents in a collection matching a query | 
| listCollections | List all collections in the MongoDB database |