Local documentation search for AI assistants, from Git repos and local directories
An MCP server that gives AI assistants access to locally indexed documentation. It indexes GitHub repositories (via sparse checkout) and local directories into a SQLite database with FTS5 full-text search. Token budgeting keeps results within AI context window limits.
Add to your MCP client:
Claude Code (~/.claude.json), Cursor (Settings > MCP), Cline (VS Code settings):
{
"mcpServers": {
"local-docs": {
"command": "npx",
"args": ["-y", "local-docs-mcp@latest", "stdio"]
}
}
}VS Code Copilot (.vscode/mcp.json):
{
"servers": {
"local-docs": {
"command": "npx",
"args": ["-y", "local-docs-mcp@latest", "stdio"]
}
}
}Go install:
go install github.com/mylocalgpt/local-docs-mcp/cmd/local-docs-mcp@latest
Then use local-docs-mcp as the command in your MCP config instead of npx.
Binary download: grab the latest release from GitHub Releases and point your MCP config at the binary path:
{
"mcpServers": {
"local-docs": {
"command": "/usr/local/bin/local-docs-mcp",
"args": ["stdio"]
}
}
}For full CLI usage, see CLI reference.
The AI assistant discovers and indexes documentation on the fly. For example:
- You ask: "How does Entra Connect hybrid identity sync work?"
- AI calls
list_repos- no relevant docs found - AI researches the GitHub repo and calls
add_docswith:url:"https://github.com/MicrosoftDocs/entra-docs"paths:["docs/identity/hybrid/"]alias:"entra-hybrid"
- AI calls
list_reposto check indexing progress - AI calls
search_docswith"hybrid identity sync"and answers with the indexed docs
No config files needed. The AI handles discovery, indexing, and search.
| Tool | Description |
|---|---|
search_docs |
Full-text search across all indexed docs (or a specific repo) |
list_repos |
List available documentation sources, status, and indexing progress |
browse_docs |
Explore doc tree structure and headings |
update_docs |
Re-index to pull latest changes |
add_docs |
Add a new git repo or local directory as a doc source |
remove_docs |
Remove a documentation source |
- Sparse checkout - only fetches specified paths from GitHub repos, minimizing bandwidth
- FTS5 full-text search - SQLite FTS5 with BM25 ranking for relevance
- Markdown chunking - splits docs by heading, preserving document structure
- Token budgeting - fits results within AI context window limits
- Background indexing -
add_docsreturns immediately while indexing runs async - Auto-refresh - stale repos are re-indexed automatically on server startup
A skills/local-docs-mcp/SKILL.md is included for AI agent platforms that support the agentskills.io specification. Copy or symlink the skills/local-docs-mcp/ directory to your skills directory for enhanced tool usage guidance.
PRs welcome. Run go test ./... before submitting.