MCP克劳德代码
使用模型上下文协议 (MCP) 实现 Claude 代码功能。
概述
该项目提供了一个 MCP 服务器,实现了类似 Claude Code 的功能,允许 Claude 直接执行修改和改进项目文件的指令。通过利用模型上下文协议 (MCP),该实现能够与包括 Claude Desktop 在内的各种 MCP 客户端无缝集成。

特征
代码理解:通过文件访问和模式搜索分析和理解代码库
代码修改:通过适当的权限处理对文件进行有针对性的编辑
增强的命令执行:以各种语言运行命令和脚本,并改进错误处理和 shell 支持
文件操作:通过 shell 命令使用适当的安全控制来管理文件
代码发现:通过高性能搜索查找整个项目中的相关文件和代码模式
代理委派:将复杂的任务委派给可以同时工作的专门子代理
支持多个 LLM 提供商:为代理操作配置任何兼容 LiteLLM 的模型
Jupyter Notebook 支持:使用完整的单元和输出处理功能读取和编辑 Jupyter 笔记本
实施的工具
工具 | 描述 |
| 读取文件内容,包括行号、偏移量和限制功能 |
| 创建或覆盖文件 |
| 对文本文件进行基于行的编辑 |
| 使用原子事务在单个文件操作中进行多次精确的文本替换 |
| 获取目录的递归树视图 |
| 使用 ripgrep 集成在文件中进行快速模式搜索以获得最佳性能( ) |
| 替换文件内容中的模式 |
| 使用 AST 上下文搜索代码,显示函数、类和其他结构内的匹配项 |
| 执行 shell 命令(也用于创建目录、移动文件和列出目录) |
| 从 Jupyter 笔记本的所有单元中提取并读取源代码,并输出 |
| 在 Jupyter 笔记本中编辑、插入或删除单元格 |
| 结构化空间,无需改变即可进行复杂的推理和分析 |
| 启动一个或多个可以使用只读工具同时执行任务的代理 |
| 在单个请求中并行或串行执行多个工具调用 |
| 创建和管理结构化任务列表 |
| 阅读结构化任务列表 |
入门
详细的安装配置说明请参考INSTALL.md 。
0.3版本详细教程请参考TUTORIAL.md
安全
此实现遵循保护文件系统访问的最佳实践:
文件修改和命令执行的权限提示
仅限指定目录的访问
输入验证和清理
正确的错误处理和报告
发展
为该项目做出贡献:
分叉存储库
创建功能分支(
git checkout -b feature/amazing-feature)提交您的更改(
git commit -m 'Add some amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
local-only server
The server can only run on the client's local machine because it depends on local resources.
实现类似 Claude Code 功能的 MCP 服务器,允许 AI 通过直接文件系统交互来分析代码库、修改文件、执行命令和管理项目。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.Last updated -9132
- -securityFlicense-qualityAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.Last updated -60
- -securityAlicense-qualityA comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.Last updated -1MIT License
- -securityFlicense-qualityA high-speed MCP server that enables AI assistants like Claude to interact with local filesystems, manage Git repositories, and provide interactive experiences through a standardized JSON-based protocol.Last updated -5