Provides a local MCP server that connects Claude and other clients to Aider for editing files, creating content, extracting code blocks, and git status.
Configuration
View docs{
"mcpServers": {
"sengokudaikon-aider-mcp-server": {
"command": "uvx",
"args": [
"aider-mcp"
],
"env": {
"REPO_PATH": "REPO_PATH placeholder",
"AIDER_PATH": "YOUR_AIDER_PATH",
"AIDER_ENV_FILE": "/home/user/.env",
"OPENAI_API_KEY": "sk-...",
"AIDER_CONFIG_FILE": "/home/user/.aider.conf.yml",
"AIDER_MCP_VERBOSE": "true",
"ANTHROPIC_API_KEY": "sk-..."
}
}
}
}You run an MCP server that lets Claude and other clients connect to Aider for efficient file editing, new file creation, code extraction from markdown, and quick access to git status. It provides a stable bridge between your editor-focused workflows and Aider’s editing capabilities, so you can automate common file edits from your MCP-enabled tools.
Start the MCP server to enable connections from your MCP clients. Run the server in stdio mode so clients like Claude Desktop or Cursor IDE can communicate directly with Aider.
Choose how you want to run the server. The recommended approach is to start it through the runtime launcher, which exposes the MCP endpoint to your client tools.
Prerequisites: ensure you have Python 3.8 or higher installed on your system.
Install the MCP server package and run the server in one of the supported ways.
Using UV (recommended) components, run the server directly with uvx to avoid a separate installation step.
# 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-mcpAlternatively, install via Python’s package manager and run the server from the installed package.
pip install aider-mcp
aider-mcpYou can optionally customize the run with repository paths, custom Aider paths, or environment variables as needed.
uvx aider-mcp
uvx aider-mcp --repo-path=/path/to/your/repo
uvx aider-mcp --aider-path=/path/to/aider
REPO_PATH=/path/to/your/repo uvx aider-mcpThe server supports a range of environment variables to tailor its behavior and to pass your Aider and API keys.
Common variables include:
AIDER_PATH: Path to the Aider executable
REPO_PATH: Path to the git repository
AIDER_CONFIG_FILE: Path to a custom Aider config file
AIDER_ENV_FILE: Path to a custom .env file
AIDER_MCP_VERBOSE: Enable verbose logging
OPENAI_API_KEY: Your OpenAI API key
ANTHROPIC_API_KEY: Your Anthropic API keyConnect Claude Desktop by configuring an MCP server entry that runs the runtime launcher with the appropriate repo path.
For Cursor IDE, add a new MCP server using the command runner with the repo path configured.
You can leverage Aider’s configuration system to customize behavior through .aider.conf.yml files and .env files located in your home directory, the repository root, or the current directory.
Environment variables and custom options can be loaded from these locations to influence how edits are performed.
Prompt examples you can use after you connect:
This MCP server exposes a set of directory-based tools to edit files, create new files, inspect git status, extract code blocks, check Aider installation, and view configuration details.
Make targeted code changes in a specified directory by providing detailed instructions. This tool automatically accepts changes with a yes-always flow.
Create new files with content in a specified directory. You can add multiple files and optionally commit them to git.
Retrieve the git status of a given repository directory to see modified, added, deleted, and untracked files.
Extract code blocks from markdown or text and optionally save them to files while preserving language information.
Check Aider installation and environment status, including API keys and configuration presence.
Display detailed Aider configuration information and the sources in use.