Document MCP
Document MCP
ChatGPTスタイルのチャットボットにDocument MCPサーバーを追加。設定でフォルダパスとローカルのLiteLLMモデルを登録します。質問はMCPツールと共にLiteLLMに送信され、サーバーは指定されたフォルダのみを読み取り、pywin32 COMを使用してWord / Excel / PowerPoint(Model Councilと同じOfficeパス)を処理します。
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、Cursorは同じMCPサーバーと同じフォルダリストに接続します。
クイックスタート
LiteLLMプロキシを実行します。
start.batをダブルクリックします。http://127.0.0.1:7860 を開きます。
設定 → LiteLLM: ベースURL(例:
http://localhost:4000)、APIキーを貼り付け、モデルを読み込むまたはモデルを追加をクリックしてから保存します。設定 → フォルダ: Windowsのフォルダパスを貼り付けます。初回実行時に
sample_docsが登録されます。それらのファイルが答えられることを何でも質問します。
マニュアル
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
python -m app設定
タブ | 説明 |
LiteLLM | ベースURL、キー、 |
フォルダ | MCPルート(許可リスト)。Model Councilの |
Claude MCP | Claude Desktop / Claude Code / Cursorのスニペットをコピー、またはClaude Desktop設定を書き込み |
URLはhttp://host:4000、http://host:4000/v1、.../v1/chat/completionsとして貼り付け可能です。これらはModel Councilと同様に正規化されます。
LiteLLM + MCPの動作方法
Model Councilのアプリ内MCPループから引用:
ホストがMCPの
tools/listを呼び出し、スキーマをOpenAIツールに変換します。ホストがそれらのツールを含む
chat/completionsをLiteLLMにPOSTします(tool_choice: auto)。モデルが
tool_callsを返した場合、ホストがMCPのtools/call(stdio)を実行します。ツールJSONが
role: toolとして追加され、通常の回答が返るまでループが繰り返されます。
モデルはツールを呼び出さない限りファイルを参照しません。ルートは許可リストに登録されています。OfficeファイルはCOMを優先するため、Windowsでロック解除されたファイルやIRMファイルも読み取れます。
MCPツール
ツール | 目的 |
| ヘルス、エンジン、フォルダ数 |
| 登録されたルート |
| ルートの変更 |
| 一覧 |
| 名前+抽出テキスト |
| 抽出(COM優先、ライブラリフォールバック) |
プロンプト: ask_documents。
Claude Desktop / Claude Code / Cursor
チャットボット内: 設定 → Claude MCP → Claude Desktopに追加(%APPDATA%\Claude\claude_desktop_config.jsonに書き込み)。Claudeを再起動し、ping Document MCPを依頼します。
または以下の形状をコピー(パスは設定で入力されます):
{
"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: リポジトリのmcp.json、または設定 → Claude MCPでCursorスニペットをコピー。
HTTP(LiteLLM MCPゲートウェイ):
start_mcp_http.bat次にhttp://127.0.0.1:8765/mcpを追加します。
pywin32 / Office
Word.Application→.doc/.docxExcel.Application→.xls/.xlsx/.xlsmPowerPoint.Application→.ppt/.pptx
フォールバック: python-docx / openpyxl / python-pptx。PDF: PyMuPDF。レガシーバイナリOfficeにはMicrosoft Officeが必要です。
python -m document_mcp.reader sample_docs\mena_rhq_overview.mdレイアウト
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)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Securely search and manage workspace context files for AI agents and teams.
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
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