OpenAI MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows querying OpenAI models (o3-mini and gpt-4o-mini) directly from Claude using the MCP protocol, enabling users to ask questions and receive responses from OpenAI's AI models

OpenAI MCP 서버

MCP 프로토콜을 사용하여 Claude에서 직접 OpenAI 모델을 쿼리합니다. 이 포크는 향상된 메시지 처리 기능과 함께 o3-mini 및 gpt-4o-mini 모델 지원을 추가합니다.

클라인 자동 설치

지엑스피1

특징

  • OpenAI API와 직접 통합
  • 다양한 모델 지원:
    • o3-mini(기본값): 간결한 응답에 최적화됨
    • gpt-4o-mini: 더욱 자세한 응답을 위한 향상된 모델
  • 구성 가능한 메시지 형식
  • 오류 처리 및 로깅
  • MCP 프로토콜을 통한 간단한 인터페이스

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop에 OpenAI MCP 서버를 자동으로 설치하는 방법:

npx -y @smithery/cli install @thadius83/mcp-server-openai --client claude

수동 설치

  1. 저장소 복제 :
git clone https://github.com/thadius83/mcp-server-openai.git cd mcp-server-openai # Install dependencies pip install -e .
  1. Claude Desktop 구성 :

이 서버를 기존 MCP 설정 구성에 추가하세요. 참고: 기존 MCP 서버는 구성에 그대로 두고, 이 서버만 함께 추가하세요.

위치:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 윈도우: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: 기본 MCP 설정 위치를 확인하려면 홈 디렉토리( ~/ )를 확인하세요.
{ "mcpServers": { // ... keep your existing MCP servers here ... "github.com/thadius83/mcp-server-openai": { "command": "python", "args": ["-m", "src.mcp_server_openai.server", "--openai-api-key", "your-key-here"], "env": { "PYTHONPATH": "/path/to/your/mcp-server-openai" } } } }
  1. OpenAI API 키 받기 :
    • OpenAI 웹사이트를 방문하세요
    • 계정을 생성하거나 로그인하세요
    • API 설정으로 이동
    • 새로운 API 키 생성
    • 위에 표시된 대로 구성 파일에 키를 추가하세요.
  2. 클로드를 다시 시작하세요 :
    • 구성을 업데이트한 후 변경 사항을 적용하려면 Claude를 다시 시작하세요.

용법

이 서버는 OpenAI 모델을 쿼리하는 데 사용할 수 있는 단일 도구인 ask-openai 제공합니다. Claude에서 use_mcp_tool 명령을 사용하여 직접 사용할 수 있습니다.

<use_mcp_tool> <server_name>github.com/thadius83/mcp-server-openai</server_name> <tool_name>ask-openai</tool_name> <arguments> { "query": "What are the key features of Python's asyncio library?", "model": "o3-mini" // Optional, defaults to o3-mini } </arguments> </use_mcp_tool>

모델 비교

  1. o3-mini(기본값)
    • 가장 적합한 용도: 빠르고 간결한 답변
    • 스타일: 직접적이고 효율적
    • 응답 예시:
      Python's asyncio provides non-blocking, collaborative multitasking. Key features: 1. Event Loop – Schedules and runs asynchronous tasks 2. Coroutines – Functions you can pause and resume 3. Tasks – Run coroutines concurrently 4. Futures – Represent future results 5. Non-blocking I/O – Efficient handling of I/O operations
  2. gpt-4o-미니
    • 가장 적합한 용도: 보다 포괄적인 설명
    • 스타일: 상세하고 철저함
    • 응답 예시:
      Python's asyncio library provides a comprehensive framework for asynchronous programming. It includes an event loop for managing tasks, coroutines for writing non-blocking code, tasks for concurrent execution, futures for handling future results, and efficient I/O operations. The library also provides synchronization primitives and high-level APIs for network programming.

응답 형식

이 도구는 표준화된 형식으로 응답을 반환합니다.

{ "content": [ { "type": "text", "text": "Response from the model..." } ] }

문제 해결

  1. 서버를 찾을 수 없습니다 :
    • 구성에서 PYTHONPATH가 올바른 디렉토리를 가리키는지 확인하세요.
    • Python과 pip가 제대로 설치되었는지 확인하세요.
    • 오류를 확인하려면 python -m src.mcp_server_openai.server --openai-api-key your-key-here 직접 실행해보세요.
  2. 인증 오류 :
    • OpenAI API 키가 유효한지 확인하세요
    • args 배열에 키가 올바르게 전달되었는지 확인하세요.
    • 키에 추가 공백이나 문자가 없는지 확인하세요.
  3. 모델 오류 :
    • 지원되는 모델(o3-mini 또는 gpt-4o-mini)을 사용하고 있는지 확인하세요.
    • 귀하의 쿼리가 비어 있지 않은지 확인하세요
    • 토큰 한도를 초과하지 않는지 확인하세요

개발

# Install development dependencies pip install -e ".[dev]" # Run tests pytest -v test_openai.py -s

원본과의 변경 사항

  • o3-mini 및 gpt-4o-mini 모델에 대한 지원이 추가되었습니다.
  • 개선된 메시지 형식
  • 더 나은 호환성을 위해 온도 매개변수를 제거했습니다.
  • 자세한 사용 예제가 포함된 업데이트된 문서
  • 모델 비교 및 응답 예시 추가
  • 향상된 설치 지침
  • 문제 해결 가이드 추가

특허

MIT 라이센스

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP 프로토콜을 통해 OpenAI 모델과의 통합을 지원하여 Claude Desktop에서 사용할 수 있는 간결하고 자세한 응답을 지원합니다.

  1. Cline Auto Install
    1. Features
      1. Installation
        1. Installing via Smithery
        2. Manual Installation
      2. Usage
        1. Model Comparison
        2. Response Format
      3. Troubleshooting
        1. Development
          1. Changes from Original
            1. License
              ID: fzgyk9mw5e