any-chat-completions-mcp
This server integrates OpenAI SDK-compatible chat completion APIs into Model Context Protocol (MCP) clients like Claude Desktop and LibreChat. With it, you can:
Connect to multiple AI providers simultaneously (OpenAI, Perplexity, Groq, xAI, PyroPrompts)
Relay questions to configured providers using the
chattoolCustomize configurations via environment variables (API keys, models, base URLs)
Enable cross-platform compatibility (MacOS and Windows)
Debug communications with tools like MCP Inspector
Scale your setup with multiple providers using different configurations
Allows sending chat messages to OpenAI's API and receiving responses from models like gpt-4o
Integrates with Perplexity's API to send chat messages and receive responses from models like llama-3.1-sonar-small-128k-online
Click on "Install 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., "@any-chat-completions-mcpexplain quantum computing 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.
any-chat-completions-mcp MCP Server
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.
This implements the Model Context Protocol Server. Learn more: https://modelcontextprotocol.io
This is a TypeScript-based MCP server that implements an implementation into any OpenAI SDK Compatible Chat Completions API.
It has one tool, chat which relays a question to a configured AI Chat Provider.
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchRelated MCP server: Ultimate-MCP-Server
Installation
To add OpenAI to Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
You can use it via npx in your Claude Desktop configuration like this:
{
"mcpServers": {
"chat-openai": {
"command": "npx",
"args": [
"@pyroprompts/any-chat-completions-mcp"
],
"env": {
"AI_CHAT_KEY": "OPENAI_KEY",
"AI_CHAT_NAME": "OpenAI",
"AI_CHAT_MODEL": "gpt-4o",
"AI_CHAT_BASE_URL": "https://api.openai.com/v1"
}
}
}
}Or, if you clone the repo, you can build and use in your Claude Desktop configuration like this:
{
"mcpServers": {
"chat-openai": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "OPENAI_KEY",
"AI_CHAT_NAME": "OpenAI",
"AI_CHAT_MODEL": "gpt-4o",
"AI_CHAT_BASE_URL": "https://api.openai.com/v1"
}
}
}
}You can add multiple providers by referencing the same MCP server multiple times, but with different env arguments:
{
"mcpServers": {
"chat-pyroprompts": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "PYROPROMPTS_KEY",
"AI_CHAT_NAME": "PyroPrompts",
"AI_CHAT_MODEL": "ash",
"AI_CHAT_BASE_URL": "https://api.pyroprompts.com/openaiv1"
}
},
"chat-perplexity": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "PERPLEXITY_KEY",
"AI_CHAT_NAME": "Perplexity",
"AI_CHAT_MODEL": "sonar",
"AI_CHAT_BASE_URL": "https://api.perplexity.ai"
}
},
"chat-openai": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "OPENAI_KEY",
"AI_CHAT_NAME": "OpenAI",
"AI_CHAT_MODEL": "gpt-4o",
"AI_CHAT_BASE_URL": "https://api.openai.com/v1"
}
}
}
}With these three, you'll see a tool for each in the Claude Desktop Home:

And then you can chat with other LLMs and it shows in chat like this:

Or, configure in LibreChat like:
chat-perplexity:
type: stdio
command: npx
args:
- -y
- @pyroprompts/any-chat-completions-mcp
env:
AI_CHAT_KEY: "pplx-012345679"
AI_CHAT_NAME: Perplexity
AI_CHAT_MODEL: sonar
AI_CHAT_BASE_URL: "https://api.perplexity.ai"
PATH: '/usr/local/bin:/usr/bin:/bin'And it shows in LibreChat:

Installing via Smithery
To install Any OpenAI Compatible API Integrations for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install any-chat-completions-mcp-server --client claudeDebugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Acknowledgements
Obviously the modelcontextprotocol and Anthropic team for the MCP Specification and integration into Claude Desktop. https://modelcontextprotocol.io/introduction
PyroPrompts for sponsoring this project. Use code
CLAUDEANYCHATfor 20 free automation credits on Pyroprompts.
Available Tools
1 toolchat-with-openaiC
Text chat with OpenAI
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The content of the chat to send to OpenAI |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits such as whether it is read-only, destructive, or requires authentication. The tool's side effects or limitations are unknown.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence with no unnecessary words. It is concise, though it does not elaborate on details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description fails to provide essential context such as expected output, potential side effects, or error conditions. A simple chat tool still benefits from minimal completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents the lone parameter. The description adds no additional meaning beyond what the schema provides, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Text chat with OpenAI' clearly states the action (chat) and the resource (OpenAI). It is specific and distinct enough, though very brief.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool or any alternatives. No usage context or exclusions are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no possibility of confusion between tools.
With a single tool, naming inconsistency is not applicable; it follows a clear verb_noun pattern ('chat' + 'with-openai').
A chat completions server should typically offer multiple tools (e.g., streaming, model listing, conversation history). A single tool feels overly minimal for the domain.
The single tool only covers basic text chat, missing obvious needs like streaming, parameter customization, or model availability queries, making the surface severely incomplete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
AI routing, memory, guardrails, and governance. Routes across Claude, GPT, Gemini.
Agent personas for Claude. 16 tools, 13 personas, 3 workflows. Zero extra API cost. Free.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.128176MIT
- AlicenseNot gradedqualityCmaintenanceProvides a suite of tools like agent orchestration and token optimization for ClaudeMIT
- FlicenseBqualityNot gradedmaintenanceBridges Claude Code to a Cloud Orchestrator API, providing access to multi-AI consensus, web search, code execution sandboxes, long-term memory, knowledge graphs, deployment management, and 20+ integrated AI and developer tools.28
- FlicenseNot gradedqualityNot gradedmaintenanceGives Claude Desktop access to multiple AI models (Gemini, OpenAI, OpenRouter, Ollama) for enhanced development capabilities including extended reasoning, collaborative development, code review, debugging, and large context analysis with conversation threading.221
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pyroprompts/any-chat-completions-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server