Aider MCP Server
Aider MCP-Server – experimentell
Modellkontextprotokollserver zum Auslagern von KI-Codierungsarbeiten an Aider, wodurch die Entwicklungseffizienz und -flexibilität verbessert wird.
Überblick
Dieser Server ermöglicht es Claude Code, KI-Programmieraufgaben an Aider, den besten Open-Source-KI-Programmierassistenten, auszulagern. Durch die Delegierung bestimmter Programmieraufgaben an Aider können wir Kosten senken, die Kontrolle über unser Programmiermodell gewinnen und Claude Code orchestrierter einsetzen, um Code zu überprüfen und zu überarbeiten.
Related MCP server: AiderMCP
Aufstellen
Klonen Sie das Repository:
git clone https://github.com/disler/aider-mcp-server.gitInstallieren Sie Abhängigkeiten:
uv syncErstellen Sie Ihre Umgebungsdatei:
cp .env.sample .envKonfigurieren Sie Ihre API-Schlüssel in der
.envDatei (oder verwenden Sie den Abschnitt „env“ von mcpServers), um den API-Schlüssel zu haben, der für das Modell erforderlich ist, das Sie in aider verwenden möchten:
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 moreKopieren Sie die
.mcp.json, füllen Sie sie im Stammverzeichnis Ihres Projekts aus und aktualisieren Sie--directory, sodass es auf das Stammverzeichnis dieses Projekts verweist, und--current-working-dirsodass es auf das Stammverzeichnis Ihres Projekts verweist.
{
"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
}
}
}
}Testen
Tests ausgeführt mit gemini-2.5-pro-exp-03-25
So führen Sie alle Tests aus:
uv run pytestSo führen Sie bestimmte Tests durch:
# 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.pyHinweis: Für die KI-Codierungstests ist ein gültiger API-Schlüssel für das Gemini-Modell erforderlich. Stellen Sie sicher, dass Sie ihn vor dem Ausführen der Tests in Ihrer .env Datei festlegen.
Fügen Sie diesen MCP-Server zu Claude Code hinzu
Hinzufügen mit gemini-2.5-pro-exp-03-25
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>"Hinzufügen mit gemini-2.5-pro-preview-03-25
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>"Hinzufügen mit quasar-alpha
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>"Hinzufügen mit llama4-maverick-instruct-basic
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>"Verwendung
Dieser MCP-Server bietet die folgenden Funktionen:
Übertragen Sie KI-Codierungsaufgaben auf Aider :
Nimmt eine Eingabeaufforderung und Dateipfade entgegen
Verwendet Aider, um die gewünschten Änderungen umzusetzen
Gibt Erfolg oder Misserfolg zurück
Liste der verfügbaren Modelle :
Stellt eine Liste von Modellen bereit, die einer Teilzeichenfolge entsprechen
Nützlich zum Entdecken unterstützter Modelle
Verfügbare Tools
Dieser MCP-Server stellt die folgenden Tools bereit:
1. aider_ai_code
Mit diesem Tool können Sie Aider ausführen, um KI-Codierungsaufgaben basierend auf einer bereitgestellten Eingabeaufforderung und angegebenen Dateien durchzuführen.
Parameter:
ai_coding_prompt(Zeichenfolge, erforderlich): Die Anweisung in natürlicher Sprache für die KI-Codierungsaufgabe.relative_editable_files(Liste von Zeichenfolgen, erforderlich): Eine Liste von Dateipfaden (relativ zumcurrent_working_dir), die Aider ändern darf. Falls eine Datei nicht existiert, wird sie erstellt.relative_readonly_files(Liste von Zeichenfolgen, optional): Eine Liste von Dateipfaden (relativ zumcurrent_working_dir), die Aider zum Kontext lesen, aber nicht ändern kann. Standardmäßig ist die Liste leer[].model(Zeichenfolge, optional): Das primäre KI-Modell, das Aider zur Codegenerierung verwenden soll. Standardmäßig ist der Wert"gemini/gemini-2.5-pro-exp-03-25"eingestellt. Mit dem Toollist_modelskönnen Sie weitere verfügbare Modelle finden.editor_model(Zeichenfolge, optional): Das KI-Modell, das Aider zum Bearbeiten/Verfeinern von Code verwenden soll, insbesondere im Architektenmodus. Falls nicht angegeben, kann je nach Aiders interner Logik das primäremodelverwendet werden. Standardmäßig „None.
Beispielverwendung (innerhalb einer MCP-Anfrage):
Claude Code-Eingabeaufforderung:
Use the Aider AI Code tool to: Refactor the calculate_sum function in calculator.py to handle potential TypeError exceptions.Ergebnis:
{
"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"
}
}Widerrufsfolgen:
Ein einfaches Diktat: {Erfolg, Unterschied}
success: Boolesch – Ob der Vorgang erfolgreich war.diff: Zeichenfolge – Der Unterschied der an der Datei vorgenommenen Änderungen.
2. list_models
Dieses Tool listet verfügbare, von Aider unterstützte KI-Modelle auf, die mit einer bestimmten Teilzeichenfolge übereinstimmen.
Parameter:
substring(Zeichenfolge, erforderlich): Die Teilzeichenfolge, nach der in den Namen der verfügbaren Modelle gesucht werden soll.
Beispielverwendung (innerhalb einer MCP-Anfrage):
Claude Code-Eingabeaufforderung:
Use the Aider List Models tool to: List models that contain the substring "gemini".Ergebnis:
{
"name": "list_models",
"parameters": {
"substring": "gemini"
}
}Widerrufsfolgen:
Eine Liste von Modellnamen, die mit der angegebenen Teilzeichenfolge übereinstimmen. Beispiel:
["gemini/gemini-1.5-flash", "gemini/gemini-1.5-pro", "gemini/gemini-pro"]
Architektur
Der Server ist wie folgt aufgebaut:
Serverebene : Behandelt die MCP-Protokollkommunikation
Atomschicht : Einzelne, reine Funktionskomponenten
Tools : Spezifische Funktionen (KI-Codierung, Auflistung von Modellen)
Utils : Konstanten und Hilfsfunktionen
Datentypen : Typdefinitionen mit Pydantic
Alle Komponenten werden gründlich auf Zuverlässigkeit getestet.
Codebasisstruktur
Das Projekt ist in die folgenden Hauptverzeichnisse und Dateien unterteilt:
.
├── 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 toolsrc/aider_mcp_server: Enthält den Hauptanwendungscode.atoms: Enthält die grundlegenden Bausteine. Diese sind als reine Funktionen oder einfache Klassen mit minimalen Abhängigkeiten konzipiert.tools: Jede Datei hier implementiert die Kernlogik für ein bestimmtes MCP-Tool (aider_ai_code,list_models).utils.py: Enthält gemeinsame Konstanten wie Standardmodellnamen.data_types.py: Definiert Pydantic-Modelle für Anforderungs-/Antwortstrukturen und stellt so die Datenvalidierung sicher.logging.py: Richtet ein konsistentes Protokollierungsformat für die Konsolen- und Dateiausgabe ein.
server.py: Orchestriert den MCP-Server. Es initialisiert den Server, registriert die im Verzeichnisatoms/toolsdefinierten Tools, verarbeitet eingehende Anfragen, leitet sie an die entsprechende Tool-Logik weiter und sendet Antworten gemäß dem MCP-Protokoll zurück.__main__.py: Stellt den Einstiegspunkt der Befehlszeilenschnittstelle (aider-mcp-server) bereit, analysiert Argumente wie--editor-modelund startet den inserver.pydefinierten Server.tests: Enthält Tests, die die Struktur dessrcVerzeichnisses widerspiegeln und sicherstellen, dass jede Komponente (insbesondere Atome) wie erwartet funktioniert.
Available Tools
2 toolsaider_ai_codeC
Run Aider to perform AI coding tasks based on the provided prompt and files
| Name | Required | Description | Default |
|---|---|---|---|
| ai_coding_prompt | Yes | The prompt for the AI to execute | |
| relative_editable_files | Yes | LIST of relative paths to files that can be edited | |
| relative_readonly_files | No | LIST of relative paths to files that can be read but not edited, add files that are not editable but useful for context | |
| model | No | The primary AI model Aider should use for generating code, leave blank unless model is specified in the request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Run Aider' implies execution and potential code modification, the description doesn't disclose critical behavioral traits: whether this tool makes permanent changes to files, what permissions are required, error handling, rate limits, or what happens when execution completes. For a tool that appears to modify code files, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that efficiently communicates the core functionality. Every word earns its place with no redundancy or unnecessary elaboration. It's appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that this appears to be a code execution/modification tool with no annotations, no output schema, and 4 parameters, the description is insufficiently complete. It doesn't explain what happens after execution, what the return values might be, error conditions, or safety considerations for a tool that presumably edits files. The single sentence description leaves too many important questions unanswered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the input schema already documents all 4 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. The baseline of 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Run Aider to perform AI coding tasks based on the provided prompt and files'. It specifies the verb ('Run Aider') and resource ('AI coding tasks'), but doesn't differentiate from its only sibling 'list_models', which is a different type of tool. The purpose is clear but lacks sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions. With a sibling tool 'list_models' available, there's no indication of when to choose one over the other or if they're complementary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsC
List available models that match the provided substring
| Name | Required | Description | Default |
|---|---|---|---|
| substring | No | Substring to match against available models |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions substring matching but fails to describe key behaviors like whether the list is paginated, if it includes metadata, what happens when no substring is provided, or any rate limits. This leaves significant gaps for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without any unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a list of model names, full details), behavioral traits like error handling, or usage context relative to the sibling tool. For a tool with no structured support, this leaves too many unknowns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'substring' fully documented in the schema. The description adds minimal value by implying substring matching but doesn't provide additional semantics beyond what the schema already states, such as case sensitivity or matching patterns.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('List') and resource ('available models'), and includes the filtering mechanism ('match the provided substring'). It distinguishes itself from a generic list operation by specifying substring matching, though it doesn't explicitly differentiate from the sibling tool 'aider_ai_code'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, such as the sibling 'aider_ai_code' or other potential model-related tools. It lacks context about prerequisites, exclusions, or specific scenarios where substring matching is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
aider_ai_code - First observed
list_models
TDQS
The two tools have completely distinct purposes with no overlap: aider_ai_code performs AI coding tasks, while list_models provides information about available models. An agent can easily differentiate between them based on their clear, separate functions.
The naming shows mixed conventions: aider_ai_code uses a descriptive compound name with underscores, while list_models follows a more standard verb_noun pattern. They are both readable but lack a unified naming style, indicating some inconsistency in the tool set.
With only 2 tools, the server feels thin for an AI coding assistant domain. While aider_ai_code is a core tool, the lack of additional tools for tasks like file management, code review, or configuration limits the server's scope and utility, making the count too low for effective coverage.
The tool surface is severely incomplete for an AI coding assistant. It includes a primary coding tool and a model listing, but lacks essential operations such as file manipulation, code analysis, or session management. This creates significant gaps that will hinder agent workflows and lead to dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
One identity across Claude Code, Codex, Cursor, Gemini, Windsurf: shared inbox and handoffs.
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to delegate coding tasks to local Ollama models, reducing API token usage by up to 98.75% while leveraging local compute resources. Supports code generation, review, refactoring, and file analysis with Claude providing oversight and quality assurance.20324AGPL 3.0
- FlicenseBqualityDmaintenanceEnables AI-powered code editing and development tasks through natural language conversations with Claude, using Aider's capabilities for improving code, adding features, fixing bugs, refactoring, and checking status.51-
- AlicenseAqualityBmaintenanceDelegate tasks from Claude Code to other models (Codex CLI, DeepSeek, OpenRouter, etc.) without leaving the app.219MIT
- AlicenseAqualityCmaintenanceEnables Claude Code to offload routine code generation and text processing tasks to a local Ollama LLM, saving Cloud API tokens and costs with automatic model selection and security features.11774Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/disler/aider-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server