AI Hub

A Model Context Protocol (MCP) server that provides unified access to various AI providers through LiteLM. Chat with OpenAI, Anthropic, and 100+ other AI models using a single, consistent interface.
  • python

7

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

MCP AI Hub provides a single, consistent interface to access 100+ AI providers through LiteLM, so you can chat with models from OpenAI, Anthropic, Google, Azure, and more without integrating each provider separately. This MCP server acts as a bridge between your MCP clients and multiple AI services, making it easy to switch models and manage prompts from one place.

How to use

You interact with the MCP AI Hub through your MCP client just like you would with any other model. Start the MCP server, configure your models, and then select a model by its friendly name to send messages. The server handles the underlying provider calls and returns the AI responses in a consistent format.

To connect Claude Desktop or Claude Code to MCP AI Hub, you configure the MCP server in your client’s settings to point to the local MCP runner, which will expose a standard input/output interface for chat.

Key actions you can perform after setup include: - Chat with configured models using a simple chat interface. - Discover which models are configured and available. - Retrieve details about a specific model, including provider and parameters.

MCP Tool Reference Primary Chat Tool: chat(model_name: str, message: str | list[dict]) -> str- model_name: Name of the configured model (e.g., "gpt-4", "claude-sonnet")

  • message: String message or OpenAI-style message list
  • Returns: AI model response as string Model Discovery Tools:list_models() -> list[str]- Returns: List of all configured model namesget_model_info(model_name: str) -> dict
  • model_name: Name of the configured model
  • Returns: Model configuration details including provider, parameters, etc.

How to install

Prerequisites: You need Python 3.10 or higher and a working network to reach external AI providers.

# Option A: Install from PyPI
pip install mcp-ai-hub

# Option B: Install with uv (recommended)
uv tool install mcp-ai-hub

# Option C: Install from source
pip install git+https://github.com/your-username/mcp-ai-hub.git

Configuration and usage notes

Create a configuration file at ~/.ai_hub.yaml with your API keys and model configurations. Each entry defines a model name and LiteLM parameters. You can also set a global system prompt that applies to all models unless overridden by a per-model prompt.

yaml
model_list:
  - model_name: gpt-4  # Friendly name you'll use in MCP tools
    litellm_params:
      model: openai/gpt-4  # LiteLM provider/model identifier
      api_key: "sk-your-openai-api-key-here"
      max_tokens: 2048
      temperature: 0.7

  - model_name: claude-sonnet
    litellm_params:
      model: anthropic/claude-3-5-sonnet-20241022
      api_key: "sk-ant-your-anthropic-api-key-here"
      max_tokens: 4096
      temperature: 0.7

Note: Replace placeholder keys with your actual API keys. Ensure the file has secure permissions (chmod 600 ~/.ai_hub.yaml)." ,

## Transport and startup options

You can run MCP AI Hub with different transports depending on how you connect to it. The default stdio transport is suitable for MCP clients like Claude Desktop/Code. If you are building a web front end, you can use Server-Sent Events (SSE) or HTTP transport.

Default stdio transport (for MCP clients like Claude Desktop)

mcp-ai-hub

SSE transport (for web applications)

mcp-ai-hub --transport sse --host 0.0.0.0 --port 3001

HTTP transport (direct API calls)

mcp-ai-hub --transport http --port 8080

Custom config and debug logging

mcp-ai-hub --config /path/to/config.yaml --log-level DEBUG

## Connection to Claude Desktop

To connect Claude Desktop to the MCP server, configure Claude Desktop to use the local MCP runner defined in your client configuration.

{ "mcpServers": { "ai-hub": { "command": "mcp-ai-hub" } } }


## Available tools

### chat

Send a user message to a configured model and receive the AI response as text.

### list\_models

Return a list of all configured model names available through the MCP hub.

### get\_model\_info

Fetch details for a specific configured model, including provider and parameters.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational