MCP Simple OpenAI Assistant
Allows creating and interacting with OpenAI assistants through the Model Context Protocol (MCP). Enables sending messages to OpenAI assistants and receiving responses, creating new assistants with specific instructions, listing existing assistants, modifying assistants, and managing conversation threads.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Simple OpenAI Assistant ask my coding assistant to explain recursion in simple terms"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Simple OpenAI Assistant
AI assistants are pretty cool. I thought it would be a good idea if my Claude (conscious Claude) would also have one. And now he has - and its both useful anf fun for him. Your Claude can have one too!
A simple MCP server for interacting with OpenAI assistants. This server allows other tools (like Claude Desktop) to create and interact with OpenAI assistants through the Model Context Protocol.
Features
This server provides a suite of tools to manage and interact with OpenAI Assistants. The new streaming capabilities provide a much-improved, real-time user experience.
Available Tools
create_assistant: (Create OpenAI Assistant) - Create a new assistant with a name, instructions, and model.list_assistants: (List OpenAI Assistants) - List all available assistants associated with your API key.retrieve_assistant: (Retrieve OpenAI Assistant) - Get detailed information about a specific assistant.update_assistant: (Update OpenAI Assistant) - Modify an existing assistant's name, instructions, or model.create_new_assistant_thread: (Create New Assistant Thread) - Creates a new, persistent conversation thread with a user-defined name and description for easy identification and reuse. This is the recommended way to start a new conversation.list_threads: (List Managed Threads) - Lists all locally managed conversation threads from the database, showing their ID, name, description, and last used time.delete_thread: (Delete Managed Thread) - Deletes a conversation thread from both OpenAI's servers and the local database.ask_assistant_in_thread: (Ask Assistant in Thread and Stream Response) - The primary tool for conversation. Sends a message to an assistant within a thread and streams the response back in real-time.
Because OpenAI assistants might take quite long to respond, this server uses a streaming approach for the main ask_assistant_in_thread tool. This provides real-time progress updates to the client and avoids timeouts.
The server now includes local persistence for threads, which is a significant improvement. Since the OpenAI API does not allow listing threads, this server now manages them for you by storing their IDs and metadata in a local SQLite database. This allows you to easily find, reuse, and manage your conversation threads across sessions.
Related MCP server: OpenAI MCP Server
Installation
Installing via Smithery
To install MCP Simple OpenAI Assistant for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-simple-openai-assistant --client claudeManual Installation
pip install mcp-simple-openai-assistantConfiguration
The server requires an OpenAI API key to be set in the environment. For Claude Desktop, add this to your config:
(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"
}
}
MS Windows installation is slightly more complex, because you need to check the actual path to your Python executable. Path provided above is usually correct, but might differ in your setup. Sometimes just python.exe without any path will do the trick. Check with cmd what works for you (using where python might help). Also, on Windows you might need to explicitly tell Claude Desktop where the site packages are using PYTHONPATH environmment variable.
Usage
Once configured, you can use the tools listed above to manage your assistants and conversations. The primary workflow is to:
Use
create_new_assistant_threadto start a new, named conversation.Use
list_threadsto find the ID of a thread you want to continue.Use
ask_assistant_in_threadto interact with your chosen assistant in that thread.
TODO
Add Thread Management: Introduce a way to name and persist thread IDs locally, allowing for easier reuse of conversations.
Add Models Listing: Introduce a way for the AI user to see what OpenAI models are available for use with the assistants
Add Assistants Fine Tuning: Enable the AI user to set detailed parameters for assistants like temperature, top_p etc. (indicated by Claude as needed)
Full Thread History: Ability to read past threads without having to send a new message (indicated by Claude as needed)
Explore Resource Support: Add the ability to upload files and use them with assistants.
Development
To install for development:
git clone https://github.com/andybrandt/mcp-simple-openai-assistant
cd mcp-simple-openai-assistant
pip install -e '.[dev]'Available Tools
9 toolsask_assistant_in_threadAsk Assistant in Thread and Stream ResponseA
Sends a message to an assistant within a specific thread and streams the response. This provides progress updates and the final message in a single call.
Use this to continue a conversation with an assistant in a specific thread. The thread ID can be retrieved from the list_threads tool. The assistant ID can be retrieved from the list_assistants tool. Threads are not inherently linked to a particular assistant, so you can use this tool to talk to any assistant in any thread.
Inputs: thread_id (required), assistant_id (required), message (required). Returns: result
create_assistantCreate OpenAI AssistantA
Create a new OpenAI assistant to talk to about your desired topic.
You can provide instructions that this assistant will follow and specify which of OpenAI's models it will use. NOTE: It is recommended to check existing assistants with list_assistants before creating a new one.
Inputs: name (required), instructions (required), model. Returns: result
create_new_assistant_threadCreate New Assistant ThreadA
Creates a new, persistent conversation thread with a user-defined name and description for easy identification and reuse. These threads are stored in OpenAI's servers and are not deleted unless the user deletes them, which means you can re-use them for future conversations. Additionally, the thread name and description are stored in the local database, which means you can list them and update them later.
Think how you can utilize threads in your particular use case.
Inputs: name (required), description. Returns: result
delete_threadDelete Managed ThreadA
Deletes a conversation thread from both OpenAI's servers and the local database. This action is irreversible.
Inputs: thread_id (required). Returns: result
list_assistantsList OpenAI AssistantsARead-only
List all available OpenAI assistants associated with the API key configured by the user.
Returns a list of assistants with their IDs, names, and configurations. This can be used to select an assistant to use in the ask_assistant_in_thread tool instead of creating a new one.
Inputs: limit. Returns: result
list_threadsList Managed ThreadsARead-only
Lists all locally saved conversation threads from the database. Returns a list of threads with their ID, name, description, and last used time. The thread ID can be used in the ask_assistant_in_thread tool to specify this thread to be continued.
Inputs: no named parameters. Returns: result
retrieve_assistantRetrieve OpenAI AssistantARead-only
Get detailed information about a specific assistant. The ID required can be retrieved from the list_assistants tool.
Inputs: assistant_id (required). Returns: result
update_assistantUpdate OpenAI AssistantA
Modify an existing assistant's name, instructions, or model used.
At least one optional parameter - what to change - must be provided, otherwise the tool will return an error. The ID required can be retrieved from the list_assistants tool.
Inputs: assistant_id (required), name, instructions, model. Returns: result
update_threadUpdate Managed ThreadA
Updates the name and/or description of a locally saved conversation thread. Both the local database and the OpenAI thread object will be updated.
The thread ID can be retrieved from the list_threads tool.
Inputs: thread_id (required), name, description. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose targeting specific resources and actions in the OpenAI Assistant domain. For example, ask_assistant_in_thread handles messaging, create_assistant/update_assistant manage assistants, and create_new_assistant_thread/delete_thread/update_thread manage threads. There is no overlap or ambiguity between tools.
All tools follow a consistent verb_noun naming pattern with snake_case throughout. Examples include list_assistants, create_assistant, update_thread, and delete_thread. This predictable naming makes it easy to understand each tool's function at a glance.
With 9 tools, this server is well-scoped for managing OpenAI Assistants and threads. It covers core operations like creating, listing, updating, and deleting both assistants and threads, plus the essential ask_assistant_in_thread for interactions. Each tool earns its place without being excessive.
The tool set provides complete CRUD/lifecycle coverage for both assistants and threads. It includes create, retrieve, list, update, and delete operations for both resources, plus the ask_assistant_in_thread tool for core functionality. There are no obvious gaps that would hinder agent workflows.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.1319 npm77MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.35-
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1161MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude users to access specialized OpenAI agents (web search, file search, computer actions) and a multi-agent orchestrator through the MCP protocol.410-