chat-with-openai
Relays a question to a configured AI Chat Provider.
Put OpenAI, Perplexity, Groq or xAI inside your assistant as a tool it can hand a question to.
LABSCO SUMMARY
One small server covers every provider that speaks the OpenAI shape, and the configuration is four environment variables - so adding a second opinion from Perplexity or Groq is a config block rather than an integration.
A small TypeScript server that relays a question to any chat completions API that speaks the OpenAI SDK's shape - OpenAI, Perplexity, Groq, xAI, PyroPrompts and others. It exposes a single chat tool, named after the provider you configure, so several providers can sit side by side as separate entries.
Node, with the package run through npx or built from a clone. Four environment variables per provider: AI_CHAT_KEY, AI_CHAT_NAME, AI_CHAT_MODEL and AI_CHAT_BASE_URL. Each provider you want is its own entry in the client config.
Add the configuration to your client
USE CASES
Hand the question over inside the conversation and read both answers side by side.
Configure Perplexity as its own entry, so web-shaped questions can be passed to it by name.
Point the model and base URL variables at the candidate, and the same tool now talks to it.
Add the server once per provider, each with its own display name, so your client lists one tool per provider.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
chat-with-openaiRelays a question to a configured AI Chat Provider.
BEFORE YOU INSTALL
1 tool when we connected. The README calls this tool chat, but the server registers it as chat-with- plus the AI_CHAT_NAME you set, lower-cased: chat-with-openai for the README's OpenAI example. That is the name your client shows.
INSTALLATION
{
"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"
}
}
}
}mcpServers:
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