MCP server that bridges Claude.ai to your local Claude Code CLI. Exposes local Claude Code CLI to browser Claude.ai via the Model Context Protocol (MCP) over streamable HTTP transport.
Static source inference · medium confidence · evidence: Streamable HTTP
Current-spec patterns detected
Summary
This server has moderate structural quality but significant definition gaps. All 6 tools are explicitly registered with names, basic descriptions, and parameter schemas visible in server.py. However, descriptions are consistently under-detailed (averaging 15-40 chars), parameter descriptions often lack clarity about format/constraints, and output schemas are entirely undocumented. The server exposes multiple destructive operations (run_claude_code, execute_command, write_file) without confirmation patterns or dry-run support, which violates pattern:confirmation-request. Error handling is present but minimal, most tools return generic error strings rather than actionable recovery guidance per pattern:recovery-guide. The naming convention is reasonable (verb_noun style) and generally clear, but parameter annotations lack specificity on ranges, formats, and allowed values. No tool has an explicit input schema documented for the LLM; descriptions are embedded in Python docstrings which fastmcp may or may not expose properly to the MCP client.
Tool descriptions are critically short (28 - 50 chars). Many do not state whether the tool modifies state, when to use it vs similar tools, or what it returns.
Document output schema for every tool in JSON Schema format. E.g., run_claude_code should specify: {session_id: string, messages: array<{type: string, content: string}>, result: string, cost_usd: number}. list_directory should return {entries: array<{name: string, type: 'file'|'dir', size_bytes?: number}>}. Include these in docstrings or tool annotation metadata so fastmcp exposes them to MCP clients.
Expand tool descriptions to 100 - 200 chars, covering WHAT, WHEN, and WHAT IT RETURNS. Example: 'Execute a shell command and return stdout/stderr. Use for running build scripts, checks, or system operations. Returns command output and exit code. Supports 60-second timeout. WARNING: Shell injection risk, validate input carefully.'
Add confirmation/dry-run pattern to destructive tools. For write_file and execute_command, accept an optional 'dry_run' bool parameter that returns what would be written/executed without committing. For run_claude_code (multi-step), require explicit 'confirm': true to proceed.
Add parameter constraints and type hints: allowed_tools as enum list (e.g., ['Read', 'Write', 'Bash', 'Browser']); max_bytes with min/max (1 - 10_000_000); path with regex to reject suspicious patterns like '../..' or '/etc/*'.
Enhance error messages with recovery guidance. E.g., 'File not found: /missing/file. Try list_directory(/missing/) to see what exists, or check the path spelling.' Categorize errors as retryable (timeout: retry after 5s), user-fixable (invalid path: correct and retry), or fatal (permission denied on system file: contact admin).
Parameter descriptions lack specificity on format, range, and constraints. E.g., 'allowed_tools' does not list valid options; 'path' does not clarify absolute vs relative; 'max_bytes' lacks range bounds.
Error handling returns unstructured strings without recovery guidance. E.g., 'Error: File not found: {path}' does not suggest calling list_directory or checking the path.
execute_command uses shell=True with user-provided input, creating a command injection vector. Tool description does not warn of this risk or recommend input validation.
run_claude_code references session_id parameter, implying stateful session tracking. MCP 2026-07-28 spec requires stateless request handling; session state should be managed server-side or passed via tool output, not persisted state.
Large result responses (list_directory with hundreds of files, read_file up to 100KB, list_sessions for many sessions) lack pagination or result limits, risking context window exhaustion.
list_directoryread_filelist_sessions
Protect execute_command against injection. Add an optional 'args' array parameter so users can pass ['python', 'script.py', 'arg1'] instead of shell-interpolated 'python script.py arg1'. Prefer subprocess.run([...], shell=False) if possible.
Refactor run_claude_code to use stateless pattern per MCP spec. Instead of session_id parameter, design the tool to return a session_token in the response, and require passing that token in subsequent calls via a 'context' or 'session_token' parameter. This makes the protocol stateless and traceable.
Implement pagination and result limits per pattern:paginated-result. list_directory: add 'limit' (default 50) and 'offset' params, return {entries: [...], total: int, next_offset?: int}. list_sessions: similar pagination. read_file: clarify that truncation at 100KB is expected; offer read_file_range(path, start_byte, end_byte) for large files.
Add tool annotations (readOnlyHint, destructiveHint, idempotentHint) per MCP 2026-07-28 spec. Mark list_directory and read_file as readonly. Mark execute_command and write_file as destructive. This helps clients display UI warnings and agents reason about side effects.
Document the external dependency on 'claude' CLI. Clarify version requirements, error modes if the CLI is missing or outdated, and what happens if the CLI output format changes. Consider fallback behavior or version checks.