cursor-mcp-server
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.
README
Cursor Agent MCP Server
An MCP (Model Context Protocol) server that wraps the Cursor CLI agent, enabling Claude Code and other MCP clients to delegate tasks to Cursor's AI agent.
Features
- cursor_agent - Execute tasks with full Cursor agent capabilities (file writing, bash commands, etc.)
- cursor_plan - Read-only planning mode to design approaches before coding
- cursor_ask - Read-only Q&A mode for questions about the codebase
- cursor_status - Check Cursor agent authentication status
- cursor_resume - Resume previous Cursor agent conversations
Prerequisites
-
Install the Cursor CLI agent:
curl https://cursor.com/install -fsS | bash -
Authenticate:
agent login -
Install Python dependencies:
pip install fastmcp
Usage
With Claude Code
Add to your Claude Code MCP configuration (~/.claude.json or project settings):
{
"mcpServers": {
"cursor-agent": {
"command": "python",
"args": ["/path/to/cursor_mcp_server.py"],
"env": {
"CURSOR_WORKSPACE_PATH": "/path/to/your/workspace"
}
}
}
}
Environment Variables
| Variable | Description | Default |
|---|---|---|
CURSOR_WORKSPACE_PATH |
Default working directory for agent tasks | ~ |
CURSOR_AGENT_PATH |
Path to the cursor agent executable | agent |
CURSOR_DEFAULT_TIMEOUT |
Default timeout in seconds | 300 |
CURSOR_DEFAULT_MODEL |
Default model for agent tasks | gpt-5.2-codex-xhigh |
Running Standalone
python cursor_mcp_server.py
Tool Reference
cursor_agent
Execute tasks with full agent capabilities.
cursor_agent(
prompt="Implement a login form with validation",
workspace="/path/to/project", # optional
force=True, # allow file modifications
timeout=300, # seconds
model="gpt-5.2-codex" # optional model override
)
cursor_plan
Design an approach before implementing.
cursor_plan(
prompt="How should I refactor the authentication system?",
workspace="/path/to/project"
)
cursor_ask
Ask questions about the codebase.
cursor_ask(
prompt="What does the DatabaseManager class do?",
workspace="/path/to/project"
)
cursor_resume
Resume a previous conversation.
cursor_resume(
prompt="Continue with the next step",
session_id="abc123", # optional, omit for latest session
workspace="/path/to/project"
)
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.