Skip to main content
Glama

Claude Dev Server

克劳德·德夫·塞弗

模型上下文协议 (MCP) 服务器使 Claude 能够通过在指定工作区内提供直接文件系统访问来协助软件开发。

特征

  • 🔍 读取文件内容
  • ✍️ 编写和修改文件
  • 📁 创建目录
  • 📋 列出文件和目录
  • ℹ️ 获取文件信息
  • 🛠️ 直接从 Claude 实现代码工件

安装

  1. 确保安装了 Python 3.10 或更高版本
  2. 创建新的项目目录:
mkdir mcp-claude-dev cd mcp-claude-dev
  1. 使用 UV 设置虚拟环境:
uv venv
  1. 以可编辑模式安装包:
uv pip install -e .

项目结构

mcp-claude-dev/ ├── claude_dev_server/ │ ├── __init__.py │ ├── __main__.py │ ├── server.py │ └── file_manager.py └── pyproject.toml

配置

要将服务器与 Claude Desktop 一起使用,请将其添加到您的 Claude Desktop 配置文件中:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

添加此配置:

{ "mcpServers": { "claude-dev": { "command": "uv", "args": [ "--directory", "PATH_TO_YOUR_PROJECT", "run", "-m", "claude_dev_server", "PATH_TO_YOUR_WORKSPACE" ] } } }

代替:

  • PATH_TO_YOUR_PROJECT为 mcp-claude-dev 目录的绝对路径
  • PATH_TO_YOUR_WORKSPACE为 Claude 应具有文件访问权限的目录的绝对路径

用法

  1. 启动 Claude Desktop
  2. 服务器将出现在工具菜单中(锤子图标)
  3. 您现在可以要求 Claude:
    • 读取文件:“你能读取file.txt的内容吗?”
    • 写入文件:“使用基本的 Flask 应用程序创建一个名为 example.py 的新文件”
    • 列出目录:“当前目录中有哪些文件?”
    • 创建目录:“创建一个名为‘src’的新目录”
    • 获取文件信息:“main.py 的大小和修改日期是多少?”
    • 实现代码:“编写一个 Python 函数来计算斐波那契数,并将其保存在 math_utils.py 中”

安全说明

  • 服务器仅允许访问指定工作区目录内的文件
  • 所有文件操作都需要相对于工作空间的明确路径
  • 工作区外的目录遍历尝试被阻止
  • 实施文件监视以检测变化

发展

为项目做出贡献:

  1. 克隆存储库
  2. 安装开发依赖项
  3. 进行更改
  4. 提交拉取请求之前进行彻底测试

运行测试

python -m pytest tests/

可用工具

服务器公开了以下 MCP 工具:

  • read_file(path: str) -> str :读取文件内容
  • write_file(path: str, content: str) -> str :将内容写入文件
  • list_files(path: str = "") -> str :列出目录内容
  • create_directory(path: str) -> str :创建新目录
  • get_file_info(path: str) -> str :获取文件元数据
  • implement_artifact(path: str, content: str) -> str :保存代码工件

错误处理

该服务器包括强大的错误处理功能:

  • 无效路径
  • 工作区外的访问尝试
  • 文件操作失败
  • 权限问题

执照

MIT 许可证 - 请根据需要随意使用和修改。

贡献

欢迎贡献代码!请阅读我们的贡献指南,并提交 PR 以改进代码。

-
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 Dev Server 支持在指定工作区内与文件系统直接交互,允许用户使用自然语言命令执行文件和目录操作并在软件开发中实现代码工件。

  1. 特征
    1. 安装
      1. 项目结构
        1. 配置
          1. 用法
            1. 安全说明
              1. 发展
                1. 运行测试
              2. 可用工具
                1. 错误处理
                  1. 执照
                    1. 贡献

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        This server provides an interface for performing basic file system operations such as navigation, reading, writing, and file analysis, allowing users to manage directories and files efficiently.
                        Last updated -
                        3
                        Python
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A filesystem Model Context Protocol server that provides Claude Desktop with capabilities to read, write, and manipulate files on your system.
                        Last updated -
                        TypeScript
                      • -
                        security
                        A
                        license
                        -
                        quality
                        An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
                        Last updated -
                        173
                        Python
                        MIT License
                        • Apple
                        • Linux
                      • A
                        security
                        F
                        license
                        A
                        quality
                        Enables Claude to interact with FTP servers through natural language commands, allowing users to list directories, download/upload files, create directories, and delete files/directories on FTP servers.
                        Last updated -
                        6
                        5
                        JavaScript
                        • Linux
                        • Apple

                      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/arben-adm/mcp-claude-dev'

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