Claude MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude MCP Server start a new Claude session with prompt 'Design a REST API for a blog'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude MCP Server
A Model Context Protocol (MCP) server that provides a bridge to Anthropic's Claude CLI. This allows MCP-compliant clients (like Claude Desktop or Gemini) to interact with the Claude CLI to start new chat sessions or continue existing ones.
Features
Start New Sessions: Initiate a new conversation with a specific Claude model.
Continue Sessions: Reply to existing sessions using their Session ID.
Session Management: Automatically continues the latest session if no Session ID is provided.
Model Selection: Supports specifying different Claude models (e.g.,
sonnet,opus,haiku).System Prompt: Native support for custom system prompts.
Working Directory: Specify custom working directory for CLI execution.
Related MCP server: MCP Server Example
Prerequisites
Node.js 18+
Claude CLI installed and authenticated
# Install Claude CLI
npm install -g @anthropic-ai/claude-code
# Authenticate
claude setup-tokenInstallation
Global Installation
npm install -g @2lab.ai/claude-mcp-serverRun directly with npx
npx @2lab.ai/claude-mcp-serverUsage
Running the server
After global installation:
claude-mcp-serverOr with npx:
npx @2lab.ai/claude-mcp-serverTesting with MCP Inspector
You can test and debug the server using the MCP Inspector:
npx @modelcontextprotocol/inspector npx @2lab.ai/claude-mcp-serverOr if globally installed:
npx @modelcontextprotocol/inspector claude-mcp-serverClaude Desktop Configuration
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"claude-cli": {
"command": "npx",
"args": ["-y", "@2lab.ai/claude-mcp-server"]
}
}
}Or if globally installed:
{
"mcpServers": {
"claude-cli": {
"command": "claude-mcp-server"
}
}
}Claude Code Configuration
Add to your Claude Code settings:
{
"mcpServers": {
"claude-cli": {
"command": "npx",
"args": ["-y", "@2lab.ai/claude-mcp-server"]
}
}
}Available Tools
chat
Start a new Claude session with a prompt.
Parameters:
prompt(required): The prompt to start the session withmodel(optional): The model to use (e.g., 'sonnet', 'opus', 'haiku')systemPrompt(optional): System prompt to set the assistant's behaviorcwd(optional): Working directory for the claude CLI execution
Returns: Response text and new Session ID in _meta.sessionId
chat-reply
Continue an existing Claude session.
Parameters:
prompt(required): The prompt to continue the conversationsessionId(optional): The session ID to continue. If not provided, continues the most recent sessionmodel(optional): The model to use for this turnsystemPrompt(optional): Additional system prompt to append for this turncwd(optional): Working directory for the claude CLI execution
Returns: Response text and Session ID in _meta.sessionId
Development
# Clone the repository
git clone https://github.com/2lab-ai/claude-mcp-server.git
cd claude-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run locally
npm start
# Test with MCP Inspector
npm run inspectCI/CD
This project uses GitHub Actions to automatically publish to npm when changes are pushed to the main branch.
To enable automatic publishing:
Generate an npm access token from npmjs.com
Add the token as a secret named
NPM_TOKENin your GitHub repository settingsBump the version in
package.jsonbefore pushing to trigger a publish
License
ISC
Available Tools
2 toolschatA
Start a new Claude session with a prompt. Returns the response and the new Session ID.
Inputs: prompt (required), cwd, model, systemPrompt.
chat-replyB
Continue an existing Claude session.
Inputs: prompt (required), cwd, model, sessionId, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one starts a new session, the other continues an existing one. There is no ambiguity.
Both tools use the 'chat' prefix and follow a clear verb_noun pattern: 'chat' for starting, 'chat-reply' for continuing. Consistent and predictable.
Only two tools cover the core workflow of starting and continuing a chat, which is reasonable for a minimal chat server. However, it could be slightly expanded.
The tool surface covers starting and continuing sessions but lacks session management operations like listing, deleting, or fetching history, which are notable gaps.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.1769 npm76MIT
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1162MIT
- AlicenseDqualityDmaintenanceA server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.11MIT
- FlicenseNot gradedqualityDmaintenanceA 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.-