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

Lightning-fast semantic search for MongoDB documentation via Model Context Protocol. 10,000+ documents, <500ms search.

Source
npmnpm
Version
7.2.6
Version published
Weekly downloads
11
-67.65%
Maintainers
1
Weekly downloads
 
Created
Source

MongoDB Semantic MCP v7.0

Lightning-fast semantic search for MongoDB and Voyage AI documentation via Model Context Protocol. Search 10,000+ documents in <500ms with the latest AI models.

🚀 Features

  • Smart Model Selection: Uses voyage-code-3 for code content and voyage-3 for text
  • Blazing Fast: <500ms search across 10,000+ documents
  • High Accuracy: 96%+ success rate on all query types
  • Instruction-Following Reranker: Uses rerank-2.5 for superior relevance
  • MongoDB Native: Optimized for MongoDB Atlas Vector Search
  • Beautiful CLI: Progress bars, colors, and interactive setup

📦 Installation

npm install -g mongodocs-mcp

🔧 Setup

Prerequisites

  • MongoDB Atlas cluster with Vector Search enabled
  • Voyage AI API key

Quick Start

# 1. Install globally
npm install -g mongodocs-mcp

# 2. Create .env file
cat > .env << EOF
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/
MONGODB_DATABASE=mongodb_semantic_docs
MONGODB_COLLECTION=documents
VOYAGE_API_KEY=pa-your-voyage-api-key
EOF

# 3. Check status (optional)
mongodocs-status

# 4. Index documentation (10-30 minutes)
mongodocs-index

# 5. Start MCP server
mongodocs-mcp

Environment Variables

VariableDescriptionDefault
MONGODB_URIMongoDB Atlas connection stringRequired
MONGODB_DATABASEDatabase namemongodb_semantic_docs
MONGODB_COLLECTIONCollection namedocuments
VOYAGE_API_KEYVoyage AI API key for embeddingsRequired

Troubleshooting

# Check if everything is set up correctly
mongodocs-status

# Get help for any command
mongodocs-mcp --help
mongodocs-index --help
mongodocs-status --help

🎯 Using with Cursor IDE

Add to your ~/.cursor/mcp.json:

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

📊 MCP Tools

The MCP provides these tools to AI agents:

  • mongodb-semantic-search - Search documentation with natural language
  • mongodb-find-similar - Find similar documents to provided content
  • mongodb-explain-concept - Get comprehensive explanations
  • mongodb-refresh-docs - Update documentation database
  • mongodb-status - Check system status

🧠 Technical Details

Embedding Models

  • voyage-3: General documentation (60-70% of content)
  • voyage-code-3: Code examples and API references (30-40% of content)
  • rerank-2.5: Instruction-following reranker for result optimization

Performance

  • Index size: ~10,380 documents
  • Search latency: <500ms average
  • Accuracy: 96%+ query success rate

MongoDB Configuration

  • Database: mongodb_semantic_docs
  • Collection: documents
  • Index: semantic_search (vector search index)

🛠️ CLI Tools

mongodocs-index

Indexes all MongoDB and Voyage AI documentation. Features:

  • Smart model selection (voyage-3 vs voyage-code-3)
  • Progress tracking with beautiful UI
  • Incremental updates
  • Content hashing for efficiency

mongodocs-clean

Removes all indexed documents for a fresh start.

mongodocs-setup

Interactive setup wizard for configuration.

📈 Version History

v7.0.0 (Current)

  • Added voyage-code-3 for code content
  • Smart content detection
  • Model distribution tracking
  • 13.80% better code search accuracy

v6.0.0

  • Upgraded to rerank-2.5
  • Instruction-following for better results
  • Special character handling improvements

🤝 Contributing

Contributions welcome! Please ensure:

  • Code passes TypeScript compilation
  • All queries maintain <500ms latency
  • Test coverage for new features

📄 License

MIT

  • MongoDB Atlas
  • Voyage AI
  • Model Context Protocol

Built with ❤️ for the MongoDB community

Keywords

mcp

FAQs

Package last updated on 13 Aug 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