Overview
Self-host the CodeAlive MCP server for complete control over your deployment. The MCP server can be deployed using Docker or from source code.Prerequisites
- CodeAlive API key from app.codealive.ai
- Docker (for container deployment) or Python 3.11+ (for source deployment)
Docker Deployment
The easiest way to self-host CodeAlive MCP:Docker Compose
Createdocker-compose.yml:
Source Code Deployment
Deploy from the GitHub repository:Custom Port
To run on a different port:Connecting to Self-Hosted Instance
Once your server is running, configure your AI assistant to use the local URL:For Docker
For Custom Port
For Self-Hosted CodeAlive Backend
If you’re running a self-hosted CodeAlive instance (not just the MCP server), configure the base URL:Docker
Source Code
Set additional environment variable:https://host is preferred. https://host/api is also accepted and normalized automatically by the latest MCP server and Claude Desktop extension.
Basic Troubleshooting
Container won't start
Container won't start
Check:
- API key is correctly set
- Port 8000 is not already in use
- Docker daemon is running
Connection refused
Connection refused
Check:
- Server is running:
docker psor check Python process - Correct URL in your AI assistant configuration
- Firewall allows connections to the port
Authentication failures
Authentication failures
Check:
- API key is valid and active
- Environment variable is set correctly
- For self-hosted backend, verify base URL is correct
WSL2 Networking
This section applies when the MCP server runs inside WSL2 and you connect from Windows-side clients (Claude Desktop, Cursor, VS Code, etc.).
localhost inside WSL2 is not the same as localhost on Windows. HTTP MCP servers listening on 127.0.0.1 inside WSL2 won’t be reachable from Windows clients.
Fix 1: Enable mirrored networking (Windows 11 22H2+)
Add to %USERPROFILE%\.wslconfig:
localhost is shared between Windows and WSL2 — http://localhost:8000/api works from both sides.
Fix 2: Use WSL2 VM IP
Run inside WSL:
localhost: