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을 이용한 간편한 구성

언제 사용할 것인가

  • 전문가 플랜 (기본):
    • 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. 문제 해결 가이드를 검토하세요

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Claude Desktop 사용자가 Claude API에 직접 액세스할 수 있도록 하는 서버로, Professional Plan의 제한을 우회하고 사용자 정의 시스템 프롬프트 및 대화 관리와 같은 고급 기능을 사용할 수 있습니다.

  1. 특징
    1. 언제 사용할 것인가
      1. 설치 지침
        1. 사용 가이드
          1. 기본 사용법
          2. 고급 기능
          3. 비용 관리
        2. 사용 가능한 MCP 도구
          1. 개발
            1. 문제 해결
              1. 기여하다
                1. 특허
                  1. 지원하다

                    Related MCP Servers

                    • A
                      security
                      F
                      license
                      A
                      quality
                      A local server that enables Claude Desktop to interact with your macOS Contacts and Messages apps, allowing you to search contacts and send iMessages through natural language commands.
                      Last updated -
                      2
                      1
                      JavaScript
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A 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 -
                      854
                      MIT License
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A server that allows Claude to control audio playback on your computer, supporting MP3, WAV, and OGG files with features like play, list, and stop commands.
                      Last updated -
                      1
                      Python
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A 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.
                      Last updated -
                      15,956
                      MIT License
                      • Linux
                      • Apple

                    View all related MCP servers

                    ID: riytk7nmma