any-chat-completions-mcp

MCP.Pizza Chef: pyroprompts

One extra tool appears in your assistant, and it passes whatever you ask along to another chat provider, then pastes that provider's reply straight back into your conversation. OpenAI, Perplexity, Groq, xAI and anything that accepts the same request format all work. Each copy is pinned to one provider and one model set in the config file, so comparing two models means installing two copies. You bring your own provider key, most providers charge per message, and the code has not changed since May 2025.

Unmaintained · no code changes since May 2025
Web/Research
Writing

Use This MCP server To

Ask a second model to sanity-check an answer I got Send a research question to Perplexity without leaving my chat Compare how two models word the same paragraph Use a cheaper model for long, repetitive rewriting jobs Reach a model my main chat app does not offer

README

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.

smithery badge

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

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:

Claude Desktop Home with Chat Tools

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

Claude Chat with OpenAI

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:

LibreChat with Perplexity Chat

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 claude

Debugging

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 inspector

The Inspector will provide a URL to access debugging tools in your browser.

Acknowledgements

any-chat-completions-mcp FAQ

Is this still being maintained?
The code has not been touched since May 2025, well over a year ago, and several issues are open. It still works because the request format it uses is stable, but treat it as finished rather than actively developed.
Do I need a key, and does it cost money?
Yes to both, in most cases. You supply a key from whichever provider you point it at, and OpenAI, xAI, Perplexity and Groq all bill per message from a funded account. A key with no credit behind it will simply return errors.
Can I choose the model separately for each question?
No. The provider, the model and any standing instruction are all fixed in the config file, and the tool itself accepts nothing but your message text. To use a second model you install a second copy under a different name.
What is the tool actually called in the chat?
Not simply chat, as the readme suggests. The name is built from the label you choose, so a provider labelled Perplexity shows up as chat-with-perplexity.
Which apps does it work in?
Claude Desktop and LibreChat are documented with worked examples, and any other app that can launch a local MCP server will work. Setup is pasting a short block into a config file.
Does my text leave my computer?
Yes. Every question you route through it is sent to the outside provider you configured and is handled under that provider's terms, so keep confidential material out of it.
Can I use this to get a second opinion on a draft?
Yes, and it is the most natural use. You paste or reference the draft, the other model replies, and both views sit side by side in one conversation.
Are there limits I should know about?
It sends one message at a time with no memory of earlier turns, handles text only, and gives up after about thirty seconds by default. It also advertises saved prompts and files but provides neither.