file-analyzer-mcp
效果演示
指向一个文件夹,它返回的是真实的目录树,而不是猜测:
$ analyze_folder_structure({ "folder_path": "tests/fixtures" }){
"status": "OK",
"file_count": 6,
"supported_file_count": 6,
"extension_stats": [
{ "extension": ".pdf", "count": 2, "bytes": 723995 },
{ "extension": ".docx", "count": 1, "bytes": 35505 },
{ "extension": ".pptx", "count": 1, "bytes": 33067 },
{ "extension": ".svg", "count": 1, "bytes": 319 },
{ "extension": ".png", "count": 1, "bytes": 74 }
],
"tree_text": "fixtures/\n├── sample.docx (34.7KB)\n├── sample.pdf (431B)\n├── sample.png (74B)\n├── sample.pptx (32.3KB)\n├── sample.svg (319B)\n└── sample_scanned.pdf (706.6KB)"
}然后读取其中一个文件——标题、段落和表格以结构化形式返回,而不是被压平:
$ read_docx({ "file_path": "tests/fixtures/sample.docx" }){
"status": "OK",
"headings": ["테스트 문서"],
"text": "테스트 문서\n본문 첫 문단입니다.",
"tables": [{ "index": 0, "rows": [["A", "B"], ["1", "2"]] }]
}两个调用都可复现——克隆本仓库,运行 uv sync --extra dev,然后自行对
tests/fixtures/ 调用它们。
Related MCP server: Agent Helper
它是什么
一个个人 MCP 服务器,读取文件夹中的任何内容——PDF、Word、PowerPoint、SVG、 PNG——并将结构和原始内容交还给调用它的任何代理 (Claude Code、Claude Desktop、Codex)。它本身不进行任何摘要。
整个设计就是这样:服务器负责提取,宿主负责解释。这个服务器中不存放任何 LLM API 密钥。PNG 以 base64 图像内容返回,而不是一段说明文字—— 由你宿主的视觉模型自行读取。扫描版 PDF 只在你要求时才进行 OCR。
工具
工具 | 作用 |
| 文件夹的递归目录树 + 按扩展名统计 |
| 仅列出 pdf/docx/pptx/svg/png 路径,已过滤 |
| 逐页文本。 |
| 段落、标题、表格(不支持 .doc) |
| 逐页幻灯片的标题、正文、演讲者备注(不支持 .ppt) |
| 尺寸、标签计数、 |
| PNG 以元数据 + 图像内容返回,供宿主直接查看 |
大文档支持分页:PDF 用 page_start/page_end,PPTX 用 slide_start/slide_end。
默认上限为 30 页 / 60 张幻灯片——超过后,响应的
next_actions 会告诉你下一步要请求的范围。
安装
uv sync --extra dev使用 Claude Code 注册:
claude mcp add -s user file-analyzer -- "<uv.exe path>" --directory "<this folder>" run python src/file_analyzer_mcp/server.py在 Windows 上,如果 uv 是通过 pip 安装的,它不会出现在 Claude 的 PATH 中——请使用 uv.exe 的
完整路径(用 pip show uv 查找)。Claude Desktop 和 Codex 的示例在
config/ 中:claude_code.example.md、
claude_desktop_config.example.json、
codex-config.example.toml。
安全
敏感路径会被确定性地拒绝——这不依赖于模型自行决定不去读取它们。参见 paths.py。
模式 | 保护内容 |
| 凭据和云配置目录 |
浏览器配置文件根目录(例如 | 已保存的登录信息和 Cookie |
| 密钥文件,按名称模式匹配 |
| 特定的凭据文件名 |
每次调用也都会被审计——工具名称、参数和结果(成功或阻止)
都会追加到 logs/audit.jsonl。参见 audit.py。
除此之外还有 50MB 的文件大小上限。
扩展此服务器的约定见 AGENTS.md。
错误
每次失败都会抛出带代码的 ToolFailure,包含通俗易懂的原因以及
恢复方法——消息是写给调用它的模型去阅读和执行的,
而不仅仅是给人类看的。
代码 | 触发时机 |
| 文件夹或文件路径不存在 |
| 工具收到了错误类型的路径 |
| 文件不是 pdf/docx/pptx/svg/png |
| 例如对 |
| 文件超过 50MB 上限 |
| 路径匹配上方的安全表 |
|
|
|
|
扫描版 PDF 的 OCR
read_pdf(ocr=True) 需要 Tesseract:
winget install UB-Mannheim.TesseractOCR
uv run python scripts/setup_ocr.py # copies eng/osd, downloads kor.traineddataocr_lang 默认为 "kor+eng"。Tesseract 路径不对?设置 TESSERACT_CMD。
测试
uv run pytest -q # parser / path / audit unit tests
uv run python scripts/smoke_stdio.py # real stdio round-trip against the server两者都应通过,一项更改才算完成——pytest 在隔离环境中检查各模块, 冒烟测试是唯一实际演练 MCP 协议并捕获模式层面破坏的测试。
限制
限制 | 原因 / 处理方法 |
不支持 | 旧版二进制格式——请先另存为 |
扫描版 PDF 默认返回空文本 | 传入 |
SVG 不进行栅格化 | 作为 XML 解析以获取结构,而不是渲染为图像 |
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 Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, search, and analyze local file systems with tools for reading file contents, listing directories, searching by patterns, and analyzing folder structures for context-aware queries.
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to process files locally — OCR images, extract text from PDFs and DOCX, and describe images using local vision models, all without sending data to external services.
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect and convert PDF, PowerPoint, Excel, and many other file formats into clean, structured Markdown, with chunking support for long documents.Apache 2.0
- FlicenseAqualityCmaintenanceEnables read-only analysis of local unstructured documents by scanning a folder, extracting text and structural metadata, and passing content with truncation and error-awareness to an LLM for summarization.9
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.
Read PDFs and images as markdown or text, with exact costs and hard spend caps. $0.75/1k pages.
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/skaosqkf0-del/MCP_test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server