Claude MCP Server
Click on "Install 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 Serverstart 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.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional: Working directory for the claude CLI execution. | |
| model | No | Optional: The model to use (e.g., 'sonnet', 'opus', 'haiku'). | |
| prompt | Yes | The prompt to start the session with. | |
| systemPrompt | No | Optional: System prompt to set the assistant's behavior. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that the tool returns 'the response and the new Session ID', which is key behavioral info. However, it does not detail side effects, authentication needs, or rate limits, but for a simple session starter, it is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the core action. Every word is necessary; no redundancy. It is optimally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given four parameters (one required), no output schema, and a sibling tool, the description is minimal. It explains the basic action and return values but lacks details like return format, prerequisites, or how session IDs are used. Adequate but not complete for complex usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema; it only mentions 'with a prompt', which aligns with the required parameter. No additional semantics provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Start a new Claude session with a prompt.' The verb 'start' and resource 'Claude session' are specific. The sibling tool 'chat-reply' suggests continuation, so this description effectively differentiates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use—initiating a new session—by contrasting with 'chat-reply' tool name. It provides clear context but does not explicitly state when not to use or mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
chat-replyB
Continue an existing Claude session.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional: Working directory for the claude CLI execution. | |
| model | No | Optional: The model to use for this turn. | |
| prompt | Yes | The prompt to continue the conversation. | |
| sessionId | No | The session ID to continue. If not provided, continues the most recent session. | |
| systemPrompt | No | Optional: Additional system prompt to append for this turn. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must supply all behavioral context. It fails to disclose side effects (e.g., mutating session state), authentication requirements, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single concise sentence that is front-loaded with the core purpose. However, it could include a brief note on context without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 5 parameters, no output schema, and no annotations, the description does not cover return values or behavioral details, leaving gaps for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no parameter-specific information beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'continue' and the resource 'existing Claude session', effectively distinguishing it from the sibling tool 'chat' which likely starts a new session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. The description implies usage for continuing sessions rather than starting new ones, but lacks exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.1- First observed
chat - First observed
chat-reply
TDQS
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.
Maintenance
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
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.128176MIT
- 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.1163MIT
- FlicenseDqualityDmaintenanceA server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.11-
- 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.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/2lab-ai/claude-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server