Aider

by disler

110 stars
277 downloads
Not rated
GitHub

About

Aider MCP Server offloads AI coding tasks to Aider's specialized implementation, reducing costs and enhancing development efficiency through natural language code changes and model selection.

Details

Author
disler
Repository
disler/aider-mcp-server
GitHub stars
110
Downloads
277
Categories
Developer Tools, AI, Productivity, Search, Project Management, Infrastructure, Other

- Offloads AI coding tasks from Claude Code to Aider.
- Uses the aider_ai_code tool with prompt and file paths.
- Lists available models matching a substring via list_models.
- Supports multiple AI model providers (OpenAI, Anthropic, Gemini, etc.).
- Configurable editor model for separate coding and editing.
- Operates over stdio transport with environment-based API keys.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Aider
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 <path to this project>
    • Argument 3 run
    • Argument 4 aider-mcp-server
    • Argument 5 --editor-model
    • Argument 6 gpt-4o
    • Argument 7 --current-working-dir
    • Argument 8 <path to your project>
    Environment
    • GEMINI_API_KEY <your gemini api key>
    • OPENAI_API_KEY <your openai api key>
    • ANTHROPIC_API_KEY <your anthropic api key>

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

0. Clone the repository:

git clone https://github.com/disler/aider-mcp-server.git

1. Install dependencies:

uv sync

2. Create your environment file:

cp .env.sample .env

3. Configure your API keys in the .env file (or use the mcpServers "env" section) to have the api key needed for the model you want to use in aider:

GEMINI_API_KEY=your_gemini_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
...see .env.sample for more

4. Copy and fill out the the .mcp.json into the root of your project and update the --directory to point to this project's root directory and the --current-working-dir to point to the root of your project.

{
  "mcpServers": {
    "aider-mcp-server": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "--directory",
        "<path to this project>",
        "run",
        "aider-mcp-server",
        "--editor-model",
        "gpt-4o",
        "--current-working-dir",
        "<path to your project>"
      ],
      "env": {
        "GEMINI_API_KEY": "<your gemini api key>",
        "OPENAI_API_KEY": "<your openai api key>",
        "ANTHROPIC_API_KEY": "<your anthropic api key>",
        ...see .env.sample for more
      }
    }
  }
}

aider_ai_code

Run Aider to perform AI coding tasks based on a provided prompt and specified files. Parameters: ai_coding_prompt (string, required), relative_editable_files (list of strings, required), relative_readonly_files (list of strings, optional), model (string, optional), editor_model (string, optional)

list_models

List available AI models supported by Aider that match a given substring. Parameters: substring (string, required)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "aider": {
            "env": {
                "GEMINI_API_KEY": "<your gemini api key>",
                "OPENAI_API_KEY": "<your openai api key>",
                "ANTHROPIC_API_KEY": "<your anthropic api key>"
            },
            "args": [
                "--directory",
                "<path to this project>",
                "run",
                "aider-mcp-server",
                "--editor-model",
                "gpt-4o",
                "--current-working-dir",
                "<path to your project>"
            ],
            "command": "uv"
        }
    }
}

Linux

{
    "env": {
        "GEMINI_API_KEY": "<your gemini api key>",
        "OPENAI_API_KEY": "<your openai api key>",
        "ANTHROPIC_API_KEY": "<your anthropic api key>"
    },
    "args": [
        "--directory",
        "<path to this project>",
        "run",
        "aider-mcp-server",
        "--editor-model",
        "gpt-4o",
        "--current-working-dir",
        "<path to your project>"
    ],
    "command": "uv"
}

Macos

{
    "env": {
        "GEMINI_API_KEY": "<your gemini api key>",
        "OPENAI_API_KEY": "<your openai api key>",
        "ANTHROPIC_API_KEY": "<your anthropic api key>"
    },
    "args": [
        "--directory",
        "<path to this project>",
        "run",
        "aider-mcp-server",
        "--editor-model",
        "gpt-4o",
        "--current-working-dir",
        "<path to your project>"
    ],
    "command": "uv"
}

