Socket
Book a DemoInstallSign in
Socket

mongodocs-mcp

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodocs-mcp

MongoDB Documentation MCP Server - Access MongoDB's official documentation, tutorials, and API references through Model Context Protocol

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
33
-85.2%
Maintainers
1
Weekly downloads
 
Created
Source

MongoDB Docs MCP - MongoDB Documentation Model Context Protocol Server

npm version License: MIT

MongoDB Documentation MCP Server - Access MongoDB's official documentation, tutorials, and API references through Model Context Protocol. Get instant access to MongoDB Manual, Atlas, Compass, Drivers, and Tools documentation with AI-powered natural language queries directly in Claude, Cursor, or any MCP-compatible AI assistant.

✨ Features

  • 🔍 Smart Topic Resolution: Intelligent search across MongoDB documentation with fuzzy matching
  • 📚 Complete Documentation Access: Full access to MongoDB Manual, Atlas, Compass, Drivers, and Tools
  • 🚀 Bulk Operations: Process up to 5 documentation queries in parallel for maximum efficiency
  • 💻 Multi-Language Support: Driver documentation for JavaScript, Python, Java, C#, Go, PHP, Ruby, and more
  • 📊 Code Examples: Extract and format code examples from documentation pages
  • 🔗 Related Topics: Discover related MongoDB concepts and cross-references
  • High Performance: Intelligent caching with 1-hour TTL and content minification
  • 🎯 Version-Aware: Support for different MongoDB versions (4.4, 5.0, 6.0, 7.0, 8.0)
  • 🌐 Comprehensive Coverage: Atlas, Manual, Compass, Drivers, Tools, and Guides documentation

🚀 Quick Start

Add this to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\\Claude\\claude_desktop_config.json

{
  "mcpServers": {
    "mongodocs": {
      "command": "npx",
      "args": ["-y", "mongodocs-mcp"]
    }
  }
}

Cursor

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "mongodocs": {
      "command": "npx",
      "args": ["-y", "mongodocs-mcp"]
    }
  }
}

Other MCP Clients

The server works with any MCP-compatible client. Use the command:

npx mongodocs-mcp

🛠️ Available Tools

1. resolve-mongodb-topic

Smart topic resolution with MongoDB-specific intelligence

Resolves natural language queries to specific MongoDB documentation paths.

Example queries:

  • "aggregation pipeline"
  • "atlas setup"
  • "node driver authentication"
  • "replica sets"
  • "indexing performance"

Parameters:

  • topic (required): MongoDB topic or concept to search for
  • product (optional): Specific MongoDB product (manual, atlas, compass, drivers, tools, guides)
  • version (optional): MongoDB version (4.4, 5.0, 6.0, 7.0, 8.0, latest)
  • language (optional): Programming language for driver docs

2. get-mongodb-docs

Bulk documentation fetcher with parallel processing

Fetches complete MongoDB documentation content with support for up to 5 parallel queries.

Parameters:

  • queries (required): Array of 1-5 documentation queries
    • topic (required): MongoDB topic or direct URL
    • product (optional): MongoDB product
    • version (optional): MongoDB version
    • language (optional): Programming language
    • includeExamples (optional): Include code examples (default: true)
    • maxTokens (optional): Maximum tokens to return (default: 10000)

3. mongodb-cache-stats

Cache performance and statistics

View cache performance metrics and memory usage.

📖 Usage Examples

// Find aggregation documentation
resolve-mongodb-topic({
  "topic": "aggregation pipeline",
  "product": "manual"
})

Bulk Documentation Fetch

// Get multiple related topics at once
get-mongodb-docs({
  "queries": [
    {
      "topic": "aggregation",
      "product": "manual",
      "includeExamples": true
    },
    {
      "topic": "aggregation",
      "product": "drivers",
      "language": "javascript"
    },
    {
      "topic": "aggregation-pipeline-builder",
      "product": "compass"
    }
  ]
})

Driver-Specific Documentation

// Get Node.js driver documentation
resolve-mongodb-topic({
  "topic": "connection",
  "product": "drivers",
  "language": "javascript"
})

🎯 Supported MongoDB Products

  • Manual - Core MongoDB database documentation
  • Atlas - MongoDB Atlas cloud platform
  • Compass - MongoDB GUI application
  • Drivers - Official MongoDB drivers for all languages
  • Tools - MongoDB tools and connectors
  • Guides - MongoDB tutorials and guides

🔧 Supported Programming Languages

  • JavaScript/Node.js
  • Python
  • Java
  • C#/.NET
  • Go
  • PHP
  • Ruby
  • Rust
  • Scala
  • Swift
  • Kotlin

📊 Performance Features

  • Intelligent Caching: 1-hour TTL with 1000 key limit
  • Content Minification: Optimized for token efficiency
  • Bulk Operations: Up to 5 parallel queries
  • Smart Fallbacks: Automatic error recovery and suggestions
  • Rate Limit Handling: Graceful handling of API limits

🛡️ Error Handling

The server provides comprehensive error handling with:

  • Detailed error messages and suggestions
  • Automatic fallback strategies
  • Rate limit detection and recovery
  • Network error handling
  • Invalid input validation

🚀 Development

Local Installation

git clone https://github.com/romiluz13/mongodocs-mcp.git
cd mongodocs-mcp
npm install
npm run build
npm start

Testing

npm test
npm run test:coverage

Building

npm run build

📄 License

MIT License - see LICENSE for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🐛 Issues

Found a bug or have a feature request? Please open an issue on GitHub.

Made with ❤️ for the MongoDB and AI community

Keywords

mcp

FAQs

Package last updated on 30 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts