Skip to main content
Glama

MCP Claude Code

by SDGLBL

MCP克劳德代码

使用模型上下文协议 (MCP) 实现 Claude 代码功能。

概述

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

例子

特征

  • 代码理解:通过文件访问和模式搜索分析和理解代码库
  • 代码修改:通过适当的权限处理对文件进行有针对性的编辑
  • 增强的命令执行:以各种语言运行命令和脚本,并改进错误处理和 shell 支持
  • 文件操作:通过 shell 命令使用适当的安全控制来管理文件
  • 代码发现:通过高性能搜索查找整个项目中的相关文件和代码模式
  • 代理委派:将复杂的任务委派给可以同时工作的专门子代理
  • 支持多个 LLM 提供商:为代理操作配置任何兼容 LiteLLM 的模型
  • Jupyter Notebook 支持:使用完整的单元和输出处理功能读取和编辑 Jupyter 笔记本

实施的工具

工具描述
read读取文件内容,包括行号、偏移量和限制功能
write创建或覆盖文件
edit对文本文件进行基于行的编辑
multi_edit使用原子事务在单个文件操作中进行多次精确的文本替换
directory_tree获取目录的递归树视图
grep使用 ripgrep 集成在文件中进行快速模式搜索以获得最佳性能(文档
content_replace替换文件内容中的模式
grep_ast使用 AST 上下文搜索代码,显示函数、类和其他结构内的匹配项
run_command执行 shell 命令(也用于创建目录、移动文件和列出目录)
notebook_read从 Jupyter 笔记本的所有单元中提取并读取源代码,并输出
notebook_edit在 Jupyter 笔记本中编辑、插入或删除单元格
think结构化空间,无需改变即可进行复杂的推理和分析
dispatch_agent启动一个或多个可以使用只读工具同时执行任务的代理
batch在单个请求中并行或串行执行多个工具调用
todo_write创建和管理结构化任务列表
todo_read阅读结构化任务列表

入门

详细的安装配置说明请参考INSTALL.md

0.3版本详细教程请参考TUTORIAL.md

安全

此实现遵循保护文件系统访问的最佳实践:

  • 文件修改和命令执行的权限提示
  • 仅限指定目录的访问
  • 输入验证和清理
  • 正确的错误处理和报告

发展

为该项目做出贡献:

  1. 分叉存储库
  2. 创建功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add some amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

实现类似 Claude Code 功能的 MCP 服务器,允许 AI 通过直接文件系统交互来分析代码库、修改文件、执行命令和管理项目。

  1. 概述
    1. 特征
      1. 实施的工具
        1. 入门
          1. 安全
            1. 发展
              1. 执照

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  An 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 -
                  5
                  1
                  JavaScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  An 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 -
                  7
                  Python
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  MCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.
                  Last updated -
                  1
                  6
                  3
                  JavaScript
                • -
                  security
                  A
                  license
                  -
                  quality
                  A 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 -
                  Python
                  MIT License
                  • Apple
                  • Linux

                View all related MCP servers

                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/SDGLBL/mcp-claude-code'

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