Windows

{
    "env": {
        "GEMINI_API_KEY": "<your gemini api key>",
        "OPENAI_API_KEY": "<your openai api key>",
        "ANTHROPIC_API_KEY": "<your anthropic api key>"
    },
    "args": [
        "/c",
        "uv",
        "--directory",
        "<path to this project>",
        "run",
        "aider-mcp-server",
        "--editor-model",
        "gpt-4o",
        "--current-working-dir",
        "<path to your project>"
    ],
    "command": "cmd"
}

An MCP server for offloading AI coding tasks to Aider, enhancing development efficiency and flexibility.

Model context protocol server for offloading AI coding work to Aider, enhancing development efficiency and flexibility.

This server allows Claude Code to offload AI coding tasks to Aider, the best open source AI coding assistant. By delegating certain coding tasks to Aider, we can reduce costs, gain control over our coding model and operate Claude Code in a more orchestrative way to review and revise code.

git clone https://github.com/disler/aider-mcp-server.git

- Configure your API keys in the.envfile (or use the mcpServers "env" section) to have the api key needed for the model you want to use in aider:

GEMINI_API_KEY=your_gemini_api_key_here OPENAI_API_KEY=your_openai_api_key_here ANTHROPIC_API_KEY=your_anthropic_api_key_here ...see .env.sample for more

- Copy and fill out the the.mcp.jsoninto the root of your project and update the--directoryto point to this project's root directory and the--current-working-dirto point to the root of your project.

{ "mcpServers": { "aider-mcp-server": { "type": "stdio", "command": "uv", "args": [ "--directory", "<path to this project>", "run", "aider-mcp-server", "--editor-model", "gpt-4o", "--current-working-dir", "<path to your project>" ], "env": { "GEMINI_API_KEY": "<your gemini api key>", "OPENAI_API_KEY": "<your openai api key>", "ANTHROPIC_API_KEY": "<your anthropic api key>", ...see .env.sample for more } } } }
# Test listing models uv run pytest src/aider_mcp_server/tests/atoms/tools/test_aider_list_models.py # Test AI coding uv run pytest src/aider_mcp_server/tests/atoms/tools/test_aider_ai_code.py

Note: The AI coding tests require a valid API key for the Gemini model. Make sure to set it in your.envfile before running the tests.

claude mcp add aider-mcp-server -s local \ -- \ uv --directory "<path to the aider mcp server project>" \ run aider-mcp-server \ --editor-model "gemini/gemini-2.5-pro-exp-03-25" \ --current-working-dir "<path to your project>"
claude mcp add aider-mcp-server -s local \ -- \ uv --directory "<path to the aider mcp server project>" \ run aider-mcp-server \ --editor-model "gemini/gemini-2.5-pro-preview-03-25" \ --current-working-dir "<path to your project>"
claude mcp add aider-mcp-server -s local \ -- \ uv --directory "<path to the aider mcp server project>" \ run aider-mcp-server \ --editor-model "openrouter/openrouter/quasar-alpha" \ --current-working-dir "<path to your project>"
claude mcp add aider-mcp-server -s local \ -- \ uv --directory "<path to the aider mcp server project>" \ run aider-mcp-server \ --editor-model "fireworks_ai/accounts/fireworks/models/llama4-maverick-instruct-basic" \ --current-working-dir "<path to your project>"

This MCP server provides the following functionalities:

- Takes a prompt and file paths
- Uses Aider to implement the requested changes
- Returns success or failure

- Provides a list of models matching a substring
- Useful for discovering supported models

This MCP server exposes the following tools:

This tool allows you to run Aider to perform AI coding tasks based on a provided prompt and specified files.

