Skip to content

Mimran0715/docs-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Docs MCP Prototype

This is a small MCP server that exposes local documentation to development tools. It reads files from a docs directory, chunks them, builds an in-memory TF-IDF search index, and provides MCP tools for listing, reading, searching, and reloading docs.

What It Provides

  • list_docs: list readable docs under the configured docs root
  • read_doc: read a specific doc by relative path
  • search_docs: search local docs and return matching chunks with line numbers
  • reload_docs: rebuild the in-memory index after files change

Run It

python3 server.py --docs-root docs

The default transport is stdio, which is what most MCP clients expect for a local server.

Verify It

python3 smoke_test.py

The smoke test starts the server over stdio, checks that all expected tools are registered, and calls search_docs.

You can also set the docs root with an environment variable:

DOCS_MCP_ROOT=/path/to/your/docs python3 server.py

Example MCP Client Config

Point your MCP client at the server script:

{
  "mcpServers": {
    "local-docs": {
      "command": "python3",
      "args": ["/Users/malimran/Desktop/docs-mcp/server.py", "--docs-root", "/path/to/your/docs"]
    }
  }
}

Prototype Notes

This version intentionally uses an in-memory lexical search index so it works without a database or external embedding API. Good next steps are adding file watching, persistent indexing, richer parsers for doc formats, and optional semantic embeddings.

About

local mcp server to communicate with code docs

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages