Any Chat Completions MCP MCP Server
MCP Server for Using Any LLM as a Tool
Overview
What is Any Chat Completions MCP?
Any Chat Completions MCP is a versatile server designed to utilize any Large Language Model (LLM) as a tool. This innovative platform allows developers and users to integrate various LLMs into their applications, enhancing the capabilities of chatbots and other conversational interfaces. By leveraging the power of LLMs, users can create more engaging and intelligent interactions, making it a valuable resource for businesses and developers alike.
Features of Any Chat Completions MCP
- Multi-LLM Support: The server supports multiple LLMs, allowing users to choose the best model for their specific needs.
- Easy Integration: With a straightforward API, developers can easily integrate the server into their existing applications.
- Scalability: The architecture is designed to handle a large number of requests, making it suitable for both small projects and large-scale applications.
- Customizable: Users can customize the behavior of the LLMs to suit their specific use cases, enhancing the user experience.
- Open Source: Being an open-source project, it encourages community contributions and transparency.
How to Use Any Chat Completions MCP
- Installation: Begin by cloning the repository from GitHub and installing the necessary dependencies.
- Configuration: Set up your environment by configuring the server settings to specify which LLMs you want to use.
- API Integration: Use the provided API endpoints to send requests to the server and receive responses from the LLMs.
- Testing: Test the integration in a development environment to ensure everything is functioning as expected.
- Deployment: Once tested, deploy the server to your production environment and start utilizing the LLMs in your applications.
Frequently Asked Questions
Q: What is the primary use case for Any Chat Completions MCP?
A: The primary use case is to enhance chatbots and conversational interfaces by integrating various LLMs, allowing for more intelligent and engaging interactions.
Q: Is Any Chat Completions MCP free to use?
A: Yes, it is an open-source project, which means it is free to use and modify.
Q: Can I contribute to the project?
A: Absolutely! Contributions are welcome. You can submit issues, feature requests, or pull requests on the GitHub repository.
Q: What programming languages are supported?
A: The server is designed to be language-agnostic, but the API can be easily accessed using popular programming languages like Python, JavaScript, and Java.
Q: How do I report issues or bugs?
A: You can report issues or bugs by creating an issue on the GitHub repository, providing details about the problem you encountered.
By utilizing Any Chat Completions MCP, developers can significantly enhance their applications' conversational capabilities, making it a powerful tool in the realm of AI and machine learning.
Details
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.
<a href="https://glama.ai/mcp/servers/nuksdrfb55"><img width="380" height="200" src="https://glama.ai/mcp/servers/nuksdrfb55/badge" /></a>
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:
And then you can chat with other LLMs and it shows in chat like this:
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:
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
- Obviously the modelcontextprotocol and Anthropic team for the MCP Specification and integration into Claude Desktop. https://modelcontextprotocol.io/introduction
- PyroPrompts for sponsoring this project. Use code
CLAUDEANYCHAT
for 20 free automation credits on Pyroprompts.
Server Config
{
"mcpServers": {
"any-chat-completions-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--pyroprompts--any-chat-completions-mcp--any-chat-completions-mcp",
"npm run start"
],
"env": {
"AI_CHAT_KEY": "ai-chat-key",
"AI_CHAT_NAME": "ai-chat-name",
"AI_CHAT_MODEL": "ai-chat-model",
"AI_CHAT_BASE_URL": "ai-chat-base-url"
}
}
}
}