Document MCP
Документ MCP
Чат-бот в стиле ChatGPT плюс сервер Document MCP. Вы регистрируете пути к папкам и локальную модель LiteLLM в Настройках. Вопросы направляются в LiteLLM с инструментами MCP; сервер читает только эти папки, используя pywin32 COM для Word / Excel / PowerPoint (тот же путь Office, что и в 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 и 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 appRelated MCP server: office-tools
Настройки
Вкладка | Что делает |
LiteLLM | Базовый URL, ключ, загрузить |
Папки | Корни MCP (разрешенный список). Та же идея, что и |
Claude MCP | Скопировать сниппеты для Claude Desktop / Claude Code / Cursor, или записать конфиг Claude Desktop за вас |
URL-адреса можно вставлять как http://host:4000, http://host:4000/v1 или .../v1/chat/completions — они нормализуются, как в Model Council.
Как здесь работают LiteLLM + MCP
Взято из цикла MCP внутри приложения Model Council:
Хост вызывает MCP
tools/listи преобразует схемы в инструменты OpenAI.Хост отправляет POST-запрос
chat/completionsк LiteLLM с этими инструментами (tool_choice: auto).Если модель возвращает
tool_calls, хост запускает MCPtools/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)Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
Securely search and manage workspace context files for AI agents and teams.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables natural language interaction with local .docx files, allowing users to find, read, search, and summarize Word documents using friendly names and location hints.53-
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to read, create, edit Word/Excel/PPT files and manage the filesystem on the user's computer via natural language.-
- FlicenseNot gradedqualityBmaintenanceEnables local ChatGPT/OpenAI MCP clients to read files and search within explicitly authorized directories using read-only, policy-constrained tools.-
- AlicenseNot gradedqualityCmaintenanceEnables secure, read-only access to local project files (including text, DOCX, PDF, and XLSX) through MCP, with strict directory whitelisting and no write, edit, or command-execution tools.1MIT
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