A Model Context Protocol server, built on the official Python SDK, whose headline tool asks the same question to Claude, OpenAI, and Gemini and returns the answers side by side. The provider layer is a small adapter interface, so adding a fourth vendor means adding one file.
| Tool | What it does |
|---|---|
compare_llm_responses |
Sends one prompt to every configured provider concurrently and returns each answer keyed by provider. A provider that fails reports its error without hiding the others. |
list_available_providers |
Lists the providers that have an API key configured. |
summarize_url |
Fetches a page and returns its title, word count, and a short excerpt. |
current_time |
Returns the current time in any IANA timezone. |
- Adapter per vendor.
LLMProviderdefines a singlecomplete(prompt)method.ClaudeProvider,OpenAIProvider, andGeminiProvidereach translate that into their vendor's request and response shape. - Providers are opt-in.
build_configured_providersregisters only the vendors whose API key is present in the environment. With no keys set, the comparison tool explains what to configure instead of failing. - Logic lives outside the MCP layer. Each tool is a thin wrapper over a plain function, so the behavior is tested directly and again through a real MCP client session.
- Injectable dependencies.
create_serveraccepts an HTTP client and a provider factory, which is what lets the test suite run without network access or API keys.
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export ANTHROPIC_API_KEY=... # set any combination of the three keys
python -m server.mainThe server speaks MCP over stdio. To use it from an MCP client such as Claude Desktop, register it as a stdio server:
{
"mcpServers": {
"multi-llm": {
"command": "python",
"args": ["-m", "server.main"],
"cwd": "/path/to/mcp-multi-llm-server",
"env": { "ANTHROPIC_API_KEY": "...", "OPENAI_API_KEY": "..." }
}
}
}Default models can be overridden with ANTHROPIC_MODEL, OPENAI_MODEL, and GEMINI_MODEL; see .env.example.
pip install -r requirements-dev.txt
pytestThe suite mocks the HTTP layer, so it needs no network access and no API keys. It covers each adapter's request and response shape, failure isolation in the comparison, and a full client-to-server round trip over the MCP protocol.
Note that the adapters are verified against mocked responses that follow each vendor's documented API, not against the live services.
MIT — see LICENSE.