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
$vectorSearchaggregation - 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.jsonor Claude settings):
{
"mcpServers": {
"mongodocs": {
"command": "npx",
"args": ["mongodocs-mcp"]
}
}
}๐ ๏ธ Available Tools
mongodb-semantic-search
Search MongoDB documentation using natural language:
Query: "how to create indexes"
Returns: Relevant documentation about indexing, performance optimization, index typesmongodb-find-similar
Find documentation similar to provided content:
Content: "db.collection.aggregate([...])"
Returns: Related aggregation documentationmongodb-explain-concept
Get comprehensive explanations at different depth levels:
Concept: "sharding"
Depth: "intermediate"
Returns: Detailed explanation of MongoDB shardingmongodb-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:
- Voyage AI - Context-3 embeddings
- MongoDB Atlas - Vector Search
- Model Context Protocol - MCP framework
Made with โค๏ธ for the MongoDB and AI community