feat: Self-developed Filesystem MCP Server — 26 tools, pure Python, zero deps - #143
Conversation
替代 @modelcontextprotocol/server-filesystem 的 npx 方案。 亮点: - 26 个工具覆盖全生命周期 - 行级编辑 edit_file 支持 dryRun 预览 unified diff - 批量替换 batch_replace 类 sed -i - 内置 grep_files 正则搜索+上下文 - LLM 友好: 结构化 JSON、编码自动检测 - 安全沙箱: 白名单目录+路径验证 - 纯 Python: 仅依赖 mcp+fastmcp
清除配置示例中的第三方品牌引用
|
Hi @akaxlh @chaohuang-ai, this PR adds a self-developed Filesystem MCP Server (26 tools, pure Python, zero external deps) plus the canonical MCP server config. Synced with latest main, conflict-free. Could you please review when you get a chance? Thanks! |
|
@Zongwei9888 The CI workflow (Linting and Formatting) for this PR is stuck in action_required -- GitHub requires a maintainer to approve running Actions on fork pull requests. All code has been verified locally (npm run check / py_compile all pass, no conflicts). Could you please Approve and run workflows on this PR, or adjust repo Actions settings to allow fork PRs without approval? Thanks! |
1 similar comment
|
@Zongwei9888 The CI workflow (Linting and Formatting) for this PR is stuck in action_required -- GitHub requires a maintainer to approve running Actions on fork pull requests. All code has been verified locally (npm run check / py_compile all pass, no conflicts). Could you please Approve and run workflows on this PR, or adjust repo Actions settings to allow fork PRs without approval? Thanks! |
The Secret history scan has failed on main since dd8f0a8. Cause: merging HKUDS#131 with -s ours recorded the branch in history without applying its tree, and gitleaks scans history, not the working tree. The finding is a fixture, not a credential — the literal "sk-secret123456" inside a RuntimeError message, asserting that error text is redacted before it reaches the UI. Its file, tests/ui_session_resume_test.py, does not exist on main, so the finding cannot be fixed by editing it; a fingerprint entry is the only route. Verified: gitleaks over origin/main now reports no leaks across 240 commits. Note for future -s ours merges: they bring the branch's full history under the secret scan. Two branches deliberately left unmerged (HKUDS#133, HKUDS#143) carry findings of their own, and HKUDS#133's is a real key — merging them for attribution alone would have put it in main's history permanently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Overview
Self-developed pure Python Filesystem MCP Server, replacing the npx-based @modelcontextprotocol/server-filesystem.
Key advantages: No Node.js/npm/npx required. Pure Python + FastMCP. Fast startup, zero external dependencies.
Comparison with Official
26 Tools
Information: list_allowed_directories, get_file_info
Reading: read_text_file, read_file, read_media_file, read_multiple_files
Writing: write_file, edit_file (dryRun diff preview), append_file
Directory: create_directory, list_directory, list_directory_with_sizes, directory_tree
Search: search_files, grep_files (regex+grep), find_by_size, find_by_date
File Ops: move_file, copy_file, delete_file, diff_files, file_hash
Batch: batch_replace (sed -i style + dry_run), count_lines (wc style)
Registration
Files Changed