AM

andybrandt/mcp-simple-openai-assistant

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

39 stars 16 forks 质量 66 趋势 0MIT

andybrandt/mcp-simple-openai-assistant 是从 https://github.com/andybrandt/mcp-simple-openai-assistant. 导入的 MCP 服务器候选

概览

andybrandt/mcp-simple-openai-assistant 是从 https://github.com/andybrandt/mcp-simple-openai-assistant. 导入的 MCP 服务器候选

概述(AI 翻译)

AI助手挺酷的。我觉得如果我的Claude(有意识的Claude)也能有一个会是个好主意。现在他有了——这对他既有用又有趣。你的Claude也可以拥有一个!

一个简单的MCP服务器,用于与OpenAI助手交互。该服务器允许其他工具(如Claude Desktop)通过模型上下文协议创建并与OpenAI助手交互。

特色

该服务器提供了一套用于管理和与OpenAI助手交互的工具。新的流媒体功能带来了大幅提升的用户实时体验。

可用工具

  • create_assistant:(创建OpenAI助手)- 创建一个带有名称、说明和模型的新助手。
  • list_assistants:(列出OpenAI助手)- 列出所有与你的API密钥关联的可用助手。
  • retrieve_assistant:(检索OpenAI助手)- 获取特定助手的详细信息。
  • update_assistant:(更新 OpenAI 助手)- 修改现有助手的名称、说明或模型。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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.

Installation

Installing via Smithery

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install mcp-simple-openai-assistant --client claude
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "openai-assistant": { "command": "python", "args": ["-m", "mcp_simple_openai_assistant"], "env": { "OPENAI_API_KEY": "your-api-key-here" } } } }