mcp-simple-openai-assistant
by: andybrandt
MCP server that gives Claude ability to use OpenAI's GPTs assistants
📌Overview
Purpose: To provide a simple server for creating and interacting with OpenAI assistants through the Model Context Protocol.
Overview: The MCP Simple OpenAI Assistant framework allows users to efficiently manage and communicate with OpenAI assistants. It provides an interface for creating assistants, manipulating existing ones, and enabling conversations, particularly suited for applications like Claude Desktop.
Key Features:
-
Assistant Management: Create, list, and modify OpenAI assistants easily, enabling users to customize interactions according to their needs.
-
Conversation Handling: Start conversation threads and send messages, allowing for a seamless back-and-forth dialogue with assistants, while introducing a two-stage processing method to manage response delays effectively.
MCP Simple OpenAI Assistant
A simple MCP server for interacting with OpenAI assistants. This server allows tools like Claude Desktop to create and interact with OpenAI assistants through the Model Context Protocol.
Features
- Create new OpenAI assistants
- Start conversation threads
- Send messages and receive responses
Installation
pip install mcp-simple-openai-assistant
Configuration
The server requires an OpenAI API key to be set in the environment. For Claude Desktop, add the following to your configuration:
MacOS Version
{
"mcpServers": {
"openai-assistant": {
"command": "python",
"args": ["-m", "mcp_simple_openai_assistant"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}
Windows Version
{
"mcpServers": {
"openai-assistant": {
"command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
"args": ["-m", "mcp_simple_openai_assistant"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}
Note: The Windows installation may require checking the actual path to your Python executable.
Usage
Once configured, the server provides tools to:
- Create new assistants with specific instructions
- List existing assistants
- Modify assistants
- Start new conversation threads
- Send messages and receive responses
TODO
- Add a way to handle threads - store thread IDs for potential reuse
- Improve handling of long OpenAI responses to prevent timeouts
Development
To install for development:
git clone https://github.com/andybrandt/mcp-simple-openai-assistant
cd mcp-simple-openai-assistant
pip install -e .