Document MCP
Document MCP
ChatGPT-style chatbot plus a Document MCP server. You register folder paths and a local LiteLLM model in Settings. Questions go to LiteLLM with MCP tools; the server reads only those folders, using pywin32 COM for Word / Excel / PowerPoint (same Office path as Model Council).
Chat UI → LiteLLM /v1/chat/completions (+ tools)
↑ tool_calls (search_documents, read_document, …)
MCP host → Document MCP (stdio JSON-RPC)
→ allowlisted folders
→ win32com Word / Excel / PowerPointClaude Desktop, Claude Code, and Cursor attach to the same MCP server and the same folder list.
Quick start
Run your LiteLLM proxy.
Double-click
start.bat.Open http://127.0.0.1:7860.
Settings → LiteLLM: paste base URL (e.g.
http://localhost:4000), API key, Load models or Add model, then Save.Settings → Folders: paste Windows folder paths.
sample_docsis registered on first run.Ask anything those files can answer.
Manual
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
python -m appSettings
Tab | What it does |
LiteLLM | Base URL, key, load |
Folders | MCP roots (allowlist). Same idea as Model Council |
Claude MCP | Copy Claude Desktop / Claude Code / Cursor snippets, or write Claude Desktop config for you |
URLs can be pasted as http://host:4000, http://host:4000/v1, or .../v1/chat/completions — they are normalized like Model Council.
How LiteLLM + MCP work here
Taken from Model Council’s in-app MCP loop:
Host calls MCP
tools/listand converts schemas to OpenAI tools.Host POSTs
chat/completionsto LiteLLM with those tools (tool_choice: auto).If the model returns
tool_calls, the host runs MCPtools/call(stdio).Tool JSON is appended as
role: tooland the loop repeats until a normal answer.
The model never sees files unless it calls a tool. Roots are allowlisted. Office files prefer COM so Windows-unlocked / IRM files can still be read.
MCP tools
Tool | Purpose |
| Health, engines, folder count |
| Registered roots |
| Change roots |
| Inventory |
| Name + extracted text |
| Extract (COM first, library fallback) |
Prompt: ask_documents.
Claude Desktop / Claude Code / Cursor
In the chatbot: Settings → Claude MCP → Add to Claude Desktop (writes %APPDATA%\Claude\claude_desktop_config.json). Restart Claude, then ask it to ping Document MCP.
Or copy this shape (paths are filled in by Settings):
{
"mcpServers": {
"document-mcp": {
"command": "D:\\\\AntigravityCodes\\\\Document-MCP\\\\.venv\\\\Scripts\\\\python.exe",
"args": ["-m", "document_mcp"],
"cwd": "D:\\\\AntigravityCodes\\\\Document-MCP",
"env": {
"PYTHONUTF8": "1",
"DOCUMENT_MCP_ROOTS": "D:\\\\AntigravityCodes\\\\Document-MCP\\\\data\\\\folders.json"
}
}
}
}Claude Code:
claude mcp add-json document-mcp "{...stdio server json from Settings...}"Cursor: repo mcp.json, or Settings → Claude MCP copy the Cursor snippet.
HTTP (LiteLLM MCP gateway):
start_mcp_http.batThen add http://127.0.0.1:8765/mcp.
pywin32 / Office
Word.Application→.doc/.docxExcel.Application→.xls/.xlsx/.xlsmPowerPoint.Application→.ppt/.pptx
Fallback: python-docx / openpyxl / python-pptx. PDFs: PyMuPDF. Legacy binary Office still needs Microsoft Office.
python -m document_mcp.reader sample_docs\mena_rhq_overview.mdLayout
app/ FastAPI chat host (MCP client + UI)
document_mcp/ FastMCP server, COM readers, Claude install helper
sample_docs/ Starter files
data/ folders.json, settings, extract cache (local)Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MENARHQ-cloud/Document-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server