Codeman — Claude Code MCP server: drive agent sessions
An MCP server that lets one agent start sessions in other CLI tools, send them prompts and collect the answers.
claude mcp add codeman -e CODEMAN_API_URL=<CODEMAN_API_URL> -e CODEMAN_PASSWORD=<CODEMAN_PASSWORD> -- npx -y aicodemanWhat Codeman does
Codeman is a self-hosted control panel for coding agents. It keeps Claude, Codex, Gemini and other CLIs alive inside tmux sessions, streams the terminal to a browser, and re-prompts an agent that went idle or hit a subscription limit. The MCP server is one way in: it exposes verbs for starting a worker, prompting it, waiting and reading back the result.
The server itself runs as npx -y aicodeman over stdio. Two environment variables are required — CODEMAN_API_URL and CODEMAN_PASSWORD. Neither has a fallback, so bring up codeman web first and take the address and password from there.
It plugs into Claude, Codex, Cursor, GitHub Copilot and Gemini CLI. Cursor and Copilot take a JSON block in their config; the rest use an mcp add command. The dashboard binds to loopback by default, so a local setup points CODEMAN_API_URL at http://localhost:3000.
What it helps with
- start a worker in another CLI and wait for its reply
- push a prompt into a session that is already running
- gather output from several agents in one place
- keep an agent alive in a persistent tmux session across network drops
- survive a subscription limit reset without restarting by hand
Example prompts for the agent
- Start a Claude session through Codeman and have it write a test report
- Send the Codex session a prompt to refactor the
authmodule and wait for the answer - List the agents currently running in Codeman
How to install Codeman
Platform CLI
claude mcp add codeman -e CODEMAN_API_URL=<CODEMAN_API_URL> -e CODEMAN_PASSWORD=<CODEMAN_PASSWORD> -- npx -y aicodemanReplace <…> with your own values
Platform CLI
codex mcp add codeman --env CODEMAN_API_URL=<CODEMAN_API_URL> --env CODEMAN_PASSWORD=<CODEMAN_PASSWORD> -- npx -y aicodemanReplace <…> with your own values
Config file
{
"mcpServers": {
"codeman": {
"command": "npx",
"args": [
"-y",
"aicodeman"
],
"env": {
"CODEMAN_API_URL": "<CODEMAN_API_URL>",
"CODEMAN_PASSWORD": "<CODEMAN_PASSWORD>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"codeman": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"aicodeman"
],
"env": {
"CODEMAN_API_URL": "<CODEMAN_API_URL>",
"CODEMAN_PASSWORD": "<CODEMAN_PASSWORD>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e CODEMAN_API_URL=<CODEMAN_API_URL> -e CODEMAN_PASSWORD=<CODEMAN_PASSWORD> codeman npx -y aicodemanReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Codeman
How do I install Codeman in Claude Code?
Run claude mcp add codeman -e CODEMAN_API_URL=<CODEMAN_API_URL> -e CODEMAN_PASSWORD=<CODEMAN_PASSWORD> -- npx -y aicodeman, replacing the placeholders with your dashboard address and password.
What does Codeman do?
It holds sessions of several agent CLIs in tmux, shows their terminal in a browser, and lets one agent launch others, prompt them and read their output.
What does the Codeman MCP server need to run?
The dashboard address in CODEMAN_API_URL and the password in CODEMAN_PASSWORD. The server starts with npx -y aicodeman over stdio.