Claude Code MCP for Cursor
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 Code MCP for CursorReview the current file for bugs and improvements."
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 Code MCP for Cursor
Use your existing Claude subscription ($20/month) with Cursor IDE instead of paying separate API costs.
๐ฏ What This Does
This MCP (Model Context Protocol) server bridges Claude Code CLI with Cursor IDE, allowing you to:
โ Use your existing $20/month Claude subscription in Cursor
โ Avoid separate pay-per-use API billing
โ Keep your Claude usage within your monthly plan limits
โ Get the same Claude experience directly in your IDE
Related MCP server: mlx-mcp-server
๐ฐ Cost Benefits
Method | Cost Structure | Monthly Estimate* |
This MCP Bridge | $20/month (your existing plan) | $20 |
Direct API | Pay-per-token usage | $30-100+ |
*Estimates vary based on usage patterns
๐ง Prerequisites
Claude Code CLI installed and authenticated
# Install Claude Code (if not already installed) curl -fsSL https://claude.ai/install.sh | bash # Verify it works claude chat "Hello"Cursor IDE with MCP support
Node.js installed on your system
๐ฆ Installation
Step 1: Clone this repository
git clone https://github.com/Blackpenguin46/Claude-Code-MCP-for-Cursor.git
cd Claude-Code-MCP-for-CursorStep 2: Set up the MCP server in your project
Copy the files to your project directory:
# Copy the MCP server to your project root
cp claude-mcp-server.js /path/to/your/project/
# Create the .cursor directory if it doesn't exist
mkdir -p /path/to/your/project/.cursor
# Copy the MCP configuration
cp mcp.json /path/to/your/project/.cursor/Your project structure should look like:
your-project/
โโโ .cursor/
โ โโโ mcp.json
โโโ claude-mcp-server.js
โโโ (your other project files)Step 3: Configure Cursor
Open Cursor
Go to Settings โ Tools & Integrations โ MCP Tools
You should see "claude-code" in the MCP Tools section
Make sure the toggle is enabled (green)
Verify it shows "1 tools enabled" (not "0 tools enabled")
If you see "0 tools enabled":
Restart Cursor completely
Check that files are in the correct locations
Ensure
claude-mcp-server.jsis executable:chmod +x claude-mcp-server.js
๐งช Testing
Test that everything works:
Test Claude Code directly:
claude chat "What is 2+2?"Test the MCP server:
cd your-project node claude-mcp-server.jsThen paste this JSON and press Enter:
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"claude_chat","arguments":{"message":"What is 2+2?"}}}You should see a response like:
{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"4"}]}}Test in Cursor:
Open a chat in Cursor
Ask Claude a question
Verify the response comes from your Claude Code subscription
๐ How It Works
graph LR
A[Cursor IDE] --> B[MCP Server]
B --> C[Claude Code CLI]
C --> D[Your $20 Subscription]
D --> E[Claude API]
E --> D
D --> C
C --> B
B --> ACursor sends chat requests to the MCP server
MCP Server translates requests to Claude Code CLI commands
Claude Code uses your existing subscription to contact Claude
Response flows back through the chain to Cursor
๐ File Descriptions
claude-mcp-server.js
The main MCP server that bridges Cursor and Claude Code. Handles:
JSON-RPC protocol for MCP communication
Spawning Claude Code processes
Response cleaning and formatting
Error handling and timeouts
.cursor/mcp.json
Cursor's MCP configuration file that tells Cursor how to connect to the server:
{
"mcpServers": {
"claude-code": {
"command": "node",
"args": ["claude-mcp-server.js"],
"env": {}
}
}
}๐จ Troubleshooting
"0 tools enabled" in Cursor
Ensure files are in correct locations
Restart Cursor completely
Check file permissions:
chmod +x claude-mcp-server.jsVerify Claude Code works:
claude chat "test"
MCP server hangs or errors
Test Claude Code independently first
Check that you're authenticated with Claude Code
Verify Node.js is installed and working
Look at Cursor's developer console for errors
"Claude Code error" messages
Ensure Claude Code is properly installed and authenticated
Check your Claude subscription status
Verify you haven't exceeded usage limits
๐ Usage Patterns
Best Practices
Development work: Perfect for code review, debugging, refactoring
Documentation: Great for generating comments and documentation
Learning: Ideal for understanding new codebases or technologies
What Counts Against Your Limits
Each message sent through Cursor counts against your $20/month plan limits
Same usage tracking as using Claude Code directly in terminal
Monitor your usage in Claude's web interface
๐ Benefits Over Direct API
Feature | MCP Bridge | Direct API |
Cost Predictability | โ Fixed $20/month | โ Variable usage costs |
Usage Limits | โ Clear monthly limits | โ Surprise bills possible |
Setup Complexity | โ ๏ธ Initial setup required | โ Simple API key |
Claude Code Integration | โ Uses existing auth | โ Separate billing |
๐ค Contributing
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
๐ License
MIT License - feel free to use and modify as needed.
โก Quick Start Summary
# 1. Clone repo
git clone https://github.com/Blackpenguin46/Claude-Code-MCP-for-Cursor.git
# 2. Copy files to your project
cp claude-mcp-server.js /path/to/project/
mkdir -p /path/to/project/.cursor
cp mcp.json /path/to/project/.cursor/
# 3. Test
claude chat "Hello" # Verify Claude Code works
node claude-mcp-server.js # Test MCP server
# 4. Restart Cursor and check MCP Tools section๐ก Pro Tip: This setup is perfect for developers who use Claude regularly for coding tasks and want predictable monthly costs instead of surprise API bills!
Available Tools
1 toolclaude_chatB
Send a message to Claude using Claude Code CLI
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | The message to send to Claude |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for behavioral transparency. It does not disclose any side effects, statefulness, authentication requirements, or rate limits. The agent is left to assume basic behavior.
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, concise sentence without unnecessary words. It is front-loaded and efficient, though it may be too brief for complete clarity.
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 the low complexity (1 parameter, no output schema), the description covers the basic action. However, it lacks context about conversation continuity and response behavior, making it adequate but not fully complete.
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% with a clear description for the 'message' parameter. The tool description adds no additional meaning beyond the schema, earning the baseline score of 3.
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 'Send' and the resource 'a message to Claude', with the additional context of using Claude Code CLI. It is specific and unambiguous.
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 sibling tools exist, so alternative guidance is unnecessary. However, the description does not provide any context on when to use this tool, such as initiating versus continuing a conversation. It is adequate but minimal.
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.
1 tool update
v1.0.0- First observed
claude_chat
TDQS
With only one tool, there is no possibility of confusion between tools. The single tool has a clearly distinct purpose.
A single tool named 'claude_chat' follows a consistent verb_noun pattern in snake_case. No inconsistencies exist.
One tool for a chat interaction is too few; typical chat servers would include tools for getting responses, managing history, or configuring context. This feels incomplete for the domain.
The server only offers a 'send message' action. There is no way to retrieve responses, manage conversation state, or clear history, which are obvious gaps for a chat interface.
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
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Share context and questions between Claude instances โ VS Code, claude.ai web, and mobile.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Shared memory for AI coding agents. Save once, reuse from Cursor, Claude Code, Codex.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceFacilitates integration with the Cursor code editor by enabling real-time code indexing, analysis, and bi-directional communication with Claude, supporting concurrent sessions and automatic reconnection.1339MIT
- AlicenseAqualityBmaintenanceBridges Claude Code and Claude Desktop to a locally-running LLM, optimized for MLX LM on Apple Silicon with support for any OpenAI-compatible backend.41MIT
- FlicenseNot gradedqualityDmaintenanceTurns Claude Desktop into a Cursor-like assistant for code browsing, editing, searching, linting, formatting, and version control.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude.ai to interact with the Cursor editor to read files, write code, get selections, and more.141MIT
Appeared in Searches
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/blackpwnguin/Claude-Code-MCP-for-Cursor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server