Aider MCP Server

Aider MCP Server

site icon
2025.03.28 3
PythonAI 辅助编程代码库管理自动化文件编辑开发环境配置开发效率
Aider MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,旨在连接 Claude 等 MCP 客户端与 Aider 工具,提供高效的文件编辑能力。它通过标准化的 MCP 接口,使 AI 助手能够编辑现有文件、创建新文件、提取代码块、获取 git 状态信息、检查 Aider 安装状态以及访问配置系统。
View on GitHub

Overview

基本能力

产品定位

Aider MCP Server 是一个桥梁服务,连接 AI 助手(如 Claude)与 Aider 的文件编辑功能,提供标准化的接口。

核心功能

  • 编辑现有文件
  • 创建新文件
  • 从 Markdown 文本中提取代码块
  • 获取 git 状态信息
  • 检查 Aider 安装状态
  • 访问和使用 Aider 的配置系统

适用场景

  • AI 辅助编程
  • 代码库管理
  • 自动化文件编辑
  • 开发环境配置

工具列表

  • edit_files: 在指定目录中编辑文件
  • create_files: 在指定目录中创建新文件
  • git_status: 获取指定目录的 git 状态
  • extract_code: 从 Markdown 或文本中提取代码块
  • aider_status: 检查 Aider 安装和环境状态
  • aider_config: 获取详细的 Aider 配置信息

常见问题解答

  • 如何调试?使用 MCP inspector 进行调试
  • 如何配置?通过 .aider.conf.yml.env 文件进行配置

使用教程

使用依赖

  • Python 3.8 或更高版本
  • Aider 安装 (pip install aider-chat)
  • OpenAI 或 Anthropic 的 API 密钥
  • Git 仓库

安装教程

使用 UV (推荐)

curl -fsSL https://astral.sh/uv/install.sh | bash
uvx aider-mcp

使用 PIP

pip install aider-mcp
aider-mcp

调试方式

npx @modelcontextprotocol/inspector uvx aider-mcp
npx @modelcontextprotocol/inspector uvx aider-mcp --repo-path=/path/to/your/repo
npx @modelcontextprotocol/inspector python -m aider_mcp

许可证

该项目遵循 Unlicense 开源许可条款,请参阅 Unlicense 了解完整条款。