Skip to main content
Glama

claude-mcp-server

MCP server that builds Claude CLI commands with mode defaults resolved. Returns a shell command string for the calling agent to execute via Cursor's Shell tool.

Install

One command — no clone needed:

bash <(curl -fsSL https://raw.githubusercontent.com/tal-hason/claude-mcp-server/main/install.sh)

Prerequisites: Node.js >= 20, jq, curl, Claude CLI

Install from source

git clone https://github.com/tal-hason/claude-mcp-server.git
cd claude-mcp-server
./setup.sh

Custom install location

CLAUDE_MCP_DIR=~/my-tools/claude-mcp bash <(curl -fsSL https://raw.githubusercontent.com/tal-hason/claude-mcp-server/main/install.sh)

Uninstall

rm -rf ~/.local/share/claude-mcp-server
jq 'del(.mcpServers["claude-cli"])' ~/.cursor/mcp.json > /tmp/mcp.json && mv /tmp/mcp.json ~/.cursor/mcp.json

Related MCP server: claude-bridge

How it works

┌──────────────────────────────────────────────────────────────┐
│  Agent calls claude_prompt via MCP                           │
│  → MCP server resolves mode defaults, builds shell command   │
│  → Returns JSON { command, cwd }                             │
│  → Agent executes command via Cursor Shell tool              │
│  → Agent reads stream-json output from terminal file         │
└──────────────────────────────────────────────────────────────┘
  1. Agent calls claude_prompt with prompt + optional mode/model/effort

  2. MCP server resolves mode defaults (effort, appended system prompt)

  3. Returns { command, cwd } — a heredoc-based shell command

  4. Agent executes via Shell tool (block_until_ms: 0 for long tasks)

  5. Agent reads the stream-json output from the terminal file

No child process management, no WebSocket bridge, no timeouts — the MCP server is a pure function.

Usage

Single tool: claude_prompt.

Quick exploration

CallMcpTool: user-claude-cli / claude_prompt
{ "prompt": "What dependencies does server.js import?", "mode": "explorer", "cwd": "/path/to/repo" }

Parse the response JSON, then execute the command field via the Shell tool.

Long-running review (backgrounded)

CallMcpTool: user-claude-cli / claude_prompt
{ "prompt": "<full review prompt>", "mode": "reviewer", "model": "claude-opus-4-8" }

Execute the returned command with block_until_ms: 0 to background it. Read the terminal file when done.

Modes

Mode

Default effort

Role

architect

high

Architecture analysis — boundaries, coupling, gaps

planner

high

Plan creation — incremental steps, acceptance criteria

reviewer

max

Code review — multi-lens, severity-graded

explorer

low

Quick research — concise, evidence-cited

executor

high

Implementation — hexagonal, small batches

Without mode, the tool builds a raw command (caller controls everything).

Parameters

Param

Required

Description

prompt

Yes

The prompt to send

mode

No

Dispatch mode (see table above)

model

No

Exact model name (e.g. claude-opus-4-8)

effort

No

low / medium / high / xhigh / max

systemPrompt

No

System prompt override

sessionId

No

Resume a previous session

cwd

No

Working directory for Claude CLI

Files

File

Purpose

server.js

MCP entry point — thin wiring, delegates to command-builder

command-builder.js

Pure logic — shellQuote, buildCommand, mode resolution

modes.js

Dispatch mode definitions (effort + system prompt per role)

setup.sh

From-source setup: deps + MCP registration

install.sh

Curl-pipeable installer: download release + register

Environment

Variable

Default

Purpose

CLAUDE_BIN

claude

Path to Claude CLI binary

CLAUDE_MCP_DIR

~/.local/share/claude-mcp-server

Install location (install.sh only)

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A server implementation for the Model Context Protocol (MCP) that allows Claude AI to execute commands through a command-line interface, enabling direct system interactions from within Claude.
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server wrapping the Cursor CLI agent, enabling Claude Code and other MCP clients to delegate tasks to Cursor's AI agent for file writing, bash commands, and codebase queries.

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/tal-hason/claude-mcp-server'

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