This MCP server implementation enables seamless integration between Claude Desktop and the Claude API, allowing you to bypass Professional Plan limitations and access advanced features like custom system prompts and conversation management.
# Using VS Code:
# 1. Press Cmd + Shift + P
# 2. Type "Git: Clone"
# 3. Paste: https://github.com/mlobo2012/Claude_Desktop_API_USE_VIA_MCP.git
# Or using terminal:
git clone https://github.com/mlobo2012/Claude_Desktop_API_USE_VIA_MCP.git
cd Claude_Desktop_API_USE_VIA_MCP
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env and add your API key
ANTHROPIC_API_KEY=your_api_key_here
~/Library/Application Support/Claude/
# Using Finder:
# 1. Press Cmd + Shift + G
# 2. Enter: ~/Library/Application Support/Claude/
%APPDATA%\Claude\
claude_desktop_config.json
config/claude_desktop_config.json
Professional Plan (default):
API Token (via this MCP server):
Regular Claude Desktop Usage
API Usage
@claude-api Please answer using the API: What is the capital of France?
@claude-api {"system_prompt": "You are an expert fitness coach"} Create a workout plan
# Start a new conversation
@claude-api {"conversation_id": "project1"} Let's discuss Python
# Continue same conversation
@claude-api {"conversation_id": "project1"} Tell me more
# View conversation history
@claude-api get_conversation_history project1
# Clear conversation
@claude-api clear_conversation project1
query_claude
clear_conversation
get_conversation_history
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.