JSPM

  • Created
  • Published
  • Downloads 71
  • Score
    100M100P100Q69637F
  • License MIT

Semantic search for MongoDB and Voyage AI documentation using contextualized embeddings and MongoDB Atlas Vector 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

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

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

Quick Start

  1. Run the setup wizard:
npx mongodocs-mcp setup
  1. 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

  1. Contextualized Embeddings: Each chunk understands its place in the full document
  2. Unified Search: Search across MongoDB and Voyage AI docs seamlessly (MongoDB acquired Voyage)
  3. Query Expansion: Search for "index" also searches "indexes", "indexing", "createIndex"
  4. Zero Overlap Chunking: More efficient than traditional overlapping chunks
  5. 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