cc-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cc-mcp
Run Claude Code as an async task runner for remote MCP clients, from a machine you own.
Cloud assistants can't reach your Pi, and your Pi has a Claude subscription doing nothing. cc-mcp is a small MCP server that closes the gap: the assistant calls start_task, goes away, and comes back for the result while Claude Code works on your hardware.
MCP client ──HTTPS──▶ Cloudflare Tunnel ──▶ cc-mcp (127.0.0.1) ──▶ detached runner ──▶ claude -p
Bearer token or OAuth auth · limits · audit one per task stream-jsonWhy
Tasks outlive requests. Each task runs in its own detached process. Restart the server, lose the connection, close the laptop: the task keeps going, and
wait_tasknever blocks longer than a tunnel tolerates.Research first. A task with no repository runs in a fresh scratch directory with web search and file tools and no shell. The last message is the result.
Safe to leave on the internet. Per-client hashed tokens, optional OAuth 2.1 approved from your own shell, per-IP lockout, host and origin checks, an audit log, and a locked-down child environment. Threat model.
Plain Node. Node 22, no native modules, no database; state is files in one directory.
Related MCP server: muster
Quickstart
You need Node 22+, Claude Code signed in as the user that will run the server, and a hostname on Cloudflare. The Pi deployment guide covers systemd and the tunnel in full.
git clone https://github.com/aravhawk/cc-mcp && cd cc-mcp
npm ci && npm run build && npm link # provides the cc-mcp command
claude login # or set CLAUDE_CODE_OAUTH_TOKEN from "claude setup-token"
cc-mcp doctor # checks Node, claude, auth, directories, exposure
cc-mcp token create --label hark --expires 90d # printed once; save it
export CC_MCP_PUBLIC_URL=https://cc.example.com
export CC_MCP_TRUST_PROXY=true # required behind a tunnel, see below
cc-mcp serve # listens on 127.0.0.1:8787Point cloudflared at http://127.0.0.1:8787 (example config), then add this to your MCP client:
URL |
|
Header |
|
Behind a tunnel, set
CC_MCP_TRUST_PROXY=true. cloudflared connects from loopback, so without it every visitor on the internet shares the address 127.0.0.1 and five failed attempts lock out your own client.cc-mcp doctorwarns when it sees a tunnel without it, and so does the server log.
Check it end to end:
curl -s https://cc.example.com/healthz
# {"status":"ok"}Tools
Tool | Purpose |
| Start a task and get its id back at once. No |
| Block up to 90 s, or check without blocking. Finished tasks return their result text. |
| Page through the transcript: assistant text, tool calls, results. |
| Join a running task, interrupt it, or resume a finished one in the same Claude Code session. |
| Stop a task; it can be resumed later. |
| Browse, full-text search, rename and tag. |
| Start a research task and wait for the answer in one call. |
Arguments, states and examples are in docs/tools.md.
Working in a repository
Off by default. Set CC_MCP_ALLOWED_ROOTS and clients can pass a path inside those directories, optionally with isolation: "worktree" to work in a throwaway git worktree. Set CC_MCP_REPO_URL_HOSTS=github.com to let tasks clone https repositories from those hosts. Tasks get Read, Glob, Grep, Edit and Write and nothing else unless you widen CC_MCP_REPO_TOOLS.
Configuration
Everything is an CC_MCP_* environment variable, and invalid values stop startup with a message naming the variable. A typical env file:
CC_MCP_PUBLIC_URL=https://cc.example.com
CC_MCP_TRUST_PROXY=true
CC_MCP_MAX_CONCURRENT=2 # tasks at once; the rest queue
CC_MCP_ALLOWED_ROOTS=/home/pi/projects # optional: enables path tasks
CC_MCP_DEFAULT_MODEL=opus
CC_MCP_MAX_EFFORT=highThe full list is in docs/configuration.md. OAuth for clients that require it is covered in docs/oauth.md, and the moving parts in docs/architecture.md.
Status
Pre-1.0. The suite (npm test) runs against a fake claude binary, and CI covers Node 22 and 24. What has not been exercised yet: an authenticated Claude Code run through cc-mcp, a real Raspberry Pi behind a live Cloudflare Tunnel, and any particular MCP client (including Hark). Expect rough edges there and please open an issue.
Contributing and security
See CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md.
License
MIT © Arav Jain
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
Hosted MCP server for task-first delegation to remote workstations and workers.
Headless task management for bots, apps and AI agents. Remote MCP server, OAuth or access token.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
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
- AlicenseBqualityBmaintenanceEnables launching and supervising local Codex and Claude Code agent sessions and one-shot tasks, exposing run, list, stop, and output operations over MCP with session-scoped permissions and sandbox controls.2190 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as Claude Code and Codex to delegate background Pi Coding Agent tasks, inspect and steer running work, and recover saved checkpoints after server restarts.67 npm21MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients such as Claude, Cursor, and VS Code to delegate coding tasks to an OpenCode server, including asking questions, running background jobs, monitoring progress, responding to input/permissions, and reviewing changes across projects.22,709 npmMIT