Integrate Claude with OpenAI-compatible chat servers for seamless AI Chat completions and multi-provider support
The Any-Chat-Completions-MCP Server is a TypeScript-based implementation of the Model Context Protocol (MCP) infrastructure, designed to enable interoperability between various AI applications and chat completion APIs like OpenAI, Perplexity, Groq, xAI, PyroPrompts, and more. By adhering to MCP standards, this server ensures seamless communication and integration with compatible clients such as Claude Desktop and other tools that support the protocol.
The core feature of the Any-Chat-Completions-MCP Server lies in its ability to act as a mediator between AI applications and chat completion APIs. This mediation is crucial for providing users with access to a wide array of AI engines without requiring them to switch tools or integrate multiple services manually. By implementing MCP, this server supports:
The architecture of the Any-Chat-Completions-MCP Server is built around MVC (Model-View-Controller) principles, which separates concerns between data, view presentation, and user interactions. The key components include:
chat): This tool handles incoming requests from MCP clients such as Claude Desktop, relays them to the configured chat completion API, and returns responses.graph TD
A[AI Application] -->|MCP Client| B[MCP Server]
B --> C[MCP Protocol]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
graph TD
A[MCP Client] --> B[MCP Server]
B --> C[Database/Cache Layer]
C --> D[AI Chat Provider API]
style A fill:#e1f5fe
style B fill:#d4edda
style D fill:#f7bce2
Install Dependencies
Run the following command to install all necessary dependencies:
npm install
Build the Server
To build and prepare the server for deployment, execute:
npm run build
Development with Auto-Reload
For a development environment that automatically reloads on code changes:
npm run watch
The Any-Chat-Completions-MCP Server can be utilized in a variety of AI workflows to enhance the capabilities of existing applications. Here are two realistic use cases:
To configure the Any-Chat-Completions-MCP Server for use with Claude Desktop, add or modify the claude_desktop_config.json file as follows:
{
"mcpServers": {
"chat-openai": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "OPENAI_API_KEY",
"AI_CHAT_NAME": "OpenAI",
"AI_CHAT_MODEL": "gpt-4o",
"AI_CHAT_BASE_URL": "https://api.openai.com/v1"
}
},
"chat-pyroprompts": {
"command": "node",
"args": [
"/path/to/any-chat-completions-mcp/build/index.js"
],
"env": {
"AI_CHAT_KEY": "PYROPROMPTS_API_KEY",
"AI_CHAT_NAME": "PyroPrompts",
"AI_CHAT_MODEL": "ash",
"AI_CHAT_BASE_URL": "https://api.pyroprompts.com/openaiv1"
}
}
}
}
The Any-Chat-Completions-MCP Server supports the following MCP clients:
| MCP Client | Resources | Tools | Prompts |
|---|---|---|---|
| Claude Desktop | ✅ | ✅ | ✅ |
| Continue | ✅ | ✅ | ✅ |
| Cursor | ❌ | ✅ | ❌ |
This compatibility matrix indicates that the server is fully integrated with Claude Desktop and Continue, allowing seamless access to chat completions.
The Any-Chat-Completions-MCP Server has been tested for performance under varying conditions. Here’s a breakdown of its current stability:
| AI Application | Integration Status |
|---|---|
| OpenAI | Stable |
| Perplexity | Stable |
| PyroPrompts | Stable |
The server is designed to be compatible with multiple chat completion APIs, ensuring robustness and flexibility across different use cases.
For advanced users, the server allows full customization via environment variables. Key configurations include:
AI_CHAT_KEY: The API key for your chosen provider.AI_CHAT_NAME: A descriptive name for the chat completion service.AI_CHAT_MODEL: The specific model to use when interacting with the API.Security measures can be configured using standard environment variable settings, ensuring that sensitive information is handled securely. Additionally, users can leverage the MCP Inspector tool for real-time debugging and monitoring.
The Any-Chat-Completions-MCP Server offers a standardized method of integrating various AI services, making it easier to switch between different providers without changing underlying code.
Yes, the server supports adding multiple configurations in claude_desktop_config.json. Each provider can be configured with unique environment variables and referenced separately in the API client.
The Any-Chat-Completions-MCP Server is built using TypeScript and Node.js. Ensure you have a recent version of Node.js installed before proceeding with installation and configuration steps.
Use the npm run inspector command to launch the MCP Inspector, which provides access to debugging tools through your web browser.
Absolutely! The server can be adapted for various AI use cases and workflows, making it a versatile addition to any project that requires API integration.
Contributions are welcome from the community. If you wish to contribute, start by reviewing the Contribution Guide available on GitHub. This guide covers best practices for contributors, including code style and pull request policies.
Get involved in the Model Context Protocol (MCP) ecosystem:
This project was sponsored by PyroPrompts. Use code CLAUDEANYCHAT for 20 free automation credits on PyroPrompts. A special thanks also goes to the ModelContextProtocol team and Anthropic for their contributions to the MCP specification and standards.
By integrating the Any-Chat-Completions-MCP Server, developers can significantly enhance the functionality of AI applications while maintaining compatibility across various platforms and APIs.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration