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()
decorator - Access specific tools like
query_claude
,clear_conversation
, andget_conversation_history
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
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
- Install Dependencies
- Configure Environment
- Configure Claude Desktop
- macOS: Navigate to
~/Library/Application Support/Claude/
- Windows: Navigate to
%APPDATA%\Claude\
- Create or edit
claude_desktop_config.json
- Copy contents from
config/claude_desktop_config.json
- Update paths and API keys
- macOS: Navigate to
Usage Guide
Basic Usage
- Regular Claude Desktop Usage
- Just chat normally with Claude
- Uses your Professional Plan
- No special commands needed
- API Usage
Advanced Features
- Using System Prompts
- Managing Conversations
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_claude
- Make direct API calls to Claude
- Support for system prompts
- Conversation tracking
clear_conversation
- Reset conversation history
- Manage multiple conversation threads
get_conversation_history
- Retrieve 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:
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
Tools
A server that enables Claude Desktop users to access the Claude API directly, allowing them to bypass Professional Plan limitations and use advanced features like custom system prompts and conversation management.
- Features
- When to Use
- Setup Instructions
- Usage Guide
- MCP Tools Available
- Development
- Troubleshooting
- Contributing
- License
- Support
Related Resources
Related MCP Servers
- -securityAlicense-qualityThe server facilitates access to Julia documentation and source code through Claude Desktop, allowing users to retrieve information on Julia packages, modules, types, functions, and methods.Last updated -436JavaScriptMIT License
- AsecurityFlicenseAqualityThe 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.Last updated -416Python
- -securityAlicense-qualityA modular server implementation for Claude AI assistants with integrated tools, enabling Claude to perform actions and access external resources like file systems, web searches, browser automation, financial data, and document generation.Last updated -86PythonMIT License
- -securityAlicense-qualityA server that integrates with Claude Desktop to enable real-time web research capabilities, allowing users to search Google, extract webpage content, and capture screenshots directly from conversations.Last updated -525MIT License