aider_ai_codeLABSCO SUMMARY
Two roles instead of one: your assistant orchestrates, Aider writes.
The editable and read-only file lists are the part worth noticing — you decide exactly what the delegated model may touch, and everything else it needs is available for reading only. Because the diff comes back with the result, the calling assistant can review the change rather than take it on trust.
What it is
A server that offloads coding tasks to Aider. You give it an instruction and the files Aider is allowed to edit; it makes the change and returns whether it worked, along with the diff.
What you get
- A coding task carried out by Aider from a natural-language instruction, against the files you nominate as editable — files that do not exist yet are created (aider_ai_code)
- A separate read-only file list Aider may consult for context but must not modify
- The model chosen per call, so an expensive one can orchestrate while a cheaper one edits
- Success or failure plus the diff of what changed, returned to the caller
- The models Aider supports, searched by substring, when you are not sure what is available (list_models)
Requirements
An API key for whichever model provider you want Aider to use, supplied as environment settings or in a local environment file. Python with uv. The directory Aider operates in, and the editor model, are set when the server starts.
Setup effort
Build from source — git clone https://github.com/disler/aider-mcp-server.git
USE CASES
Delegating a mechanical refactor
Name the file, describe the change, and get the diff back to review.
Keeping the edit narrow
List the one file Aider may write and give it everything else as read-only context.
Scaffolding a file that does not exist yet
Name it as editable anyway — Aider creates it.
Picking a model for the job
Search the supported models by substring before committing to one.
2 tools
Listed in project docs. Your client may show a different list.
list_modelsBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- uv on PATH
- One API key, for the provider of the model you choose: GEMINI_API_KEY, OPENAI_API_KEY or ANTHROPIC_API_KEY (.env.sample lists more)
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/disler/aider-mcp-server.git
cd aider-mcp-server
uv sync
cp .env.sample .envConfigure your API keys in the .env file (or use the mcpServers "env" section) for the model you want Aider to use — GEMINI_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY, see .env.sample for more
Copy and fill out .mcp.json into the root of YOUR project, updating --directory to this clone's root and --current-working-dir to your project's root
Claude Code alternative to the JSON file: claude mcp add aider-mcp-server -s local -- uv --directory "<YOUR_PATH_TO_AIDER_MCP_SERVER_PROJECT>" run aider-mcp-server --editor-model "gemini/gemini-2.5-pro-exp-03-25" --current-working-dir "<YOUR_CURRENT_WORKING_DIR>" (this still requires the clone from step 1)
MCP Clients
Claude Code
claude mcp add aider-mcp-server -s local -- uv --directory "<YOUR_PATH_TO_AIDER_MCP_SERVER_PROJECT>" run aider-mcp-server --editor-model "gemini/gemini-2.5-pro-exp-03-25" --current-working-dir "<YOUR_CURRENT_WORKING_DIR>"Any MCP client
{
"mcpServers": {
"aider-mcp-server": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_PROJECT>",
"run",
"aider-mcp-server",
"--editor-model",
"gpt-4o",
"--current-working-dir",
"<YOUR_CURRENT_WORKING_DIR>"
],
"env": {
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Set --directory to your aider-mcp-server clone and --current-working-dir to the project Aider should edit. Keep only the API key for the provider of your --editor-model.