- ai_coding_prompt(string, required): The natural language instruction for the AI coding task.
- relative_editable_files(list of strings, required): A list of file paths (relative to thecurrent_working_dir) that Aider is allowed to modify. If a file doesn't exist, it will be created.
- relative_readonly_files(list of strings, optional): A list of file paths (relative to thecurrent_working_dir) that Aider can read for context but cannot modify. Defaults to an empty list[].
- model(string, optional): The primary AI model Aider should use for generating code. Defaults to"gemini/gemini-2.5-pro-exp-03-25". You can use thelist_modelstool to find other available models.
- editor_model(string, optional): The AI model Aider should use for editing/refining code, particularly when using architect mode. If not provided, the primarymodelmight be used depending on Aider's internal logic. Defaults toNone.

Use the Aider AI Code tool to: Refactor the calculate_sum function in calculator.py to handle potential TypeError exceptions.
{ "name": "aider_ai_code", "parameters": { "ai_coding_prompt": "Refactor the calculate_sum function in calculator.py to handle potential TypeError exceptions.", "relative_editable_files": ["src/calculator.py"], "relative_readonly_files": ["docs/requirements.txt"], "model": "openai/gpt-4o" } }

- A simple dict: {success, diff}

- success: boolean - Whether the operation was successful.
- diff: string - The diff of the changes made to the file.

This tool lists available AI models supported by Aider that match a given substring.

- substring(string, required): The substring to search for within the names of available models.

Use the Aider List Models tool to: List models that contain the substring "gemini".
{ "name": "list_models", "parameters": { "substring": "gemini" } }

- A list of model name strings that match the provided substring. Example:["gemini/gemini-1.5-flash", "gemini/gemini-1.5-pro", "gemini/gemini-pro"]

- Server layer: Handles MCP protocol communication
- Atoms layer: Individual, pure functional components

- Tools: Specific capabilities (AI coding, listing models)
- Utils: Constants and helper functions
- Data Types: Type definitions using Pydantic

All components are thoroughly tested for reliability.

The project is organized into the following main directories and files:

. ├── ai_docs # Documentation related to AI models and examples │ ├── just-prompt-example-mcp-server.xml │ └── programmable-aider-documentation.md ├── pyproject.toml # Project metadata and dependencies ├── README.md # This file ├── specs # Specification documents │ └── init-aider-mcp-exp.md ├── src # Source code directory │ └── aider_mcp_server # Main package for the server │ ├── __init__.py # Package initializer │ ├── __main__.py # Main entry point for the server executable │ ├── atoms # Core, reusable components (pure functions) │ │ ├── __init__.py │ │ ├── data_types.py # Pydantic models for data structures │ │ ├── logging.py # Custom logging setup │ │ ├── tools # Individual tool implementations │ │ │ ├── __init__.py │ │ │ ├── aider_ai_code.py # Logic for the aider_ai_code tool │ │ │ └── aider_list_models.py # Logic for the list_models tool │ │ └── utils.py # Utility functions and constants (like default models) │ ├── server.py # MCP server logic, tool registration, request handling │ └── tests # Unit and integration tests │ ├── __init__.py │ └── atoms # Tests for the atoms layer │ ├── __init__.py │ ├── test_logging.py # Tests for logging │ └── tools # Tests for the tools │ ├── __init__.py │ ├── test_aider_ai_code.py # Tests for AI coding tool │ └── test_aider_list_models.py # Tests for model listing tool

- src/aider_mcp_server: Contains the main application code.

- atoms: Holds the fundamental building blocks. These are designed to be pure functions or simple classes with minimal dependencies.

- tools: Each file here implements the core logic for a specific MCP tool (aider_ai_code,list_models).
- utils.py: Contains shared constants like default model names.
- data_types.py: Defines Pydantic models for request/response structures, ensuring data validation.
- logging.py: Sets up a consistent logging format for console and file output.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.

Supercharge your Agent with Semantic Code Intelligence and save 💰 in the process!

AI-to-AI code review platform — Claude, Codex, and Gemini cross-check each other via MCP, REST API, and CLI for consensus-based results.

A code sandbox for AI assistants to safely execute arbitrary code. Requires a 302AI API key for authentication.

Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.

MCP server to dynamically load Claude Code skills into AI agents

MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.

Exposes local execution of Aider commands as a detached process using MCP.

Assists AI developers with requirement clarification, module design, and technical architecture.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.