Skip to main content
Glama
skaosqkf0-del

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)"
}

その中の1つを読むと、見出し・段落・表が構造化された形で返ってきます(平坦化されません):

$ 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

これは何か

フォルダ内のあらゆるファイル(PDF、Word、PowerPoint、SVG、PNG)を読み取り、構造と生のコンテンツを呼び出し元のエージェント(Claude Code、Claude Desktop、Codex)に返す個人用MCPサーバーです。それ自体は要約を行いません。

これが設計全体です:サーバーが抽出し、ホストが解釈します。このサーバーにはLLM APIキーは一切ありません。PNGはキャプションではなくbase64の画像コンテンツとして返され、ホスト自身のビジョンがそれを読み取ります。スキャンされたPDFは、要求した場合にのみOCR処理されます。

ツール

Tool

Role

analyze_folder_structure

フォルダの再帰ツリー+拡張子ごとの統計

list_supported_files

フィルタリングされたpdf/docx/pptx/svg/pngパスのみ

read_pdf

ページごとのテキスト。テキストレイヤーのないページではocr=TrueでTesseractを実行

read_docx

段落、見出し、表(.docは非対応)

read_pptx

スライドごとのタイトル、本文、発表者ノート(.pptは非対応)

read_svg

サイズ、タグ数、<text>コンテンツ — ラスタライズなし

read_image

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.mdclaude_desktop_config.example.jsoncodex-config.example.toml

セキュリティ

機密パスは決定的に拒否されます — モデルが読まないと判断することに依存しません。paths.pyを参照してください。

Pattern

What it protects

.ssh, .aws, .gnupg, .azure, .kube, .docker

認証情報とクラウド設定のディレクトリ

Browser profile roots (e.g. User Data)

保存されたログイン情報とCookie

.env*, *.pem, *.key, *.pfx, *.p12

名前パターンに一致するシークレットファイル

id_rsa, id_ed25519, known_hosts, .netrc, credentials, credentials.json, login data, cookies, web data

特定の認証情報ファイル名

すべての呼び出しは監査もされます — ツール名、引数、結果(成功またはブロック)がlogs/audit.jsonlに追記されます。audit.pyを参照してください。これらすべてに加えて50MBのファイルサイズ上限が適用されます。

このサーバーを拡張する人向けの規約はAGENTS.mdにあります。

エラー

すべての失敗はToolFailureを発生させ、コード、平易な理由、復旧方法を含みます — メッセージは人間だけでなく、呼び出し元のモデルが読んで行動できるように書かれています。

Code

Raised when

PATH_NOT_FOUND

フォルダまたはファイルパスが存在しない

NOT_A_DIRECTORY / NOT_A_FILE

ツールが誤った種類のパスを受け取った

UNSUPPORTED_EXTENSION

ファイルがpdf/docx/pptx/svg/pngではない

WRONG_TOOL_FOR_EXTENSION

例:.docxに対してread_pdfが呼ばれた

FILE_TOO_LARGE

ファイルが50MBの上限を超えている

SENSITIVE_PATH_BLOCKED

パスが上記のセキュリティ表に一致する

OCR_ENGINE_NOT_FOUND

ocr=TrueだがTesseractがインストール/設定されていない

SVG_PARSE_ERROR

.svgファイルが有効なXMLではない

スキャンPDFのOCR

read_pdf(ocr=True)にはTesseractが必要です:

winget install UB-Mannheim.TesseractOCR
uv run python scripts/setup_ocr.py   # copies eng/osd, downloads kor.traineddata

ocr_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プロトコルを実行してスキーマレベルの破損を検出します。

制限

Limit

Why / what to do

.doc / .ppt not supported

レガシーなバイナリ形式 — 先に.docx/.pptxとして保存してください

Scanned PDFs return empty text by default

ocr=Trueを渡してください(デフォルトではオフ — 遅いため)

SVGs aren't rasterized

構造をXMLとして解析し、画像としてはレンダリングしない

Install Server
F
license - not found
A
quality
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 Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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
  • F
    license
    A
    quality
    C
    maintenance
    Enables 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

View all related MCP servers

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.

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/skaosqkf0-del/MCP_test'

If you have feedback or need assistance with the MCP directory API, please join our Discord server