Claude Desktop API MCP
This server acts as an MCP bridge to the Claude API, enabling advanced interactions beyond the standard Professional Plan limitations:
Send messages directly to Claude with custom system prompts
Manage conversation history (view, continue, or clear conversations)
Use longer context windows and bypass rate limits
Switch between Professional Plan and API usage seamlessly
Extend functionality by adding custom tools using the
@mcp.tool()decoratorAccess specific tools like
query_claude,clear_conversation, andget_conversation_history
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 Desktop API MCPUsing a custom system prompt, explain quantum computing basics"
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 Desktop API Integration via MCP
This project provides an MCP server implementation that enables seamless integration between Claude Desktop and the Claude API. It allows you to bypass Professional Plan limitations and access advanced features like custom system prompts and conversation management.
Features
Direct Claude API integration via MCP
Conversation history tracking and management
System prompt support
Seamless switching between Professional Plan and API usage
Easy configuration with Claude Desktop
Related MCP server: Desktop Commander MCP
When to Use
Professional Plan (default):
Regular conversations in Claude Desktop
Basic usage within plan limits
No special configuration needed
API Token (via this MCP server):
When you need longer context windows
To use custom system prompts
To bypass rate limits
For advanced conversation management
Setup Instructions
Clone the Repository
# 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_MCPInstall Dependencies
pip install -r requirements.txtConfigure Environment
# Copy environment template cp .env.example .env # Edit .env and add your API key ANTHROPIC_API_KEY=your_api_key_hereConfigure Claude Desktop
macOS: Navigate to
~/Library/Application Support/Claude/# Using Finder: # 1. Press Cmd + Shift + G # 2. Enter: ~/Library/Application Support/Claude/Windows: Navigate to
%APPDATA%\Claude\Create or edit
claude_desktop_config.jsonCopy contents from
config/claude_desktop_config.jsonUpdate paths and API keys
Usage Guide
Basic Usage
Regular Claude Desktop Usage
Just chat normally with Claude
Uses your Professional Plan
No special commands needed
API Usage
@claude-api Please answer using the API: What is the capital of France?
Advanced Features
Using System Prompts
@claude-api {"system_prompt": "You are an expert fitness coach"} Create a workout planManaging Conversations
# 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
Cost Management
API calls use your Anthropic API credits and may incur charges
Use the Professional Plan for regular queries
Only use @claude-api when you specifically need:
Longer context windows
Custom system prompts
To bypass rate limits
MCP Tools Available
query_claudeMake direct API calls to Claude
Support for system prompts
Conversation tracking
clear_conversationReset conversation history
Manage multiple conversation threads
get_conversation_historyRetrieve conversation records
Debug conversation flow
Development
The main server implementation is in src/claude_api_server.py. To extend functionality, you can add new tools using the @mcp.tool() decorator.
Example of adding a new tool:
@mcp.tool()
async def custom_tool(param: str) -> str:
"""
Custom tool description
Args:
param: Parameter description
"""
try:
# Tool implementation
return result
except Exception as e:
return f"Error: {str(e)}"Troubleshooting
API Key Issues
Verify your API key in .env
Check Claude Desktop config paths
Ensure API key has correct permissions
Connection Issues
Check if MCP server is running
Verify Python environment
Check Claude Desktop logs
Usage Issues
Ensure correct @claude-api syntax
Check conversation IDs
Verify system prompt format
Contributing
Fork the repository
Create a feature branch
Make your changes
Submit a pull request
License
MIT
Support
For issues and questions:
Open an issue in the repository
Check existing discussions
Review the troubleshooting guide
Available Tools
1 toolsend-messageC
Send a message to Claude
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message to send to Claude |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('send a message') but doesn't describe what happens after sending, whether there are rate limits, authentication requirements, response expectations, or error conditions. This leaves significant behavioral uncertainty for an agent.
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 perfectly concise at just 4 words, front-loading the essential action without any wasted words. Every element earns its place, making it immediately understandable while being maximally efficient.
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 no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after sending the message, what kind of response to expect, or any behavioral characteristics. For a communication tool with zero structured metadata, more context about the interaction pattern would be needed.
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?
The schema description coverage is 100%, with the single parameter 'message' clearly documented in the schema. The description doesn't add any parameter information beyond what's already in the schema, so it meets the baseline for high schema coverage without providing additional semantic context.
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 resource ('message to Claude'), making the purpose immediately understandable. However, it doesn't differentiate from siblings since there are none, and could be slightly more specific about what type of message or context this involves.
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 provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. With no sibling tools, this is less critical, but still lacks any usage context that would help an agent determine appropriate invocation scenarios.
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
- First observed
send-message
TDQS
With only one tool, there is no possibility of ambiguity or confusion between tools. The single tool has a clear, distinct purpose that cannot be mistaken for any other tool in the set.
A single tool inherently demonstrates perfect naming consistency. There are no other tools to compare against, so no inconsistency can exist in the naming pattern.
One tool is too few for meaningful interaction with a Claude Desktop API. While the tool's purpose is clear, a single send-message operation severely limits functionality and suggests an incomplete or minimal implementation.
The tool surface is severely incomplete for a Claude Desktop API. With only send-message, there are no tools for receiving messages, managing conversations, handling settings, or performing any other expected API operations. This creates significant dead ends for agents.
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
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
The Ramp MCP server enables users to securely connect Ramp with AI assistants like ChatGPT and Claude to query financial data and take actions using natural language. It transforms Ramp's developer API into a SQL interface that LLMs can query, allowing admins to analyze spend trends, identify cost savings, and run complex SQL analyses on comprehensive datasets (transactions, purchase orders, vendors, users), while all users can manage cards, view transactions, request reimbursements, and get expense policy answers.
Related MCP Servers
- FlicenseAqualityDmaintenanceThe server facilitates natural language interactions for exploring and understanding codebases, providing insights into data models and system architecture using a cost-effective, simple setup with support for existing Claude Pro subscriptions.427-
- AlicenseAqualityDmaintenanceA server that lets Claude desktop app execute terminal commands on your computer and edit files through Model Context Protocol, featuring command execution, process management, and advanced file operations.1938,9236MIT
- FlicenseDqualityDmaintenanceA server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.11-
- FlicenseCqualityDmaintenanceA server built with mcp-framework that allows users to extend Claude's capabilities by adding custom tools that can be used through the Claude Desktop client.388-
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/mlobo2012/Claude_Desktop_API_USE_VIA_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server