Skip to main content
Glama
MENARHQ-cloud

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 / PowerPoint

Claude Desktop、Claude Code、Cursorは同じMCPサーバーと同じフォルダリストに接続します。

クイックスタート

  1. LiteLLMプロキシを実行します。

  2. start.batをダブルクリックします。

  3. http://127.0.0.1:7860 を開きます。

  4. 設定 → LiteLLM: ベースURL(例:http://localhost:4000)、APIキーを貼り付け、モデルを読み込むまたはモデルを追加をクリックしてから保存します。

  5. 設定 → フォルダ: Windowsのフォルダパスを貼り付けます。初回実行時にsample_docsが登録されます。

  6. それらのファイルが答えられることを何でも質問します。

マニュアル

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
python -m app

設定

タブ

説明

LiteLLM

ベースURL、キー、/v1/modelsの読み込み、リストにないローカルモデル名の追加、接続テスト

フォルダ

MCPルート(許可リスト)。Model CouncilのOFFICE_ALLOWED_ROOTSと同じ考え方

Claude MCP

Claude Desktop / Claude Code / Cursorのスニペットをコピー、またはClaude Desktop設定を書き込み

URLはhttp://host:4000http://host:4000/v1.../v1/chat/completionsとして貼り付け可能です。これらはModel Councilと同様に正規化されます。

LiteLLM + MCPの動作方法

Model Councilのアプリ内MCPループから引用:

  1. ホストがMCPのtools/listを呼び出し、スキーマをOpenAIツールに変換します。

  2. ホストがそれらのツールを含むchat/completionsをLiteLLMにPOSTします(tool_choice: auto)。

  3. モデルがtool_callsを返した場合、ホストがMCPのtools/call(stdio)を実行します。

  4. ツールJSONがrole: toolとして追加され、通常の回答が返るまでループが繰り返されます。

モデルはツールを呼び出さない限りファイルを参照しません。ルートは許可リストに登録されています。OfficeファイルはCOMを優先するため、Windowsでロック解除されたファイルやIRMファイルも読み取れます。

MCPツール

ツール

目的

ping

ヘルス、エンジン、フォルダ数

list_folders

登録されたルート

add_folder / remove_folder

ルートの変更

list_documents

一覧

search_documents

名前+抽出テキスト

read_document

抽出(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 / .docx

  • Excel.Application.xls / .xlsx / .xlsm

  • PowerPoint.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)
-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all MCP Connectors

Latest Blog Posts

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