Any Chat Completions

v1.0.0Coding Agentsstable

Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.

mcpmcp-server
Share:
151
Stars
0
Downloads
0
Weekly
0/5

What is Any Chat Completions?

Any Chat Completions is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to integrate claude with any openai sdk compatible chat completion api - openai, perplexity, groq, xai, pyroprompts and more.

Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Integrate Claude with Any OpenAI SDK Compatible Chat Complet

Use Cases

Integrate OpenAI SDK compatible APIs
Use Perplexity, Groq, xAI models
pyroprompts

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedApr 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx any-chat-completions

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Any Chat Completions

any-chat-completions-mcp lets Claude Desktop and other MCP clients talk directly to any OpenAI SDK-compatible chat completion API — including OpenAI, Perplexity, Groq, xAI, and PyroPrompts — by exposing a single `chat` tool per configured provider. You can run multiple provider instances side-by-side in one config file, enabling Claude to delegate questions to Perplexity for live web search results, Groq for fast inference, or any other compatible endpoint without leaving your conversation.

Prerequisites

  • Node.js 18+ and npm installed
  • Claude Desktop or another MCP-compatible client
  • API key(s) for the providers you want to use (OpenAI, Perplexity, Groq, xAI, etc.)
  • The base URL of any OpenAI-compatible endpoint you plan to configure
1

Install via Smithery (recommended)

The fastest way to install is via the Smithery CLI, which handles package installation and config wiring automatically.

npx -y @smithery/cli install any-chat-completions-mcp-server --client claude
2

Or clone and build manually

Alternatively, clone the repository, install dependencies, and compile the TypeScript source.

git clone https://github.com/pyroprompts/any-chat-completions-mcp.git
cd any-chat-completions-mcp
npm install
npm run build
3

Open Claude Desktop config

Open your Claude Desktop configuration file in a text editor. It lives at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows.

4

Add one or more provider entries

Each provider gets its own named entry under `mcpServers`. Set the four environment variables — AI_CHAT_KEY, AI_CHAT_NAME, AI_CHAT_MODEL, and AI_CHAT_BASE_URL — for each provider you want to use.

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": ["@pyroprompts/any-chat-completions-mcp"],
      "env": {
        "AI_CHAT_KEY": "pplx-your-api-key",
        "AI_CHAT_NAME": "Perplexity",
        "AI_CHAT_MODEL": "sonar",
        "AI_CHAT_BASE_URL": "https://api.perplexity.ai"
      }
    },
    "groq": {
      "command": "npx",
      "args": ["@pyroprompts/any-chat-completions-mcp"],
      "env": {
        "AI_CHAT_KEY": "gsk_your-groq-key",
        "AI_CHAT_NAME": "Groq",
        "AI_CHAT_MODEL": "llama-3.3-70b-versatile",
        "AI_CHAT_BASE_URL": "https://api.groq.com/openai"
      }
    }
  }
}
5

Restart Claude Desktop

Fully quit and reopen Claude Desktop (not just close the window) so it picks up the new MCP server entries. You should see the provider names appear in the tools list.

Any Chat Completions Examples

Client configuration

Full example showing OpenAI and xAI configured side by side in claude_desktop_config.json.

{
  "mcpServers": {
    "openai": {
      "command": "npx",
      "args": ["@pyroprompts/any-chat-completions-mcp"],
      "env": {
        "AI_CHAT_KEY": "sk-your-openai-key",
        "AI_CHAT_NAME": "OpenAI",
        "AI_CHAT_MODEL": "gpt-4o",
        "AI_CHAT_BASE_URL": "https://api.openai.com"
      }
    },
    "xai": {
      "command": "npx",
      "args": ["@pyroprompts/any-chat-completions-mcp"],
      "env": {
        "AI_CHAT_KEY": "xai-your-key",
        "AI_CHAT_NAME": "xAI",
        "AI_CHAT_MODEL": "grok-2",
        "AI_CHAT_BASE_URL": "https://api.x.ai"
      }
    }
  }
}

Prompts to try

Once configured, you can explicitly route questions to each provider using its name in your prompt.

- "Ask Perplexity: what are the latest developments in fusion energy this week?"
- "Use Groq to summarize this text as fast as possible: [paste text]"
- "Ask OpenAI gpt-4o to review this code for security vulnerabilities: [paste code]"
- "Compare answers from Perplexity and OpenAI on the best Python web frameworks in 2025."

Troubleshooting Any Chat Completions

The `chat` tool does not appear in Claude Desktop after adding the config

Make sure you fully quit Claude Desktop (Cmd+Q on macOS, not just close the window) and reopen it. Also verify there are no JSON syntax errors in claude_desktop_config.json by running it through a JSON validator.

Tool call returns '401 Unauthorized' or 'Invalid API key'

Check that AI_CHAT_KEY is set to your actual provider API key with no extra spaces or quotes. Confirm AI_CHAT_BASE_URL matches the provider's exact base URL (e.g., `https://api.perplexity.ai`, not `https://api.perplexity.ai/v1`).

Model not found error when the tool is called

Verify AI_CHAT_MODEL matches the exact model identifier used by the provider (e.g., `sonar` for Perplexity, `grok-2` for xAI). Check the provider's documentation for the current list of available model IDs.

Frequently Asked Questions about Any Chat Completions

What is Any Chat Completions?

Any Chat Completions is a Model Context Protocol (MCP) server that integrate claude with any openai sdk compatible chat completion api - openai, perplexity, groq, xai, pyroprompts and more. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Any Chat Completions?

Follow the installation instructions on the Any Chat Completions GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Any Chat Completions?

Any Chat Completions works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Any Chat Completions free to use?

Yes, Any Chat Completions is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "any-chat-completions": { "command": "npx", "args": ["-y", "any-chat-completions"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Any Chat Completions?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides