This repository provides a Model Context Protocol (MCP) server that integrates Claude with various OpenAI SDK-compatible chat completion APIs like OpenAI, Perplexity, and Groq, enabling users to leverage different AI chat providers.
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.
This is a TypeScript-based Model Context Protocol (MCP) server, implementing integration with various OpenAI SDK-compatible chat completion APIs. It exposes a chat
tool, relaying questions to a configured AI chat provider.
Install dependencies using npm install
. Build the server with npm run build
. For development with auto-rebuild, use npm run watch
.
To integrate with Claude Desktop, modify the claude_desktop_config.json
file (located in the specified paths for MacOS and Windows). Add server configurations, defining the command, arguments, and environment variables for each provider. The AI_CHAT_KEY
, AI_CHAT_NAME
, AI_CHAT_MODEL
, and AI_CHAT_BASE_URL
environment variables configure the connection to each AI chat provider. Multiple providers can be added by referencing the same MCP server with different environment arguments.
Use the MCP Inspector for debugging, accessible via npm run inspector
.
Thanks to the modelcontextprotocol and Anthropic team for the MCP Specification and integration into Claude Desktop, and PyroPrompts for sponsoring this project.
pyroprompts/any-chat-completions-mcp
December 2, 2024
March 28, 2025
JavaScript