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

Advanced hybrid semantic search for MongoDB and Voyage AI documentation with 10,000+ documents, vector + keyword search, and intelligent query expansion

Source
npmnpm
Version
4.0.0
Version published
Weekly downloads
34
-83.73%
Maintainers
1
Weekly downloads
 
Created
Source

MongoDocs MCP

Semantic search for MongoDB and Voyage AI documentation using Voyage Context-3 embeddings and MongoDB Atlas Vector Search.

🚀 Features

  • Voyage Context-3 Embeddings: State-of-the-art contextualized embeddings that understand document structure
  • MongoDB Atlas Vector Search: Native vector search with $vectorSearch aggregation
  • MongoDB + Voyage AI Docs: Search both MongoDB and Voyage AI documentation (since MongoDB acquired Voyage)
  • Smart Query Expansion: Automatically expands MongoDB and Voyage AI terms for better recall
  • Incremental Updates: Keep documentation current with efficient refresh mechanism
  • Simple Setup: Interactive wizard guides you through configuration

📦 Installation

npm install -g mongodocs-mcp

🔧 Setup

Prerequisites

  • MongoDB Atlas Cluster (M10 or higher for vector search)
  • Voyage AI API Key (get it at voyageai.com)

Quick Start

  • Run the setup wizard:
npx mongodocs-mcp setup
  • Add to your MCP configuration (.mcp.json or Claude settings):
{
  "mcpServers": {
    "mongodocs": {
      "command": "npx",
      "args": ["mongodocs-mcp"]
    }
  }
}

🛠️ Available Tools

Search MongoDB documentation using natural language:

Query: "how to create indexes"
Returns: Relevant documentation about indexing, performance optimization, index types

mongodb-find-similar

Find documentation similar to provided content:

Content: "db.collection.aggregate([...])"
Returns: Related aggregation documentation

mongodb-explain-concept

Get comprehensive explanations at different depth levels:

Concept: "sharding"
Depth: "intermediate"
Returns: Detailed explanation of MongoDB sharding

mongodb-refresh-docs

Update documentation database:

Mode: "incremental" | "full"

mongodb-status

Check system status and statistics.

🏗️ Architecture

MongoDB Docs (GitHub) + Voyage AI Docs (GitHub)
                    ↓
            Document Fetchers
                    ↓
        Smart Chunker (512 tokens, no overlap)
                    ↓
    Voyage Context-3 (contextualized embeddings)
                    ↓
        MongoDB Atlas Vector Search
                    ↓
                MCP Tools

🔑 Key Innovations

  • Contextualized Embeddings: Each chunk understands its place in the full document
  • Unified Search: Search across MongoDB and Voyage AI docs seamlessly (MongoDB acquired Voyage)
  • Query Expansion: Search for "index" also searches "indexes", "indexing", "createIndex"
  • Zero Overlap Chunking: More efficient than traditional overlapping chunks
  • Cloud-Native: Everything runs in MongoDB Atlas, no local storage needed

📊 Performance

  • Search Latency: 50-200ms
  • Embedding Quality: 1024-dimensional vectors
  • Storage: ~500MB for complete MongoDB documentation
  • Free Tier: First 200M Voyage tokens free

🔄 Updating Documentation

To refresh documentation:

# Incremental update (only changed files)
npx mongodocs-mcp refresh

# Full refresh (all documentation)
npx mongodocs-mcp refresh --full

🧪 Testing

Test your installation:

npx mongodocs-mcp test

📝 Environment Variables

Create a .env file with:

MONGODB_URI=mongodb+srv://...
VOYAGE_API_KEY=pa-...
MONGODB_DATABASE=mongodocs
INCLUDE_VOYAGE_DOCS=true  # Include Voyage AI documentation
GITHUB_TOKEN=ghp_...      # Optional: Avoid rate limits

🤝 Contributing

Contributions welcome! This project uses:

  • TypeScript
  • MongoDB Atlas Vector Search
  • Voyage AI Context-3 embeddings
  • Model Context Protocol (MCP)

📄 License

MIT

🙏 Acknowledgments

Built with:

Made with ❤️ for the MongoDB and AI community

Keywords

mcp

FAQs

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