Skip to main content
Glama
xihuai18

claude-code-mcp

by xihuai18

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
claude_codeA

Start a background Claude Code run and return sessionId immediately. No final result is returned here. Main loop: call claude_code_check(action='poll'), store nextCursor, and keep polling until status becomes idle, error, or cancelled. If actions[] contains permission requests, answer them with claude_code_check(action='respond_permission'). respond_user_input is not supported. Adjust polling cadence to progress: poll faster while new events/actions are arriving, and slower when the session is quietly thinking. Long-running work is normal: Claude Code can keep working for 10+ minutes, especially with high/max effort, so wait for polling to settle before assuming it is stuck. If you want to continue after a run pauses or finishes, use claude_code_reply with the same sessionId instead of starting a new claude_code session. For runtime-authoritative tool names, call claude_code_check with pollOptions.includeTools=true.

Internal tools (runtime list when includeTools=true):

[agent]

  • Task: Spawn subagent (must be in allowedTools)

  • TaskOutput: Get subagent output

  • TaskStop: Cancel subagent

  • TeamDelete: Delete team (may need shutdown_approved first)

  • TodoWrite: Task/todo checklist

[execute]

  • Bash: Run shell commands

[file_read]

  • Glob: Find files by glob pattern

  • Grep: Search file contents (regex)

  • Read: Read file contents (large files: use offset/limit or Grep)

[file_write]

  • Edit: Targeted edits (replace_all is substring-based)

  • NotebookEdit: Edit Jupyter notebook cells (Windows paths normalized)

  • Write: Create or overwrite files

[interaction]

  • AskUserQuestion: Ask user a question

[mcp]

  • SubscribeMcpResource: Subscribe to an MCP resource stream

  • SubscribePolling: Subscribe to periodic polling

  • UnsubscribeMcpResource: Unsubscribe from an MCP resource stream

  • UnsubscribePolling: Unsubscribe from periodic polling

[network]

  • WebFetch: Fetch web page or API content

  • WebSearch: Web search

Permission control: allowedTools pre-approves tools but is not a strict allowlist unless strictAllowedTools=true; disallowedTools always denies; other tools may require approval.

claude_code_replyA

Send a follow-up to an existing session. Reuse the same sessionId instead of starting a new claude_code session when you want to continue. Returns immediately; poll with claude_code_check. Use diskResumeConfig only when the in-memory session is missing and disk resume is enabled.

claude_code_sessionB

List, inspect, cancel, or interrupt sessions.

claude_code_checkA

Poll session state or answer a pending permission request.

POLLING FREQUENCY: Do NOT poll every turn. Claude Code tasks take minutes, not seconds.

  • "running": sleep at least 2 minutes between polls; increase for complex tasks. Do NOT high-frequency poll — it wastes tokens.

  • "waiting_permission": poll ~1s and respond quickly.

  • "idle"/"error"/"cancelled": stop polling.

  • Adapt interval based on task complexity and whether the previous poll returned new events.

Main loop: call action='poll', persist nextCursor, and use action='respond_permission' for approvals.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
server_infoServer metadata (version/platform/runtime).
internal_toolsClaude Code internal tool catalog (runtime-aware).
gotchasHigh-signal failure modes, symptoms, and remedies for this MCP workflow.
quickstartCanonical async start, poll, permission, and continue flow for MCP callers.
errorsStructured error codes and remediation hints.
compat_reportCompatibility diagnostics for MCP clients and local runtime assumptions.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xihuai18/claude-code-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server