{
  "markdown": "# MCP LLM Gateway\n\n> MCP-compatible LLM gateway that proxies completion requests to downstream OpenAI-compatible providers.\n\n[![PyPI](https://img.shields.io/pypi/v/mcp-llm-gateway.svg)](https://pypi.org/project/mcp-llm-gateway/)\n[![Python](https://img.shields.io/pypi/pyversions/mcp-llm-gateway.svg)](https://pypi.org/project/mcp-llm-gateway/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nmcp-name: io.github.daedalus/mcp-llm-gateway\n\n## Install\n\n```bash\npip install mcp-llm-gateway\n```\n\n## Usage\n\n### Configuration\n\nSet the following environment variables:\n\n- `DOWNSTREAM_URL`: Base URL for the OpenAI-compatible downstream API (required)\n- `DEFAULT_MODEL`: Default model to use for completions (required)\n- `MODEL_LIST_URL`: URL to fetch available models from (optional, defaults to models.dev)\n- `API_KEY`: Optional API key for downstream (passthrough)\n- `TIMEOUT`: Request timeout in seconds (optional, default: 60)\n\n### MCP Server\n\nRun the MCP server with stdio transport:\n\n```bash\nmcp-llm-gateway\n```\n\n### MCP Tools\n\nThe server exposes the following tools:\n\n- `list_models()`: List all available models from the remote endpoint\n- `complete(prompt, model, max_tokens, temperature)`: Send a completion request to the downstream LLM provider\n\n### MCP Resources\n\n- `models://list`: Returns the list of available models\n- `config://info`: Returns current gateway configuration\n\n## Development\n\n```bash\ngit clone https://github.com/daedalus/mcp-llm-gateway.git\ncd mcp-llm-gateway\npip install -e \".[test]\"\n\n# run tests\npytest\n\n# format\nruff format src/ tests/\n\n# lint\nruff check src/ tests/\n\n# type check\nmypy src/\n```\n\n## API\n\n### core.models\n\n- `Model`: Dataclass representing an available LLM model\n- `CompletionRequest`: Dataclass for completion request payloads\n- `GatewayConfig`: Dataclass for gateway configuration\n\n### adapters.http\n\n- `HTTPAdapter`: HTTP client for downstream API communication\n- `ModelListAdapter`: Adapter for fetching model list from remote endpoints\n\n### services.gateway\n\n- `ModelService`: Service for managing model discovery and caching\n- `CompletionService`: Service for handling completion requests\n- `ConfigService`: Service for managing gateway configuration",
  "bytes": 2307,
  "sha": "0d1e10493ac010f02188a44903b194d78bb1888cb72fe6f396524a81a369dfe3",
  "repo_slug": "daedalus/mcp-llm-gateway",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_daedalus_mcp_llm_gateway_81c69eef/readme"
}