any-chat-completions-mcp

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.

104
14

any-chat-completions-mcp MCP Server

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.

Development

Install dependencies using npm install. Build the server with npm run build. For development with auto-rebuild, use npm run watch.

Installation

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.

Debugging

Use the MCP Inspector for debugging, accessible via npm run inspector.

Acknowledgements

Thanks to the modelcontextprotocol and Anthropic team for the MCP Specification and integration into Claude Desktop, and PyroPrompts for sponsoring this project.

Repository

PY
pyroprompts

pyroprompts/any-chat-completions-mcp

Created

December 2, 2024

Updated

March 28, 2025

Language

JavaScript

Category

AI