Claude Desktop API MCP
Integración de la API de Claude Desktop a través de MCP
Este proyecto proporciona una implementación de servidor MCP que permite una integración fluida entre Claude Desktop y la API de Claude. Permite superar las limitaciones del Plan Profesional y acceder a funciones avanzadas como avisos personalizados del sistema y gestión de conversaciones.
Características
Integración directa de la API de Claude a través de MCP
Seguimiento y gestión del historial de conversaciones
Soporte de avisos del sistema
Cambio sin problemas entre el Plan Profesional y el uso de la API
Fácil configuración con Claude Desktop
Related MCP server: Desktop Commander MCP
Cuándo utilizarlo
Plan Profesional (predeterminado):
Conversaciones regulares en Claude Desktop
Uso básico dentro de los límites del plan
No se necesita ninguna configuración especial
Token API (a través de este servidor MCP):
Cuando necesitas ventanas de contexto más largas
Para utilizar indicaciones del sistema personalizadas
Para eludir los límites de velocidad
Para una gestión avanzada de conversaciones
Instrucciones de configuración
Clonar el repositorio
# 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_MCPInstalar dependencias
pip install -r requirements.txtConfigurar el entorno
# Copy environment template cp .env.example .env # Edit .env and add your API key ANTHROPIC_API_KEY=your_api_key_hereConfigurar Claude Desktop
macOS: Vaya a
~/Library/Application Support/Claude/# Using Finder: # 1. Press Cmd + Shift + G # 2. Enter: ~/Library/Application Support/Claude/Windows: navegue a
%APPDATA%\Claude\Crear o editar
claude_desktop_config.jsonCopiar el contenido de
config/claude_desktop_config.jsonActualizar rutas y claves API
Guía de uso
Uso básico
Uso habitual del escritorio de Claude
Simplemente chatea normalmente con Claude
Utiliza tu Plan Profesional
No se necesitan comandos especiales
Uso de la API
@claude-api Please answer using the API: What is the capital of France?
Funciones avanzadas
Uso de los avisos del sistema
@claude-api {"system_prompt": "You are an expert fitness coach"} Create a workout planGestionar conversaciones
# 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
Gestión de costes
Las llamadas API utilizan sus créditos de API de Anthropic y pueden generar cargos
Utilice el Plan Profesional para consultas regulares
Utilice @claude-api solo cuando necesite específicamente:
Ventanas de contexto más largas
Indicaciones del sistema personalizadas
Para eludir los límites de velocidad
Herramientas MCP disponibles
query_claudeRealizar llamadas API directas a Claude
Soporte para indicaciones del sistema
Seguimiento de conversaciones
clear_conversationRestablecer el historial de conversaciones
Administrar múltiples hilos de conversación
get_conversation_historyRecuperar registros de conversaciones
Flujo de conversación de depuración
Desarrollo
La implementación principal del servidor se encuentra en src/claude_api_server.py . Para ampliar la funcionalidad, puede agregar nuevas herramientas mediante el decorador @mcp.tool() .
Ejemplo de adición de una nueva herramienta:
@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)}"Solución de problemas
Problemas con la clave API
Verifique su clave API en .env
Verifique las rutas de configuración de Claude Desktop
Asegúrese de que la clave API tenga los permisos correctos
Problemas de conexión
Compruebe si el servidor MCP se está ejecutando
Verificar el entorno de Python
Consultar los registros de Claude Desktop
Problemas de uso
Asegúrese de que la sintaxis de @claude-api sea correcta
Comprobar los ID de las conversaciones
Verificar el formato del mensaje del sistema
Contribuyendo
Bifurcar el repositorio
Crear una rama de características
Realiza tus cambios
Enviar una solicitud de extracción
Licencia
Instituto Tecnológico de Massachusetts (MIT)
Apoyo
Para problemas y preguntas:
Abrir un problema en el repositorio
Consultar las discusiones existentes
Revise la guía de solución de problemas
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.
1 tool update
- First observed
send-message
TDQS
Scored across 1 tool
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
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.19206,624 npm6MIT
- 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.334 npm-