Skip to main content

A simple MCP server for interacting with OpenAI assistants

Project description

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

  • Create new OpenAI assistants and manipulate existing ones
  • Start conversation threads
  • Send messages and receive responses - talk to assistants

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 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"
  }
}

Usage

Once configured, the server provides tools to:

  1. Create new assistants with specific instructions
  2. List existing assistants
  3. Modify assistants
  4. Start new conversation threads
  5. Send messages and receive responses

The server handles all OpenAI API communication, including managing assistants, threads, and message handling.

TODO

  • Add a way to handle threads - store threads IDs for potential re-use
  • Add a way to better handle long OpenAI responses which now seem to sometimes trigger timeouts

Development

To install for development:

git clone https://github.com/andybrandt/mcp-simple-openai-assistant
cd mcp-simple-openai-assistant
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_simple_openai_assistant-0.2.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_simple_openai_assistant-0.2.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_simple_openai_assistant-0.2.3.tar.gz.

File metadata

File hashes

Hashes for mcp_simple_openai_assistant-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a1e435dbd5320b01869ceb0759805fa5566d9edce224bbee2983ca4945ed0468
MD5 37067550458a31fc97fa2d0467b75e65
BLAKE2b-256 e4c9ba132b8cb161a6918b0b9c00f15f918ca31a1c4859e2ed9fe3cc95a34931

See more details on using hashes here.

File details

Details for the file mcp_simple_openai_assistant-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_simple_openai_assistant-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5de608d8095ec8373e0c0771fa1bda8a9ac6acd300b2a7332e2d6e0cd1e4af3d
MD5 c8fcb7d8b96b3b1df9ba188810fcab78
BLAKE2b-256 14d1862d911db0e2bd4828465cc337cb3c35262b8141cafc68be46577bc7ae74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page