Mcp Claude 代码
概览
什么是 MCP Claude Code?
MCP Claude Code 是一个创新的实现,旨在利用 Claude 的能力,这是一种强大的 AI 模型。该存储库作为一个平台,供开发者和爱好者探索、贡献和增强 Claude 的功能,通过协作编码的努力。该项目旨在提供一个强大的框架,将 Claude 的能力集成到各种应用中,使用户更容易在他们的项目中利用 AI。
MCP Claude Code 的特点
- AI 集成:无缝集成 Claude 的 AI 能力到应用中,使其能够实现自然语言处理和数据分析等高级功能。
- 开源:该项目公开可用,鼓励全球开发者的协作和贡献。
- 用户友好的文档:提供全面的指南和文档,帮助用户有效理解和利用功能。
- 社区支持:一个充满活力的开发者和用户社区,分享见解、解决问题并为项目的成长做出贡献。
- 定期更新:该存储库积极维护,定期更新以增强性能并引入新功能。
如何开始使用 MCP Claude Code
-
克隆存储库:首先使用以下命令将存储库克隆到本地计算机:
git clone https://github.com/SDGLBL/mcp-claude-code.git -
安装依赖:导航到项目目录并安装必要的依赖。这通常可以使用以下命令完成:
npm install -
探索文档:熟悉提供的文档,以了解如何实现和利用 MCP Claude Code 的功能。
-
贡献:如果您有改进或新功能的想法,请随时分叉存储库,进行更改并提交拉取请求。
-
参与社区:加入讨论,提问,并在社区论坛或 GitHub 问题中与其他用户分享您的经验。
常见问题解答
问:MCP Claude Code 使用了哪些编程语言?
答:该项目主要使用 JavaScript 和 Node.js,但也欢迎其他语言的贡献。
问:MCP Claude Code 有许可证吗?
答:有,该项目根据 MIT 许可证进行授权,允许自由使用、修改和分发。
问:我如何报告问题或错误?
答:您可以通过导航到存储库的“问题”部分,提交一个新问题,并详细描述问题来报告问题。
问:我可以为该项目贡献吗?
答:当然可以!鼓励贡献。您可以分叉存储库,进行更改,并提交拉取请求以供审核。
问:我在哪里可以找到更多关于 Claude 的信息?
答:有关 Claude 及其能力的更多详细信息,请参考官方文档或项目的维基部分。
详情
MCP Claude Code
An implementation of Claude Code capabilities using the Model Context Protocol (MCP).
Overview
This project provides an MCP server that implements Claude Code-like functionality, allowing Claude to directly execute instructions for modifying and improving project files. By leveraging the Model Context Protocol, this implementation enables seamless integration with various MCP clients including Claude Desktop.

Features
- Code Understanding: Analyze and understand codebases through file access and pattern searching
- Code Modification: Make targeted edits to files with proper permission handling
- Enhanced Command Execution: Run commands and scripts in various languages with improved error handling and shell support
- File Operations: Manage files with proper security controls through shell commands
- Code Discovery: Find relevant files and code patterns across your project with high-performance searching
- Agent Delegation: Delegate complex tasks to specialized sub-agents that can work concurrently
- Multiple LLM Provider Support: Configure any LiteLLM-compatible model for agent operations
- Jupyter Notebook Support: Read and edit Jupyter notebooks with full cell and output handling
Tools Implemented
| Tool | Description |
| -- | |
| read | Read file contents with line numbers, offset, and limit capabilities |
| write | Create or overwrite files |
| edit | Make line-based edits to text files |
| multi_edit | Make multiple precise text replacements in a single file operation with atomic transactions |
| directory_tree | Get a recursive tree view of directories |
| grep | Fast pattern search in files with ripgrep integration for best performance (docs) |
| content_replace | Replace patterns in file contents |
| grep_ast | Search code with AST context showing matches within functions, classes, and other structures |
| run_command | Execute shell commands (also used for directory creation, file moving, and directory listing) |
| notebook_read | Extract and read source code from all cells in a Jupyter notebook with outputs |
| notebook_edit | Edit, insert, or delete cells in a Jupyter notebook |
| think | Structured space for complex reasoning and analysis without making changes |
| dispatch_agent | Launch one or more agents that can perform tasks using read-only tools concurrently |
| batch | Execute multiple tool invocations in parallel or serially in a single request |
| todo_write | Create and manage a structured task list |
| todo_read | Read a structured task list |
Getting Started
For detailed installation and configuration instructions, please refer to INSTALL.md.
For detailed tutorial of 0.3 version, please refer to TUTORIAL.md
Security
This implementation follows best practices for securing access to your filesystem:
- Permission prompts for file modifications and command execution
- Restricted access to specified directories only
- Input validation and sanitization
- Proper error handling and reporting
Development
To contribute to this project:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Server配置
{
"mcpServers": {
"mcp-claude-code": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--sdglbl--mcp-claude-code--mcp-claude-code",
"claudecode"
],
"env": {
"USEFUL_PROMPTS": "useful-prompts"
}
}
}
}