JSPM

  • Created
  • Published
  • Downloads 75
  • Score
    100M100P100Q69617F
  • License MIT

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

Package Exports

  • mongodocs-mcp
  • mongodocs-mcp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mongodocs-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MongoDB Semantic Docs MCP

Version Downloads License Node

The FASTEST MongoDB documentation search, powered by AI

10,380+ documents • <500ms search • Perfect Cursor IDE integration

🚀 Features

  • ⚡ Lightning Fast: Search 10,000+ documents in under 500ms
  • 🎯 Semantic Search: Natural language queries with Voyage AI embeddings
  • 📚 Complete Coverage: ALL MongoDB products, drivers, and tools
  • 🔌 MCP Integration: Perfect for Cursor IDE and AI assistants
  • 🎨 Beautiful CLI: Stunning progress bars and real-time indexing

📦 What's Indexed

  • MongoDB Manual (6,075 docs) - Core database documentation
  • All Language Drivers - Node.js, Python, Java, C#, Go, Rust, Ruby, PHP
  • MongoDB Atlas - Cloud platform documentation
  • MongoDB Compass - GUI documentation
  • MongoDB Shell - Command-line interface
  • Realm SDK (2,018 docs) - Mobile database
  • Voyage AI - Embedding model documentation
  • 21 Products Total - Everything MongoDB!

🎯 Quick Start

For Cursor IDE Users (8 minutes total!)

  1. Install globally (30 seconds):
npm install -g mongodocs-mcp
  1. Run setup wizard (2 minutes):
mongodocs-setup

Our beautiful interactive wizard will:

  • Help you get MongoDB Atlas credentials
  • Help you get Voyage AI API key
  • Test your connections
  • Auto-configure Cursor IDE for you!
  1. Index documents (5 minutes):
mongodocs-index

Watch the gorgeous progress bars as 10,000+ documents are indexed!

  1. Use in Cursor:
  • "Search MongoDB documentation for aggregation pipeline"
  • "Find examples of vector search in MongoDB"
  • "Explain MongoDB transactions"

For Developers

  1. Clone and setup:
git clone https://github.com/romiluz/mongodocs-mcp.git
cd mongodocs-mcp
npm install
  1. Configure environment (.env):
MONGODB_URI=mongodb+srv://your-cluster.mongodb.net/
VOYAGE_API_KEY=your-voyage-api-key
  1. Index documents (one-time, ~5 minutes):
npm run index
  1. Start MCP server:
npm start

🏗️ Architecture

┌─────────────────────────────────────────┐
│         MCP SERVER (Fast Ops)           │
│   • Semantic Search (<500ms)            │
│   • Find Similar Documents              │
│   • Explain Concepts                    │
│   • Status Checks                       │
└─────────────────────────────────────────┘
                    +
┌─────────────────────────────────────────┐
│      CLI TOOLS (Setup & Indexing)       │
│   • Index 10,000+ documents             │
│   • Beautiful progress tracking         │
│   • Database management                 │
│   • State persistence                   │
└─────────────────────────────────────────┘

🛠️ CLI Commands

mongodocs-setup ✨ NEW!

Beautiful interactive setup wizard:

mongodocs-setup
  • Interactive credential collection
  • Browser integration for getting keys
  • Connection testing
  • Auto-configures Cursor IDE
  • Saves configuration globally

mongodocs-index

Index all MongoDB documentation (10,000+ documents):

mongodocs-index
  • Shows beautiful progress bars
  • Takes ~5 minutes
  • Saves state for resume
  • Skips unchanged files

mongodocs-clean

Reset database for fresh start:

mongodocs-clean

mongodocs-mcp

Start the MCP server:

mongodocs-mcp

📊 MCP Tools Available

Natural language search across all documentation:

{
  query: "How to create indexes in MongoDB",
  limit: 5,
  products: ["manual", "drivers-nodejs"],
  includeCode: true
}

mongodb-find-similar

Find documents similar to provided content:

{
  content: "Your code or text here",
  limit: 5
}

mongodb-explain-concept

Get detailed explanations of MongoDB concepts:

{
  concept: "aggregation pipeline",
  depth: "intermediate" // beginner, intermediate, advanced
}

🔧 Configuration

Environment Variables

# Required
MONGODB_URI=mongodb+srv://...     # Your MongoDB Atlas cluster
VOYAGE_API_KEY=pa-...             # Voyage AI API key

# Optional
LOG_LEVEL=info                    # Logging verbosity
MAX_SEARCH_RESULTS=10             # Default result limit

MongoDB Atlas Setup

  1. Create a free cluster at mongodb.com
  2. Create database: mongodb_semantic_docs
  3. Create collection: documents
  4. The vector index is created automatically

Voyage AI Setup

  1. Get API key from voyageai.com
  2. Free tier includes 50M tokens/month
  3. Uses voyage-3 model (1024 dimensions)

📈 Performance

  • Search Speed: <500ms for vector search
  • Indexing Speed: ~2,000 docs/minute
  • Database Size: ~2GB for 10,000+ documents
  • Memory Usage: <500MB during search
  • Embedding Model: Voyage-3 (state-of-the-art)

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Lint code
npm run lint

📝 Changelog

v5.0.0 (2024-01-12)

  • 🎯 New architecture: Separated MCP server from CLI tools
  • ⚡ 10x faster indexing (5 minutes vs 45-90)
  • 📚 10,380+ documents indexed
  • 🎨 Beautiful CLI with progress bars
  • 🔧 State management for resume

v4.4.0

  • Fixed NaN scores in vector search
  • Added Voyage AI reranking

📄 License

MIT © Rom Iluz

🙏 Acknowledgments

  • MongoDB for comprehensive documentation
  • Voyage AI for amazing embeddings
  • Cursor IDE team for MCP protocol
  • Open source community

Built with ❤️ for the MongoDB community

Making MongoDB documentation instantly searchable