mcp-claude-code
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-claude-code Run the test suite, fix any failures, and summarize what changed."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-claude-code
An MCP server that drives the Claude Code CLI in headless mode, so any MCP client (Claude Desktop, Antigravity, Cursor, another agent…) can delegate coding tasks to Claude Code, resume sessions, inspect context usage and read account limits.
Requirements
Node.js 18+
Claude Code installed and logged in (
claudeonPATH, or setCLAUDE_BIN)
Related MCP server: Claude Code Manager WAN
Install
git clone https://github.com/<owner>/mcp-claude-code.git
cd mcp-claude-code
npm installClient configuration
{
"mcpServers": {
"claude-code": {
"command": "node",
"args": ["/path/to/mcp-claude-code/server.mjs"],
"env": {
"WORKSPACE_DIR": "/path/to/your/project"
}
}
}
}Tools
Tool | Arguments | Description |
|
| Runs a task with |
|
| Reads the session JSONL under |
|
| Lists the most recent sessions with initial prompt, model and context usage. Optionally filtered by project directory. |
|
| Sends |
| — | Live 5-hour and weekly quota (% used/remaining, reset times) captured from Claude Code |
|
| Reads or updates the default model/effort used when |
⚠️
permissionModedefaults tobypassPermissions(--dangerously-skip-permissions). Only point this server at workspaces where unattended command execution is acceptable, or pass a stricter mode.
Environment variables
See .env.example. All are optional.
Variable | Default | Purpose |
| server | Default working directory for tasks |
| auto-detected | Path to the |
|
| Persisted defaults from |
|
| Quota telemetry cache |
|
| Locale for reset-time formatting |
Optional remote SSH worker
By default every task runs locally. Set CLAUDE_REMOTE_SSH_HOST to run tasks on another machine over SSH instead:
Variable | Default | Purpose |
| (unset → disabled) | SSH host or |
|
| Claude Code binary on the remote host |
| local | Working directory on the remote host |
|
|
|
|
| Forward the local |
|
|
|
If the SSH connection fails before any output (exit 255), the task is retried locally.
Development
npm run check # node --check on every module
npm start # run the stdio serverLicense
MIT
Available Tools
6 toolsclaude_account_limitsA
Consulta la cuota y límites de la cuenta de Claude: límite móvil de 5 horas (% usado/restante), límite semanal (% usado/restante), créditos extra disponibles y el total de tokens consumidos hoy a través de todas las sesiones.
Inputs: no named parameters.
claude_compact_sessionB
Ejecuta el comando /compact en una sesión existente de Claude Code para reducir los tokens acumulados en la ventana de contexto y recuperar velocidad.
Inputs: sessionId (required), cwd.
claude_configureC
Consulta o actualiza el modelo y nivel de esfuerzo/thinking predeterminados para las tareas ejecutadas por Claude Code MCP.
Inputs: model, effort.
claude_list_sessionsA
Lista las sesiones de Claude Code registradas en la máquina, ordenadas por fecha reciente, indicando su prompt inicial, tokens en contexto y modelo.
Inputs: cwd, limit.
claude_run_taskB
Ejecuta una tarea, refactor, suite de tests o instrucción técnica usando el agente autónomo de Claude Code. Puede iniciar una sesión limpia o reanudar una sesión existente (pasando sessionId) con continuidad de contexto y ejecución headless de comandos.
Inputs: prompt (required), cwd, model, effort, +3 more.
claude_session_statusA
Consulta el estado de una sesión de Claude Code: porcentaje de la ventana de contexto usado (tope 1M de tokens), tokens acumulados, modelo activo, fecha de última modificación y alerta de límite.
Inputs: sessionId (required), projectDir.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a fairly distinct action (list, compact, account quota, configure, run, status), but claude_list_sessions and claude_session_status overlap since both report tokens and model, differing mainly in scope and detail level. claude_account_limits vs claude_session_status also both surface token/limit information, which could cause occasional misselection.
All tools share a claude_ prefix and snake_case, which is highly predictable. Minor deviations exist: account_limits is noun-only and configure is verb-only, while the rest follow verb_noun (list_sessions, compact_session, run_task, session_status).
Six tools is a well-scoped set for a Claude Code session manager: discovery, inspection, maintenance, configuration, quota check, and task execution. Each tool clearly earns its place with no filler.
Core lifecycle is covered (list, inspect, compact, run, configure, quota), but there is no way to read a session's actual transcript or task output, nor to delete/clean up or stop a running session. These gaps will force agents to work around missing read/cleanup operations when a task result needs inspecting.
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- FlicenseNot gradedqualityCmaintenanceEnables ISLI agents and MCP clients to dispatch natural-language coding and terminal tasks to a locally-installed Claude Code CLI, supporting both one-shot execution and persistent sessions with workspace and security controls.-
- AlicenseAqualityBmaintenanceLocal MCP bridge that lets Codex operate local Claude Code sessions, including listing, starting, resuming, forking, prompting, and stopping conversations via the Remote Control CLI.14MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as Cursor to hand a bounded task to a scoped, non-interactive Claude Code session billed to a Claude subscription rather than Cursor model credits. Runs read-only by default, with optional file edits or Bash, plus budget, timeout, and session-resume controls.MIT