Introduction to Grounded Docs MCP Server
Grounded Docs MCP Server solves a critical problem in AI-assisted development: hallucinations and outdated knowledge. When your AI assistant suggests code or answers questions, it often relies on training data that may be months or years old. This leads to deprecated APIs, incorrect syntax, and wasted debugging time. Grounded Docs provides your AI with a personal, always-current documentation index that fetches official docs directly from websites, GitHub repositories, npm packages, PyPI, and local files. Your AI queries the exact version you’re using, grounded in real documentation.Why Use Grounded Docs?
Eliminate Hallucinations
Ground your AI in real documentation instead of relying on potentially outdated training data
Version-Specific Accuracy
Query documentation for the exact library versions in your project, not generic answers
Privacy First
Runs entirely on your machine - your code and queries never leave your network
Universal Compatibility
Works with any MCP-compatible client: Claude, Cursor, Cline, VS Code extensions, and more
Key Features
Multiple Documentation Sources
Index documentation from any source:- Websites: Official documentation sites (React, Next.js, etc.)
- GitHub Repositories: README files, wikis, and markdown docs
- Package Registries: npm and PyPI packages with automatic version detection
- Local Files: Your team’s internal documentation, project READMEs, and custom guides
- Zip Archives: Compressed documentation bundles
Rich File Format Support
The server processes and indexes multiple file types:- Web formats: HTML, Markdown
- Documents: PDF, Word (.docx), Excel, PowerPoint
- Code: JavaScript, TypeScript, Python, and other source files
- Archives: ZIP files with automatic extraction
Intelligent Search
Semantic search is optional but dramatically improves result quality by understanding the meaning of your queries, not just matching keywords.
- Keyword search: Fast, no configuration required (default)
- Semantic vector search: Understand meaning and context using embeddings from OpenAI, Ollama, Google Gemini, Azure, or AWS Bedrock
- Hybrid search: Combine both approaches using Reciprocal Rank Fusion for best results
Flexible Deployment
Run the server in multiple configurations:- Standalone Server
- Embedded Mode
- Docker
- Distributed (Docker Compose)
Single process with web interface and MCP endpoints. Perfect for most users.Access the web UI at
http://localhost:6280How It Works
Automatic Processing
The server fetches content, chunks it intelligently, and generates embeddings (if configured)
Use Cases
Framework Documentation
Keep your AI up-to-date with the latest framework APIs:Internal Documentation
Index your team’s private documentation:Package-Specific Help
Get help with specific library versions:Local Project Documentation
Index your project’s README and guides:Open Source Alternative
Grounded Docs is the open-source alternative to commercial documentation tools:- Context7: Proprietary, cloud-based
- Nia: Closed source
- Ref.Tools: Limited to web documentation
- Full control over your data
- No vendor lock-in
- Extensible architecture
- Active community development
Architecture Highlights
For a deep dive into the system architecture, see the Architecture documentation.
- Fetcher retrieves content from various sources
- Middleware transforms HTML/Markdown/PDF to plain text
- Semantic splitters chunk content by structure (headers, code blocks)
- Greedy optimizer adjusts chunk sizes for embedding quality
- Embeddings are generated (optional) and stored in SQLite
- Vector similarity search using sqlite-vec
- Full-text search using SQLite FTS5
- Reciprocal Rank Fusion combines results
- Configurable ranking weights
- Real-time progress updates via EventBus
- WebSocket subscriptions for distributed mode
- Job state persistence for recovery
Next Steps
Quick Start
Get up and running in 5 minutes
Installation Guide
Detailed setup instructions for all deployment modes
Connecting Clients
Configure Claude, Cursor, VS Code, and other AI assistants
Embedding Models
Enable semantic search with OpenAI, Ollama, or other providers
