model-gateway
Provides LLM-powered tools using OpenAI models for tasks such as summarization, code review, planning, and translation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@model-gatewayreview the code in main.py"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
model-gateway — Define MCP Tools in JSON, Not Python
One MCP server, any model, any role. Add a new LLM-powered tool in 5 minutes by writing a JSON block — zero Python code.
Why
Every MCP server follows the same pattern: define a tool schema, write a handler, call an LLM, return the result. The only thing that changes between tools is the system prompt, model, and input schema. So why write Python for each one?
model-gateway separates the what from the how:
config.json ←── WHAT: providers, models, tools, system prompts (you edit this)
│
▼
server.py ←── HOW: MCP protocol, API routing, multimodal encoding (never touch this)
│
▼
Claude Code ←── sees N tools, each powered by a different modelRelated MCP server: Dynamic MCP Server
Quick Start
# 1. Install
pip install -e .
# 2. Set API keys (or put them in ~/.claude/settings.json → env)
export OPENROUTER_API_KEY="sk-or-v1-xxx"
# 3. Define a tool — add this to config.json → capabilities:
# {
# "tool": "my_summarizer",
# "description": "Summarize text concisely",
# "provider": "openrouter",
# "model": "openai/gpt-4o-mini",
# "system_prompt": "Summarize the text. Output only the summary.",
# "input_schema": {
# "type": "object",
# "properties": {
# "text": { "type": "string", "description": "Text to summarize" }
# },
# "required": ["text"]
# }
# }
# 4. Restart Claude Code — my_summarizer appears automatically.How It Works
Providers (API backends)
Configure once in config.json → providers. Each provider knows its base_url and which env var holds the key:
Provider | Env Var | Used for |
OpenRouter |
| GPT-5.4, Gemini, Claude… (any model on OpenRouter) |
OpenAI |
| Direct GPT-4o access |
Ark (Volcano) |
| Doubao vision models |
Add a new provider in one JSON block — no code needed.
Tools (capabilities)
Every tool is a JSON object with:
Field | Purpose |
| MCP tool name (snake_case) |
| Shown to Claude Code |
| Which provider to route through |
| Model ID (OpenRouter format, e.g. |
| The role prompt — this IS the tool's behavior |
| JSON Schema — defines what arguments the tool accepts |
| (optional) Enable multimodal image analysis |
| (optional) Enable reasoning tokens + effort control |
Example: Build a code reviewer in 1 minute
{
"tool": "code_reviewer",
"description": "Review code for bugs and improvements",
"provider": "openrouter",
"model": "openai/gpt-5.4",
"system_prompt": "You are a senior code reviewer. Find bugs, edge cases, and suggest improvements. Be specific — reference line numbers.",
"reasoning": { "enabled": true, "default_effort": "medium" },
"input_schema": {
"type": "object",
"properties": {
"code": { "type": "string", "description": "Code to review" },
"language": { "type": "string", "description": "Programming language" }
},
"required": ["code"]
}
}Restart Claude Code. Done. code_reviewer is now an MCP tool powered by GPT-5.4 with reasoning.
Built-in Tools
These come pre-configured as examples — delete or modify them freely:
Tool | Default Model | Purpose |
| Doubao Seed 2.1 Pro | Multimodal image analysis |
| GPT-5.4 | Architecture & implementation planning |
| GPT-5.4 | Deep code review (security/correctness/architecture) |
| GPT-5.4 | Multi-option trade-off analysis |
| GPT-5.4 | Claude Code Workflow script generation |
| Gemini 2.5 Flash | High-quality translation |
CLI
All tools are also available from the command line:
# Vision analysis
mg vision photo.jpg "Describe this image in detail"
# Architecture planning (GPT-5.4 + reasoning)
mg plan "Design a microservice saga pattern" --budget high
# Deep code review
mg review auth.py --focus security
# Trade-off analysis
mg decide "Redis Cluster" "Sentinel" "Cloud managed" --criteria "perf,cost,ops"
# Workflow script generation
mg workflow "Migrate auth to JWT with zero downtime" --quality exhaustive
# Translation
mg translate "Hello world" ChineseClaude Code Integration
Add to ~/.claude/settings.json:
{
"mcpServers": {
"model-gateway": {
"command": "python",
"args": ["-m", "model_gateway.mcp_server"],
"cwd": "/path/to/model-gateway"
}
}
}Security
No API keys in config. All keys come from environment variables.
config.jsononly storesapi_key_envreferences..gitignoreexcludesconfig.json— your tool definitions stay local.save()strips keys. The config manager writes onlyapi_key_envreferences, never resolved keys.
Design Philosophy
Config is the API. The shape of a tool IS its definition. No indirection.
No code for new tools. If you can write a system prompt, you can build an MCP tool.
Zero overhead. The framework does nothing but route and serialize. Your prompts do the work.
Vendor freedom. Swap between OpenRouter, OpenAI, Ark, or your own provider — tools stay identical.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/parigihelori352-cyber/model-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server