MCP.so
Sign In

Aider MCP WebSocket Server

@larock22

Basic information

Category

Other

License

MIT license

Transports

stdio

Author

larock22

About Aider MCP WebSocket Server

WebSocket server that exposes Aider's AI coding capabilities through the Model Context Protocol (MCP) for programmatic access

Aider MCP WebSocket Server config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "aider-mcp": {
      "command": "python3",
      "args": [
        "test-debug.py"
      ]
    }
  }
}

Aider MCP WebSocket Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Aider MCP WebSocket Server?

A real MCP (Model Context Protocol) server that lets you control Aider programmatically via WebSocket, wrapping Aider’s functionality for use by editor plugins and services. It provides two server implementations: a standard MCP protocol server (recommended) and a custom WebSocket wrapper. It is for developers who want to send natural language commands to Aider from any MCP-compatible client, like Claude Desktop or custom apps.

How to use Aider MCP WebSocket Server?

Install dependencies with npm install, copy .env.example to .env and add your OpenAI API key. Start the recommended MCP server with npm run mcp, then connect via WebSocket using JSON-RPC 2.0. The server exposes tools such as aider_command, aider_add_file, and aider_run_command. Client code examples for WebSocket connection and tool calls are provided in the README.

Key features of Aider MCP WebSocket Server

  • Full MCP protocol support with standard JSON-RPC 2.0 methods
  • Multi-tenant isolation: one Aider child process per client
  • Automatic completion detection (waits for Aider to finish)
  • Isolated workspace directories per session
  • Real-time bidirectional WebSocket communication
  • Environment variable and CLI argument configuration

Use cases of Aider MCP WebSocket Server

  • Send natural language commands to create or edit code files
  • Add specific files to Aider’s context before executing commands
  • Run shell commands through Aider as part of a development workflow
  • Build editor plugins or services that programmatically control Aider
  • Integrate Aider into CI/CD pipelines or automated code review systems

Frequently asked questions

1

What prerequisites are needed?

Node.js 18+, Aider installed and available in PATH (`pip install aider-chat`), and an OpenAI API key.

2

How does the server handle multiple clients?

Each client gets an isolated workspace directory and a separate Aider process, ensuring session separation.

3

Is authentication supported?

The custom WebSocket wrapper supports token-based authentication via the `VALID_TOKENS` environment variable (empty means no auth). The MCP server does not mention authentication.

4

Where are created files stored?

Files are saved in directories under `workspaces/`, e.g., `workspaces/mcp-*/`. You can check them with `ls -la workspaces/`.

5

What if the server returns too quickly or gives incomplete responses?

The MCP server includes smart completion detection that waits for Aider to finish (using a 3-second silence detection), solving the problem of premature responses.

Comments

More Other MCP servers