aider-mcp-server

theworksofvon/aider-mcp-server

3.1

If you are the rightful owner of aider-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Aider MCP Server is a Model Context Protocol server that integrates with the 'aider' AI coding assistant to facilitate code changes in projects.

Aider MCP Server

This is a Model Context Protocol (MCP) server that uses the aider AI coding assistant to apply code changes to your project. It acts as the "hands" in a "Brain and Hands" setup, where a client like Claude Code provides the "brain".

Setup and Configuration

To use this server, create a .mcp.json file in the root of the project you want to edit.

Example .mcp.json

{
  "mcpServers": {
    "my-aider-server": {
      "type": "stdio",
      "command": "python3",
      "args": [
        "-m",
        "aider_mcp_sdk_server.server",
        "--model",
        "gemini/gemini-1.5-pro-latest"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY",
        "PYTHONPATH": "/path/to/parent/of/aider_mcp_sdk_server"
      }
    }
  }
}

Configuration Notes:

  • "args":
    • The "--model" argument sets the default model aider will use. You can use any aider-compatible model string.
  • "env":
    • ..._API_KEY: Provide your API keys. aider automatically selects the correct one based on the model.
    • PYTHONPATH: This is important. If this server directory isn't inside your project, set this to the absolute path of the directory containing the aider_mcp_sdk_server folder.

Working with Claude Code

This server is designed to receive precise, imperative instructions from a "brain" model like Claude Code, not creative, high-level prompts.

The client should generate a specific ai_coding_prompt for the server to execute.

Example ai_coding_prompt from the "Brain":

Replace the entire content of the file tsconfig.json with the following new content.

{
  "compilerOptions": {
    "lib": ["ESNext"],
    "target": "ESNext",
    "module": "ESNext",
    // ... etc
  },
  "include": ["src/**/*"]
}