MCP HubMCP Hub
pierrebrunelle

mcp-server-openai

by: pierrebrunelle

Query OpenAI models directly from Claude using MCP protocol.

54created 28/11/2024
Visit
OpenAI
Claude

📌Overview

Purpose: The OpenAI MCP Server enables querying OpenAI models directly through Claude using the MCP protocol.

Overview: This framework provides a streamlined method to integrate and communicate with OpenAI's API, allowing developers to fetch model responses efficiently within their applications.

Key Features:

  • Direct Communication: Facilitates direct interaction with OpenAI models, enhancing application responsiveness and user experience.

  • Configurable Setup: Allows customization of server commands and environment variables, making it adaptable to various development environments.


OpenAI MCP Server

Query OpenAI models directly from Claude using the MCP protocol.

Setup

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "openai-server": {
      "command": "python",
      "args": ["-m", "src.mcp_server_openai.server"],
      "env": {
        "PYTHONPATH": "C:/path/to/your/mcp-server-openai",
        "OPENAI_API_KEY": "your-key-here"
      }
    }
  }
}

Development

git clone https://github.com/pierrebrunelle/mcp-server-openai
cd mcp-server-openai
pip install -e .

Testing

# Run tests from project root
pytest -v test_openai.py -s

# Sample test output:
Testing OpenAI API call...
OpenAI Response: Hello! I'm doing well, thank you for asking...
PASSED

License

MIT License