claude-code-mcp-server

v0.1.3
@sohampatwardhan/claude-code-mcp-server Checked 52 minutes ago Published 1 month ago

MCP server that lets AI agents (Muse, Grok, and other MCP clients) orchestrate Claude Code cloud sessions via the Claude Code CLI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

claude_create_cloud_session Create Claude Code cloud session

Create a new Claude Code cloud session via `claude --cloud` on a pseudo-terminal (the CLI rejects this form when stdout is a pipe). Returns the parsed session_id and session_url. If parsing fails, `parsed` is false and the CLI output, with terminal controls removed, is in `cli`. A github.com `repo` is cloned into CLAUDE_MCP_REPO_CACHE (origin set to that GitHub repository) and, when `base_branch` is set, checked out there before the CLI runs. Any other absolute directory must be on CLAUDE_MCP_REPOS. Omit `repo` to use CLAUDE_MCP_CWD. When Claude Code asks to trust the chosen folder, the call f…

ParameterTypeDescription
description *stringTask description for the new cloud session.
base_branchstringBranch the cloud VM should clone, for a github.com repo. The cache checkout is moved to this branch before claude --cloud. Omit to use the remote's default branch. Not applied to a local directory.
environment_idstringCloud environment id (e.g. ccpool_...). Overrides CLAUDE_CLOUD_ENVIRONMENT_ID; omit to use that default.
repostringRepository this session packages. A github.com owner/name or https://github.com/owner/name URL (any repository the Claude GitHub app can access; cloned into CLAUDE_MCP_REPO_CACHE), or an absolute dire…

claude_send_followup Send follow-up to Claude Code cloud session

Queue a follow-up message into an existing Claude Code cloud session via `claude --cloud <session> -p <message>`. Replies are only visible at the session_url; claude_get_session reports the pushed branch and pull request. If the session can't push to GitHub, use this to ask for `git format-patch origin/<base>..HEAD --stdout` (or a full `git diff` including new files), then apply it locally with `git am` / `git apply --3way` and push it yourself.

ParameterTypeDescription
message *stringMessage to queue into the session.
session *stringTarget cloud session: a session id (session_... / cse_...) or a https://claude.ai/code/... URL.

claude_get_session Cloud session GitHub status

Report the branch a cloud session pushed and any pull request it opened. Prepares the github.com checkout in CLAUDE_MCP_REPO_CACHE (origin set to that repository), then runs print-mode `claude --teleport=<session> --debug` there and stops when the CLI exits. Print mode checks out the session branch and exits; it is not given a prompt and it is not started on a terminal, so it does not continue as a local interactive session. The branch is taken from the debug line `Branch after checkout` when that matches HEAD, otherwise from a HEAD move. The pull request number and URL come from that output w…

ParameterTypeDescription
session *stringCloud session to read: a session id (session_... / cse_...) or a https://claude.ai/code/... URL.
repostringgithub.com owner/name the session was started in. Omit when this server created the session with repo set; that repository is recorded in the cache.

claude_auth_status Claude Code auth status

Report whether the local Claude Code CLI is signed in, via `claude auth status`. If it is not, sign in with `claude` first (run it once in a terminal and complete the claude.ai login). A missing CLI returns CLI_NOT_FOUND with the install command (`npm install -g @anthropic-ai/claude-code`).