Filesystem MCP Server
MCP 集成项目 — 简历匹配代理
里程碑 2:将直接的文件系统工具导入替换为完全符合规范的 Model Context Protocol (MCP) 服务器,由 LangGraph 代理使用。
架构
User
│
▼
matching_agent.py (LangGraph state machine)
│
│ JSON-RPC 2.0 over stdio
▼
mcp_client.py (subprocess manager + RPC transport)
│
▼
filesystem_mcp_server.py (MCP server, 6 tools)
│
▼
resumes/ (file system)关键文件
文件 | 作用 |
| JSON-RPC 2.0 MCP 服务器,暴露 6 个文件系统工具 |
| 可复用的 stdio 传输 MCP 客户端,带子进程管理 |
| LangGraph 代理 — 通过 MCP 发现并调用工具 |
| 所有 JSON-RPC 方法的单元测试(无子进程) |
| 带真实子进程 + LangChain 桥接的集成测试 |
| 系统的 6 个 Mermaid 图 |
设置
1. 安装依赖
pip install -r requirements.txt2. 配置 API 密钥
cp .env.example .env
# Edit .env and set OPENROUTER_API_KEY在 openrouter.ai/keys 获取免费密钥。
运行
启动简历匹配代理
python matching_agent.py示例查询:
"列出 resumes 文件夹中的所有简历""查找具有 Python 技能的候选人并按经验排序""批量读取所有简历并生成技能对比报告""监视 resumes 文件夹中的新候选人""读取 Alice Johnson 的简历并写一段摘要"
独立测试 MCP 服务器
# Send a raw JSON-RPC request
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' | python filesystem_mcp_server.py
# Test the MCP client
python mcp_client.py运行测试
# Unit tests (fast, no subprocess)
python -m pytest tests/test_mcp_server.py -v
# Integration tests (spawns subprocess)
python -m pytest tests/test_agent.py -v -s
# All tests
python -m pytest tests/ -vMCP 服务器 — 可用工具
工具 | 描述 |
| 读取 PDF、DOCX 或 TXT 文件;返回文本 + 元数据 |
| 列出目录中的文件,支持可选过滤 |
| 将文本写入文件(按需创建目录) |
| 不区分大小写的关键字搜索,带上下文 |
| 新增 — 快照差异监控,检测新增/修改/删除的文件 |
| 新增 — 通过 ThreadPoolExecutor 并行处理多文件 |
MCP 服务器 — JSON-RPC 方法
方法 | 描述 |
| MCP 握手;返回服务器能力 |
| 客户端确认通知(无响应) |
| 资源发现 — 列出全部 6 个工具及其模式 |
| 使用参数执行指定工具 |
| 列出文件系统资源(resumes 目录) |
| 通过 |
| 存活检查 |
JSON-RPC 2.0 错误代码
代码 | 名称 | 触发时机 |
| Parse Error | JSON 无效 |
| Invalid Request | 不是有效的 JSON-RPC 2.0 消息 |
| Method Not Found | 未知方法或工具名称 |
| Invalid Params | 参数缺失或类型错误 |
| Tool Error | 工具执行失败 |
工作流图
参见 diagrams/workflow_diagram.md 中的 6 个 Mermaid 图:
系统架构总览
LangGraph 状态机
JSON-RPC 2.0 消息流(完整时序图)
watch_directory轮询流程batch_process并行执行错误处理流程
对里程碑 1 的依赖
本项目是对 LLM-Powered-File-System-Assistant(里程碑 1)的重构。4 个原始工具(read_file、list_files、write_file、search_in_file)被移植到 MCP 服务器中。llm_file_assistant.py 中直接的 import fs_tools 被 MCP 协议层取代。
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.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
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/abrarsavan123/mcp-integration-project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server