Claude Desktop API MCP
MCP server implementation for using Claude API with Claude Desktop, providing advanced API integration and conversation management.
What is Claude Desktop API MCP?
Claude Desktop API MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server implementation for using claude api with claude desktop, providing advanced api integration and conversation management.
MCP server implementation for using Claude API with Claude Desktop, providing advanced API integration and conversation management.
This server falls under the APIs and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server implementation for using Claude API with Claude D
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx claude-desktop-api-use-via-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Claude Desktop API MCP
Claude Desktop API Use via MCP is a Python-based MCP server that bridges Claude Desktop with the Anthropic Claude API, enabling Claude Desktop users to make direct API calls beyond their Professional Plan limits — with support for custom system prompts, named conversation threads, longer context windows, and conversation history management. It exposes three MCP tools (query_claude, clear_conversation, and get_conversation_history) and is invoked by prefixing messages with @claude-api in Claude Desktop. Developers and power users who want to use Claude Desktop as a front-end while programmatically controlling model parameters and maintaining persistent conversation state will find it useful.
Prerequisites
- Python 3.8 or higher with pip
- An Anthropic API key (obtainable from https://console.anthropic.com/)
- Claude Desktop installed and running
- Git for cloning the repository
Clone the repository
Clone the project to a local directory. The main server implementation lives in src/claude_api_server.py.
git clone https://github.com/mlobo2012/Claude_Desktop_API_USE_VIA_MCP.git
cd Claude_Desktop_API_USE_VIA_MCPInstall Python dependencies
Install the required packages from the requirements.txt file into your Python environment.
pip install -r requirements.txtConfigure your Anthropic API key
Copy the example environment file and add your Anthropic API key. The server reads ANTHROPIC_API_KEY from this file at startup.
cp .env.example .env
# Edit .env and set:
# ANTHROPIC_API_KEY=your_api_key_hereRegister the MCP server with Claude Desktop
Copy the bundled config template into the Claude Desktop config directory and update the path to point to your local clone. On macOS the config directory is ~/Library/Application Support/Claude/.
{
"mcpServers": {
"claude-api": {
"command": "python",
"args": ["/absolute/path/to/Claude_Desktop_API_USE_VIA_MCP/src/claude_api_server.py"],
"env": {
"ANTHROPIC_API_KEY": "your_api_key_here"
}
}
}
}Restart Claude Desktop
Quit and relaunch Claude Desktop. The three API tools (query_claude, clear_conversation, get_conversation_history) will be registered and available when you use the @claude-api prefix.
Claude Desktop API MCP Examples
Client configuration
Claude Desktop configuration pointing to the local Python server. Replace the path with the absolute path to your clone.
{
"mcpServers": {
"claude-api": {
"command": "python",
"args": ["/absolute/path/to/Claude_Desktop_API_USE_VIA_MCP/src/claude_api_server.py"],
"env": {
"ANTHROPIC_API_KEY": "your_api_key_here"
}
}
}
}Prompts to try
Use these patterns directly in Claude Desktop to invoke the MCP tools. The @claude-api prefix routes the request through the server to the Anthropic API.
- "@claude-api What is the capital of France?"
- "@claude-api {\"system_prompt\": \"You are an expert fitness coach\"} Create a 30-day workout plan"
- "@claude-api {\"conversation_id\": \"project1\"} Let's discuss Python best practices"
- "@claude-api {\"conversation_id\": \"project1\"} Continue — what about error handling?"
- "@claude-api get_conversation_history project1"
- "@claude-api clear_conversation project1"Troubleshooting Claude Desktop API MCP
API key not recognised — server returns an authentication error
Verify that ANTHROPIC_API_KEY is correctly set in your .env file and that the path to the .env file matches the working directory from which the server is launched. You can also pass the key directly in the env block of the MCP config as shown above.
Claude Desktop does not show the @claude-api tools after restart
Check that the absolute path in the args array points to the correct claude_api_server.py file and that Python is on the system PATH. You can test by running `python /path/to/src/claude_api_server.py` directly in a terminal to see any startup errors.
Conversation history is not retained between sessions
Conversation history is stored in memory while the MCP server process is running. If Claude Desktop restarts the server process, history is lost. Use the @claude-api get_conversation_history <id> tool before a restart to review the thread, or extend claude_api_server.py to persist history to a JSON file.
Frequently Asked Questions about Claude Desktop API MCP
What is Claude Desktop API MCP?
Claude Desktop API MCP is a Model Context Protocol (MCP) server that mcp server implementation for using claude api with claude desktop, providing advanced api integration and conversation management. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Claude Desktop API MCP?
Follow the installation instructions on the Claude Desktop API MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Claude Desktop API MCP?
Claude Desktop API MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Claude Desktop API MCP free to use?
Yes, Claude Desktop API MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Claude Desktop API MCP Alternatives — Similar APIs Servers
Looking for alternatives to Claude Desktop API MCP? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Claude Desktop API MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Claude Desktop API MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.