AiDD MCP Server
AiDD MCP 服务器提供了一个安全的接口,供 AI 代理执行文件系统操作和代码分析,从而增强跨多种编程语言的 AI 辅助开发工作流程。
Tools
get_allowed_directory
Get the current working directory that this server is allowed to access.
write_file
Create a new file or overwrite an existing file with new content. Use this to save changes, create new files, or update existing ones. Use with caution as it will overwrite existing files without warning. Path must be relative to the allowed directory. Creates parent directories if needed. Example: Path='notes.txt', Content='Meeting notes for project X'
update_allowed_directory
Change the working directory that this server is allowed to access. Use this to switch between different projects.
create_directory
Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Useful for setting up project structure or organizing files. Only works within the allowed directory. Example: Enter 'src/components' to create nested directories.
edit_file
Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within the allowed directory. Always use dryRun first to preview changes before applying them.
list_directory
Get a detailed listing of files and directories in the specified path. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within the allowed directory. Example: Enter 'src' to list contents of the src directory, or '.' for current directory.
read_file
Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Only works within the allowed directory.Example: Enter 'src/main.py' to read a Python file.
read_multiple_files
Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within the allowed directory.Example: Enter ['src/main.py', 'README.md'] to read both files.
move_file
Move or rename a file or directory to a new location. This tool can be used to reorganize files and directories. Both source and destination must be within the allowed directory. If the destination already exists, the operation will fail. Parent directories of the destination will be created if they don't exist. Example: source='old.txt', destination='new/path/new.txt'
search_files
Search for files and directories matching a pattern. The search is recursive and case-insensitive. Only searches within the allowed directory. Returns paths relative to the allowed directory. Searches in file and directory names, not content. For searching within file contents, use the tree_sitter_map tool which can locate specific code elements like functions and classes. Example: pattern='.py' finds all Python files, pattern='test' finds all items with 'test' in the name.
delete_file
Delete a file or empty directory from the file system. Use with caution as this operation cannot be undone. For safety, this tool will not delete non-empty directories. Only works within the allowed directory. Example: path='old_file.txt' removes the specified file.
get_file_info
Get detailed information about a file or directory. Returns size, creation time, modification time, access time, type (file/directory), and permissions. All times are in ISO 8601 format. This tool is perfect for understanding file characteristics without reading the actual content. Only works within the allowed directory. Example: path='src/main.py' returns details about main.py
directory_tree
Get a recursive tree view of files and directories in the specified path as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within the allowed directory. Useful for understanding project structure. Example: Enter '.' for current directory, or 'src' for a specific directory.
execute_code
Execute arbitrary code in various programming languages on the user's local machine within the current working directory. Supported languages: python, javascript, ruby, php, go, rust. Always review the code carefully before execution to prevent unintended consequences. You MUST explicitly show the user the code that will be executed and get his confirmation before using this tool. Examples: - Python: code='print(sum(range(10)))'. - JavaScript: code='console.log(Array.from({length: 5}, (_, i) => i*2))'. - Ruby: code='puts (1..5).reduce(:+)'.
execute_shell_script
Execute a shell script (bash/sh) on the user's local machine within the current working directory. This tool can execute shell commands and scripts for system automation and management tasks. It is designed to perform tasks on the user's local environment, such as opening applications, installing packages and more. Always review the script carefully before execution to prevent unintended consequences. You MUST explicitly show the user the script that will be executed and get his confirmation before using this tool. Examples: - script='echo "Current directory:" && pwd'. - script='for i in {1..5}; do echo $i; done'.
tree_sitter_map
Build a tree-sitter based structural map of source code files. This tool analyzes code structure to identify classes, functions, and methods. Only analyzes files within the allowed directory. Useful for code analysis and understanding project structure. Example: Enter '.' to analyze all source files in current directory, or 'src' to analyze all files in the src directory.
git_init
Initialize a new Git repository. Creates a new Git repository in the specified directory. If the directory doesn't exist, it will be created. Directory must be within the allowed directory.
git_status
Shows the working tree status of a git repository. Returns information about staged, unstaged, and untracked files. Repository must be within the allowed directory.
git_diff_unstaged
Shows changes in working directory not yet staged for commit. Returns a unified diff format of all unstaged changes. Repository must be within the allowed directory.
git_diff_staged
Shows changes staged for commit. Returns a unified diff format of all staged changes. Repository must be within the allowed directory.
git_diff
Shows differences between branches or commits. Returns a unified diff format comparing current state with target. Repository must be within the allowed directory.
git_commit
Records changes to the repository. Commits all staged changes with the provided message. Repository must be within the allowed directory.
git_add
Adds file contents to the staging area. Stages specified files for the next commit. Repository must be within the allowed directory.
git_reset
Unstages all staged changes. Removes all files from the staging area. Repository must be within the allowed directory.
git_log
Shows the commit logs. Returns information about recent commits including hash, author, date, and message. Repository must be within the allowed directory.
git_create_branch
Creates a new branch. Creates a new branch from the specified base branch or current HEAD. Repository must be within the allowed directory.
git_checkout
Switches branches. Checks out the specified branch. Repository must be within the allowed directory.
git_show
Shows the contents of a commit. Returns detailed information about a specific commit including the changes it introduced. Repository must be within the allowed directory.
get_system_info
Get detailed system information including OS, CPU, memory, disk, and network details (such as WiFi network name). This tool provides comprehensive information about the system environment. Also returns the current working directory (allowed directory) of the AiDD MCP server. Useful for system analysis, debugging, environment verification, and workspace management.
README
AiDD MCP 服务器
一个 MCP 服务器,为 AI 驱动的开发工作流程提供一套全面的工具。功能包括文件系统操作、使用 tree-sitter 进行多种编程语言的代码分析、Git 操作、代码执行和系统信息检索。旨在增强 AI 在软件开发任务中辅助的能力。
<a href="https://glama.ai/mcp/servers/mpixtij6se"><img width="380" height="200" src="https://glama.ai/mcp/servers/mpixtij6se/badge" alt="AiDD Server MCP server" /></a>
安装
通过 Smithery 安装
要通过 Smithery 为 Claude Desktop 自动安装 AiDD:
npx -y @smithery/cli install mcp-server-aidd --client claude
手动安装
# 使用 mcp-get
npx @michaellatman/mcp-get@latest install mcp-server-aidd
# 使用 pip
pip install mcp-server-aidd
# 使用 uv
uvx mcp-server-aidd
Claude Desktop 设置
添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"aidd-ai-software-development-utilities": {
"command": "uvx",
"args": ["mcp-server-aidd"]
}
}
}
SkyDeck AI 助手应用
如果你正在使用 SkyDeck AI 助手应用,你可以搜索 "AiDD" 并安装 mcp-server-aidd。

