npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openai-mcp-tools

v1.0.0

Published

Complete MCP server for OpenAI Assistants API - Files, Vector Stores, Assistants, Threads, Messages, and Runs with 41 tools

Downloads

9

Readme

OpenAI MCP Server

A Model Context Protocol (MCP) server that provides seamless integration with OpenAI's Files, Vector Stores, Assistants, Threads, Messages, and Runs APIs. This server enables Claude Desktop and other MCP clients to manage OpenAI resources and execute assistant conversations directly through natural language.

41 comprehensive tools covering the complete OpenAI Assistants API workflow including file management, vector store operations, assistant configuration, and full conversation execution.

Usage

Use with any MCP-compatible client like Claude/Cursor/VS Code. Add the following configuration to your MCP settings:

{
  "mcpServers": {
    "openai": {
      "command": "npx",
      "args": ["-y", "openai-mcp-tools"],
      "env": {
        "OPENAI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Replace your_api_key_here with your OpenAI API key.

Available Tools

Files API (5 tools)

  • upload_file - Upload files to OpenAI for use with Assistants and Fine-tuning
  • list_files - List all files in your organization with optional filtering
  • get_file - Retrieve detailed information about a specific file
  • delete_file - Delete files from OpenAI
  • download_file_content - Download and retrieve file contents

Vector Stores API (14 tools)

  • create_vector_store - Create vector stores for semantic search
  • list_vector_stores - List all vector stores with pagination
  • get_vector_store - Get vector store details
  • update_vector_store - Update vector store configuration
  • delete_vector_store - Delete vector stores
  • add_file_to_vector_store - Add files to vector stores
  • list_vector_store_files - List files in a vector store
  • remove_file_from_vector_store - Remove files from vector stores
  • get_vector_store_file - Get file details in a vector store
  • get_vector_store_file_content - Get parsed content from vector store
  • create_vector_store_file_batch - Batch add up to 500 files
  • get_vector_store_file_batch - Get batch operation status
  • cancel_vector_store_file_batch - Cancel in-progress batch
  • list_vector_store_file_batch_files - List files in a batch
  • search_vector_store - Direct semantic search in vector stores

Assistants API (6 tools)

  • create_assistant - Create AI assistants with file search capabilities
  • list_assistants - List all assistants
  • get_assistant - Get assistant details
  • update_assistant - Update assistant configuration
  • delete_assistant - Delete assistants
  • attach_vector_store_to_assistant - Attach vector stores to assistants for knowledge retrieval

Threads API (4 tools)

  • create_thread - Create conversation threads for assistants
  • get_thread - Retrieve thread details
  • update_thread - Update thread metadata and tool resources
  • delete_thread - Delete conversation threads

Messages API (5 tools)

  • create_message - Add user or assistant messages to threads
  • list_messages - List conversation history in a thread
  • get_message - Retrieve specific message details
  • update_message - Update message metadata
  • delete_message - Remove messages from threads

Runs API (7 tools)

  • create_run - Execute an assistant on a thread
  • create_thread_and_run - Create thread and run assistant in one call
  • list_runs - List all runs for a thread
  • get_run - Check run status and details
  • update_run - Update run metadata
  • cancel_run - Cancel an in-progress run
  • submit_tool_outputs - Submit tool call results to continue execution

Development

Local Setup

  1. Prerequisite:

    • Node.js v18+
    • npm v9+
  2. Clone the repository:

git clone <repo>
cd openai-mcp-tools
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Testing

npm run inspector  # Opens MCP Inspector

Error Handling

The server provides detailed error messages for common issues:

  • Missing API Key: Clear instructions on how to set the OPENAI_API_KEY
  • OpenAI API Errors: Includes status code, message, and request ID for debugging
  • File Errors: Helpful messages for file not found, permission errors, etc.

All errors are logged to stderr (safe for stdio transport) and returned to the client in a structured format.

Important Notes

Security Considerations

  • Never commit your .env file or expose your OpenAI API key
  • The API key is passed via environment variables for security
  • File paths are validated to prevent directory traversal attacks

Rate Limits

This server respects OpenAI's API rate limits. The client is configured with:

  • 60-second timeout for file uploads
  • 2 automatic retries for failed requests

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

MIT License - feel free to use this in your own projects!

Resources

Support

For issues related to: