Skip to main content
Glama
mlobo2012

Claude Desktop API MCP

by mlobo2012

MCP를 통한 Claude Desktop API 통합

이 프로젝트는 Claude Desktop과 Claude API 간의 원활한 통합을 지원하는 MCP 서버 구현을 제공합니다. 이를 통해 Professional Plan의 제한을 우회하고 사용자 지정 시스템 프롬프트 및 대화 관리와 같은 고급 기능을 이용할 수 있습니다.

특징

  • MCP를 통한 직접 Claude API 통합

  • 대화 내역 추적 및 관리

  • 시스템 프롬프트 지원

  • Professional Plan과 API 사용 간의 원활한 전환

  • Claude Desktop을 이용한 간편한 구성

Related MCP server: Desktop Commander MCP

언제 사용할 것인가

  • 전문가 플랜 (기본):

    • Claude Desktop에서의 정기 대화

    • 계획 한도 내 기본 사용량

    • 특별한 구성이 필요하지 않습니다

  • API 토큰 (이 MCP 서버를 통해):

    • 더 긴 컨텍스트 창이 필요한 경우

    • 사용자 정의 시스템 프롬프트를 사용하려면

    • 요금 제한을 우회하려면

    • 고급 대화 관리를 위해

설치 지침

  1. 저장소 복제

    지엑스피1

  2. 종속성 설치

    pip install -r requirements.txt
  3. 환경 구성

    # Copy environment template
    cp .env.example .env
    
    # Edit .env and add your API key
    ANTHROPIC_API_KEY=your_api_key_here
  4. Claude Desktop 구성

    • macOS: ~/Library/Application Support/Claude/ 로 이동합니다.

      # Using Finder:
      # 1. Press Cmd + Shift + G
      # 2. Enter: ~/Library/Application Support/Claude/
    • Windows: %APPDATA%\Claude\ 로 이동합니다.

    • claude_desktop_config.json 생성하거나 편집합니다.

    • config/claude_desktop_config.json 에서 내용을 복사합니다.

    • 경로 및 API 키 업데이트

사용 가이드

기본 사용법

  1. Claude 데스크톱 정기 사용

    • 클로드와 평소처럼 채팅하세요

    • 전문가용 플랜을 사용합니다

    • 특별한 명령이 필요하지 않습니다

  2. API 사용

    @claude-api Please answer using the API: What is the capital of France?

고급 기능

  1. 시스템 프롬프트 사용

    @claude-api {"system_prompt": "You are an expert fitness coach"} Create a workout plan
  2. 대화 관리

    # 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

비용 관리

  • API 호출에는 Anthropic API 크레딧이 사용되며 요금이 부과될 수 있습니다.

  • 정기적인 문의에는 Professional Plan을 사용하세요

  • 특별히 필요한 경우에만 @claude-api를 사용하세요.

    • 더 긴 컨텍스트 창

    • 사용자 정의 시스템 프롬프트

    • 요금 제한을 우회하려면

사용 가능한 MCP 도구

  1. query_claude

    • Claude에게 직접 API 호출을 합니다.

    • 시스템 프롬프트 지원

    • 대화 추적

  2. clear_conversation

    • 대화 기록 재설정

    • 여러 대화 스레드 관리

  3. get_conversation_history

    • 대화 기록 검색

    • 대화 흐름 디버깅

개발

주요 서버 구현은 src/claude_api_server.py 에 있습니다. 기능을 확장하려면 @mcp.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)}"

문제 해결

  1. API 키 문제

    • .env에서 API 키를 확인하세요

    • Claude Desktop 구성 경로 확인

    • API 키에 올바른 권한이 있는지 확인하세요.

  2. 연결 문제

    • MCP 서버가 실행 중인지 확인하세요

    • Python 환경 확인

    • Claude Desktop 로그 확인

  3. 사용 문제

    • 올바른 @claude-api 구문을 확인하세요

    • 대화 ID 확인

    • 시스템 프롬프트 형식 확인

기여하다

  1. 저장소를 포크하세요

  2. 기능 브랜치 생성

  3. 변경 사항을 만드세요

  4. 풀 리퀘스트 제출

특허

MIT

지원하다

문제 및 문의사항:

  1. 저장소에서 이슈를 엽니다

  2. 기존 토론 확인

  3. 문제 해결 가이드를 검토하세요

Available Tools

1 tool
send-messageC

Send a message to Claude

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYesMessage to send to Claude

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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. 1 tool update
    • First observedsend-message

TDQS

B3/5.0

Scored across 1 tool

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness1/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers