You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+119Lines changed: 119 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1356,6 +1356,124 @@ mcp:
1356
1356
}
1357
1357
```
1358
1358
1359
+
### 🤖 Claude Server
1360
+
1361
+
An MCP server for controlling Claude Code CLI sessions asynchronously. Start sessions, monitor progress, retrieve logs, and manage multiple concurrent Claude Code processes. It follows the same pattern as the opencode MCP server but is specifically designed for Claude Code.
1362
+
1363
+
**Features:**
1364
+
- Background task delegation to Claude Code
1365
+
- Async session management with unique session IDs
1366
+
- Start Claude Code sessions with full command-line option support
1367
+
- Monitor session status (starting, running, completed, failed, stopped)
1368
+
- Retrieve stdout/stderr logs from sessions
1369
+
- Stop running sessions gracefully
1370
+
- List all sessions with filtering by status
1371
+
- Tool restrictions via `--allowedTools` and `--tools` flags
1372
+
- Environment passthrough to Claude subprocesses
1373
+
- Configurable concurrent session limits
1374
+
- Automatic log cleanup based on retention policy
1375
+
1376
+
**Tools:**
1377
+
- `start_session`- Start a new Claude session with a prompt and options
1378
+
- `get_session_status`- Get the current status of a session by ID
1379
+
- `get_session_logs`- Retrieve stdout and stderr logs from a session
1380
+
- `stop_session`- Stop a running session
1381
+
- `list_sessions`- List all sessions with optional status filtering
1382
+
1383
+
**Configuration:**
1384
+
- `CLAUDE_SESSION_DIR` - Directory for session state and logs (default: `/tmp/claude-sessions`)
1385
+
- `CLAUDE_BINARY` - Path to Claude binary (default: `claude`)
1386
+
- `CLAUDE_MAX_SESSIONS` - Maximum number of concurrent sessions (default: `10`)
1387
+
- `CLAUDE_LOG_RETENTION_HOURS` - Hours to retain session logs before cleanup (default: `24`)
1388
+
- `CLAUDE_WORK_DIR` - Working directory for Claude processes (default: `/root`)
1389
+
- `CLAUDE_MODEL`- Default model to use (e.g., `sonnet`, `opus`)
1390
+
- `CLAUDE_AGENT`- Specify an agent for sessions
1391
+
- `CLAUDE_FORMAT` - Output format (default: `json`)
1392
+
- `CLAUDE_SHARE`- Whether to share sessions (`true`/`false`)
1393
+
- `CLAUDE_ATTACH`- Files to attach to sessions
1394
+
- `CLAUDE_PORT`- Port for remote control
1395
+
- `CLAUDE_VARIANT`- Model variant
1396
+
- `CLAUDE_ALLOWED_TOOLS`- Tools allowed without prompting (e.g., `"Bash,Read,Edit"`)
1397
+
- `CLAUDE_TOOLS`- Restrict which tools Claude can use (e.g., `"Bash,Read,Edit"`)
1398
+
- `CLAUDE_TOOL_START_SESSION_NAME`- Override the start_session tool name
1399
+
- `CLAUDE_TOOL_GET_SESSION_STATUS_NAME`- Override the get_session_status tool name
1400
+
- `CLAUDE_TOOL_GET_SESSION_LOGS_NAME`- Override the get_session_logs tool name
1401
+
- `CLAUDE_TOOL_STOP_SESSION_NAME`- Override the stop_session tool name
1402
+
- `CLAUDE_TOOL_LIST_SESSIONS_NAME`- Override the list_sessions tool name
claude mcp add claude-mcp -- npx -y mudler/MCPs/claude
1449
+
```
1450
+
1451
+
**Docker Image:**
1452
+
```bash
1453
+
docker run -e CLAUDE_MAX_SESSIONS=5 -e CLAUDE_LOG_RETENTION_HOURS=48 ghcr.io/mudler/mcps/claude:latest
1454
+
```
1455
+
1456
+
**LocalAI configuration (to add to the model config):**
1457
+
```yaml
1458
+
mcp:
1459
+
stdio: |
1460
+
{
1461
+
"mcpServers": {
1462
+
"claude": {
1463
+
"command": "docker",
1464
+
"env": {
1465
+
"CLAUDE_MAX_SESSIONS": "5",
1466
+
"CLAUDE_LOG_RETENTION_HOURS": "48"
1467
+
},
1468
+
"args": [
1469
+
"run", "-i", "--rm",
1470
+
"ghcr.io/mudler/mcps/claude:master"
1471
+
]
1472
+
}
1473
+
}
1474
+
}
1475
+
```
1476
+
1359
1477
### 🚀 Opencode Server
1360
1478
1361
1479
An MCP server for controlling opencode AI sessions asynchronously. Start sessions, monitor progress, retrieve logs, and manage multiple concurrent opencode processes.
@@ -1510,6 +1628,7 @@ make MCP_SERVER=localrecall build
0 commit comments