mcp-claude-node

Sunalamye/mcp-claude-node

3.2

If you are the rightful owner of mcp-claude-node and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Claude Shell Server is a Node.js implementation designed to facilitate parallel execution of Claude AI requests through the Model Context Protocol.

Tools
5
Resources
0
Prompts
0

MCP Claude Shell Server (Node.js)

A Node.js implementation of an MCP (Model Context Protocol) server that wraps the Claude Code CLI, enabling parallel execution of Claude AI requests.

Features

  • Parallel Execution: Multiple requests are processed concurrently using Promise-based async handling
  • Retry Logic: Automatic retry with configurable attempts and timeouts
  • Model Selection: Support for Haiku, Sonnet, and Opus models
  • JSON Validation: Built-in JSON response validation for structured outputs
  • Full Claude CLI Options: Support for all Claude CLI parameters including system prompts, tool permissions, and more

Installation

npm install
npm run build

Usage

As MCP Server

Add to your Claude Code configuration:

claude mcp add --transport stdio claude-shell -- node /path/to/mcp-claude-node/dist/index.js

Or manually add to ~/.claude.json:

{
  "mcpServers": {
    "claude-shell": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/mcp-claude-node/dist/index.js"]
    }
  }
}

Development

# Run in development mode
npm run dev

# Build for production
npm run build

# Run tests
npx tsx test-client.ts

Available Tools

ToolDescription
claude_generateGenerate code or text with retry and model selection
claude_editEdit files with retry and model selection
claude_refactorRefactor code with retry and model selection
claude_generate_jsonGenerate JSON response with validation
claude_edit_jsonEdit with JSON response validation

Tool Parameters

All tools support these parameters:

ParameterTypeDefaultDescription
promptstringrequiredThe prompt to send to Claude
modelstring"haiku"Model: haiku, sonnet, opus
timeoutnumber660Timeout in seconds
maxRetriesnumber3Maximum retry attempts
maxTurnsnumber-Maximum agent turns
outputFormatstring"json"Output format: text, json, stream-json
systemPromptstring-Replace default system prompt
appendSystemPromptstring-Append to default system prompt
allowedToolsstring[]-Additional tools to allow
disallowedToolsstring[]-Tools to disallow
addDirsstring[]-Additional directories to access
verbosebooleanfalseEnable verbose logging

Architecture

src/
├── index.ts          # Entry point
├── server.ts         # MCP Server main logic
├── claude-cli.ts     # Claude CLI wrapper with retry
├── tools.ts          # Tool definitions
├── types.ts          # TypeScript types
└── utils.ts          # Utility functions

License

MIT