主要特性
- 文件系统操作(读取、写入、编辑、移动、删除)
- 目录管理和遍历
- 使用 tree-sitter 进行多语言代码分析
- 具有安全措施的多语言代码执行
- Git 操作(状态、差异、提交、分支管理)
- 具有可配置工作区边界的安全控制
- 屏幕截图和屏幕上下文工具
- 图像处理工具
可用工具
基本文件操作
| 工具 | 参数 | 返回 |
|---|---|---|
| read_file | path: string | 文件内容 |
| read_multiple_files | paths: string[] | 带有标题的多个文件内容 |
| write_file | path: string, content: string | 成功确认 |
| move_file | source: string, destination: string | 成功确认 |
| delete_file | path: string | 成功确认 |
| get_file_info | path: string | 文件元数据(大小、时间戳、权限) |
常用用法:
# 读取文件
aidd-cli --tool read_file --args '{"path": "src/main.py"}'
# 写入文件
aidd-cli --tool write_file --args '{"path": "output.txt", "content": "Hello World"}'
# 获取文件信息
aidd-cli --tool get_file_info --args '{"path": "src/main.py"}'
复杂文件操作
edit_file
基于模式的文件编辑,支持预览:
{
"path": "src/main.py",
"edits": [
{
"oldText": "def old_function():",
"newText": "def new_function():"
}
],
"dryRun": false,
"options": {
"preserveIndentation": true,
"normalizeWhitespace": true,
"partialMatch": true
}
}
返回:更改的差异或在 dry run 模式下的预览。
目录操作
| 工具 | 参数 | 返回 |
|---|---|---|
| get_allowed_directory | none | 当前允许的目录路径 |
| update_allowed_directory | directory: string (绝对路径) | 成功确认 |
| list_directory | path: string | 目录内容列表 |
| create_directory | path: string | 成功确认 |
| search_files | pattern: string, path?: string, include_hidden?: boolean | 匹配的文件列表 |
directory_tree
生成完整的目录结构:
{
"path": "src",
"include_hidden": false
}
返回:目录内容的 JSON 树结构。
常用用法:
# 列出目录
aidd-cli --tool list_directory --args '{"path": "."}'
# 搜索 Python 文件
aidd-cli --tool search_files --args '{"pattern": ".py", "path": "src"}'
Git 操作
| 工具 | 参数 | 返回 |
|---|---|---|
| git_init | path: string, initial_branch?: string | 仓库初始化状态 |
| git_status | repo_path: string | 工作目录状态 |
| git_add | repo_path: string, files: string[] | 暂存确认 |
| git_reset | repo_path: string | 取消暂存确认 |
| git_checkout | repo_path: string, branch_name: string | 分支切换确认 |
复杂 Git 操作
git_commit
{
"repo_path": ".",
"message": "feat: add new feature"
}
返回:提交哈希和确认。
git_diff
{
"repo_path": ".",
"target": "main"
}
返回:详细的差异输出。
git_log
{
"repo_path": ".",
"max_count": 10
}
返回:包含哈希、作者、日期和消息的提交条目数组。
常用用法:
# 检查状态
aidd-cli --tool git_status --args '{"repo_path": "."}'
# 创建并切换到新分支
aidd-cli --tool git_create_branch --args '{"repo_path": ".", "branch_name": "feature/new-branch"}'
代码分析
tree_sitter_map
分析源代码结构:
{
"path": "src"
}
返回:
- 类及其方法
- 函数和参数
- 模块结构
- 代码组织统计信息
- 继承关系
支持的语言:
- Python (.py)
- JavaScript (.js, .jsx, .mjs, .cjs)
- TypeScript (.ts, .tsx)
- Java (.java)
- C++ (.cpp, .hpp, .cc)
- Ruby (.rb, .rake)
- Go (.go)
- Rust (.rs)
- PHP (.php)
- C# (.cs)
- Kotlin (.kt, .kts)
系统信息
| 工具 | 参数 | 返回 |
|---|---|---|
| get_system_info | none | 综合系统详细信息 |
返回:
{
"working_directory": "/path/to/project",
"system": {
"os", "os_version", "architecture", "python_version"
},
"wifi_network": "MyWiFi",
"cpu": {
"physical_cores", "logical_cores", "total_cpu_usage"
},
"memory": { "total", "available", "used_percentage" },
"disk": { "total", "free", "used_percentage" },
"mac_details": { // 仅在 macOS 上显示
"model": "Mac mini",
"chip": "Apple M2",
"serial_number": "XXX"
}
}
以清晰、可读的格式提供必要的系统信息。
# 获取系统信息
aidd-cli --tool get_system_info
屏幕上下文和图像工具
get_active_apps
返回用户系统上当前活动的应用程序列表。
{
"with_details": true
}
参数:
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| with_details | boolean | 否 | 是否包含有关每个应用程序的更多详细信息(默认值:false) |
返回:
{
"success": true,
"platform": "macos",
"app_count": 12,
"apps": [
{
"name": "Firefox",
"has_windows": true,
"window_count": 3,
"visible_windows": [
{ "name": "GitHub - Mozilla Firefox", "width": 1200, "height": 800 }
]
},
{
"name": "VSCode",
"has_windows": true
}
]
}
此工具提供有关用户系统上当前运行的应用程序的宝贵上下文,这有助于提供更相关的帮助。
get_available_windows
返回有关用户屏幕上当前显示的所有可用窗口的详细信息。
{}
返回:
{
"success": true,
"platform": "macos",
"count": 8,
"windows": [
{
"id": 42,
"title": "Document.txt - Notepad",
"app": "Notepad",
"visible": true
},
{
"title": "Terminal",
"app": "Terminal",
"visible": true,
"active": true
}
]
}
此工具帮助了解用户屏幕上可见的内容,并可用于上下文感知的帮助。
capture_screenshot
捕获用户屏幕或特定窗口的屏幕截图。
{
"output_path": "screenshots/capture.png",
"capture_mode": {
"type": "named_window",
"window_name": "Visual Studio Code"
}
}
参数:
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| output_path | string | 否 | 应该保存屏幕截图的路径(默认值:生成的路径) |
| capture_mode | object | 否 | 指定要捕获的内容 |
| capture_mode.type | string | 否 | 屏幕截图的类型:“full”、“active_window”或“named_window”(默认值:“full”) |
| capture_mode.window_name | string | 否 | 要捕获的窗口的名称(当类型为“named_window”时是必需的) |
返回:
{
"success": true,
"path": "/path/to/screenshots/capture.png"
}
此工具捕获屏幕截图,用于可视化、调试或上下文感知的帮助。
read_image_file
从文件系统读取图像文件,并将其内容作为 base64 编码的字符串返回。
{
"path": "images/logo.png"
}
参数:
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| path | string | 是 | 要读取的图像文件的路径 |
| max_size | integer | 否 | 最大文件大小(以字节为单位)(默认值:100MB) |
返回: 可以显示或处理的 Base64 编码的图像数据。
此工具支持常见的图像格式,如 PNG、JPEG、GIF 和 WebP,并自动调整图像大小以获得最佳观看效果。
代码执行
execute_code
使用安全措施和限制执行各种编程语言的代码。
{
"language": "python",
"code": "print('Hello, World!')",
"timeout": 5
}
支持的语言:
- Python (python3)
- JavaScript (Node.js)
- Ruby
- PHP
- Go
- Rust
参数:
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| language | string | 是 | 要使用的编程语言 |
| code | string | 是 | 要执行的代码 |
| timeout | integer | 否 | 最大执行时间(默认值:5 秒) |
用法示例:
# Python 示例
aidd-cli --tool execute_code --args '{
"language": "python",
"code": "print(sum(range(10)))"
}'
# JavaScript 示例
aidd-cli --tool execute_code --args '{
"language": "javascript",
"code": "console.log(Array.from({length: 5}, (_, i) => i*2))"
}'
# Ruby 示例
aidd-cli --tool execute_code --args '{
"language": "ruby",
"code": "puts (1..5).reduce(:+)"
}'
# Go 示例
aidd-cli --tool execute_code --args '{
"language": "go",
"code": "fmt.Println(\"Hello, Go!\")"
}'
要求:
- 必须安装相应的语言运行时
- 命令必须在系统 PATH 中可用
- 创建临时文件的适当权限
⚠️ 安全警告: 此工具在您的系统上执行任意代码。 始终:
- 在执行之前彻底审查代码
- 了解代码的目的和预期结果
- 永远不要执行不受信任的代码
- 注意潜在的系统影响
- 监控执行输出
execute_shell_script
使用安全措施和限制执行 shell 脚本 (bash/sh)。
{
"script": "echo \"Current directory:\" && pwd",
"timeout": 300
}
参数:
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| script | string | 是 | 要执行的 Shell 脚本 |
| timeout | integer | 否 | 最大执行时间(默认值:300 秒,最大值:600 秒) |
用法示例:
# 列出目录内容,包含详细信息
aidd-cli --tool execute_shell_script --args '{
"script": "ls -la"
}'
# 递归查找所有 Python 文件
aidd-cli --tool execute_shell_script --args '{
"script": "find . -name \"*.py\" -type f"
}'
# 包含多个命令的复杂脚本
aidd-cli --tool execute_shell_script --args '{
"script": "echo \"System Info:\" && uname -a && echo \"\nDisk Usage:\" && df -h"
}'
特性:
- 使用 /bin/sh 以获得跨系统的最大兼容性
- 在允许的目录中执行
- 单独的 stdout 和 stderr 输出
- 适当的错误处理和超时控制
⚠️ 安全警告: 此工具在您的系统上执行任意 shell 命令。 始终:
- 在执行之前彻底审查脚本
- 了解脚本的目的和预期结果
- 永远不要执行不受信任的脚本
- 注意潜在的系统影响
- 监控执行输出
配置
配置文件:~/.aidd/config.json
{
"allowed_directory": "/path/to/workspace"
}
CLI 用法
基本命令结构:
aidd-cli --tool <tool_name> --args '<json_arguments>'
# 列出可用工具
aidd-cli --list-tools
# 启用调试输出
aidd-cli --debug --tool <tool_name> --args '<json_arguments>'
调试
使用 MCP Inspector 进行调试:
npx @modelcontextprotocol/inspector run
安全
- 操作限制在配置的允许目录中
- 路径遍历预防
- 文件权限保留
- 安全操作处理
即将推出的功能
- GitHub 工具:
- PR 描述生成器
- 代码审查
- Actions 管理器
- Pivotal Tracker 工具:
- 故事生成器
- 故事管理器
开发状态
目前正在积极开发中。 功能和 API 可能会更改。
许可证
Apache License 2.0 - 参见 LICENSE
推荐服务器
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
mult-fetch-mcp-server
一个多功能的、符合 MCP 规范的网页内容抓取工具,支持多种模式(浏览器/Node)、格式(HTML/JSON/Markdown/文本)和智能代理检测,并提供双语界面(英语/中文)。
AIO-MCP Server
🚀 集成了 AI 搜索、RAG 和多服务(GitLab/Jira/Confluence/YouTube)的一体化 MCP 服务器,旨在增强 AI 驱动的开发工作流程。来自 Folk。
Knowledge Graph Memory Server
为 Claude 实现持久性记忆,使用本地知识图谱,允许 AI 记住用户的信息,并可在自定义位置存储,跨对话保持记忆。
Hyperbrowser
欢迎来到 Hyperbrowser,人工智能的互联网。Hyperbrowser 是下一代平台,旨在增强人工智能代理的能力,并实现轻松、可扩展的浏览器自动化。它专为人工智能开发者打造,消除了本地基础设施和性能瓶颈带来的麻烦,让您能够: