
sengokudaikon/aider-mcp-server 是从 https://github.com/sengokudaikon/aider-mcp-server. 导入的 MCP 服务器候选
概览
sengokudaikon/aider-mcp-server 是从 https://github.com/sengokudaikon/aider-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,允许Claude和其他MCP客户端连接到Aider,实现高效的文件编辑能力。
概述
该MCP服务器弥合了Claude等AI助手与Aider强大文件编辑能力之间的桥梁。它通过模型上下文协议提供标准化界面,使Claude能够:
- 利用 Aider 的功能编辑现有文件
- 创建包含内容的新文件
- 从 markdown 文本中提取代码块
- 获取 git 状态信息
- 检查辅助器安装状态
- 访问并使用 Aider 的配置系统
先修条件
- Python 3.8 或更高版本
- 安装辅助器(
pip install aider-chat) - OpenAI 或 Anthropic 的 API 密钥(取决于你希望 Aider 使用哪种模型)
- 用于文件编辑的 Git 仓库
安装
您可以通过多种方式安装Aider MCP服务器:
使用紫外线(推荐)
如果你装了紫外线:
使用 PIP
用途
Aider MCP 服务器默认以 MCP 协议模式运行于 stdio,该模式设计用于直接与 Claude Desktop 和 Cursor IDE 等 MCP 客户端集成。
命令行选项
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Aider MCP Server
A Model Context Protocol (MCP) server that allows Claude and other MCP clients to connect to Aider for efficient file editing capabilities.
Overview
This MCP server bridges the gap between AI assistants like Claude and Aider’s powerful file editing capabilities. It provides a standardized interface through the Model Context Protocol, allowing Claude to:
- Edit existing files using Aider’s capabilities
- Create new files with content
- Extract code blocks from markdown text
- Get git status information
- Check Aider installation status
- Access and use Aider’s configuration system
Prerequisites
- Python 3.8 or higher
- Aider installed (
pip install aider-chat) - An API key for OpenAI or Anthropic (depending on which model you want Aider to use)
- Git repository for file editing
Installation
You can install the Aider MCP server in several ways:
Using UV (Recommended)
If you have uv installed:
# Install uv if you don't have it
curl -fsSL https://astral.sh/uv/install.sh | bash
# Run directly with uvx (no installation required)
uvx aider-mcp
Using PIP
# Install the package
pip install aider-mcp
# Run the server
aider-mcp
Usage
The Aider MCP server runs in MCP protocol mode over stdio by default, which is designed for direct integration with MCP clients like Claude Desktop and Cursor IDE.
# Run directly with uvx (recommended)
uvx aider-mcp
# With repository path specified
uvx aider-mcp --repo-path=/path/to/your/repo
# With custom Aider executable path
uvx aider-mcp --aider-path=/path/to/aider
# With environment variables
REPO_PATH=/path/to/your/repo uvx aider-mcp
Command Line Options
You can customize the server with these environment variables or command-line arguments:
--aider-path: Path to the Aider executable (default: “aider”, automatically searches PATH)--repo-path: Path to the git repository (default: current directory)--config-file: Path to a custom Aider config file--env-file: Path to a custom .env file--verbose,-v: Enable verbose output
Client Configuration
Claude Desktop
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"aider-mcp": {
"command": "uvx",
"args": [
"aider-mcp",
"--repo-path", "/path/to/your/repo"
]
}
}
}
Cursor IDE
To integrate with Cursor IDE:
- Open Cursor Settings
- Navigate to
Features>MCP Servers - Click
Add new MCP server - Enter this configuration:
name: aider-mcp type: command command: uvx aider-mcp --repo-path=/path/to/your/repo - After configuring, ensure you’re in Agent mode in the Composer to use MCP tools
Aider Configuration Support
This MCP server supports Aider’s configuration system, allowing you to:
- Use configuration from
.aider.conf.ymlfiles in:
安装
uvx aider-mcp --repo-path /path/to/your/repo配置
{
"mcpServers": {
"aider-mcp": {
"command": "uvx",
"args": [
"aider-mcp",
"--repo-path", "/path/to/your/repo"
]
}
}
}