Routara LLM Gateway
OpenAI-compatible LLM, image and video APIs via Routara (api.routara.ai).
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
routara-mcpclaude mcp add routara-llm-gateway -e 'ROUTARA_API_KEY=<your routara_api_key>' -e 'ROUTARA_API_BASE=<ROUTARA_API_BASE>' -- npx -y routara-mcp@1.0.1
{
"mcpServers": {
"routara-llm-gateway": {
"command": "npx",
"args": [
"-y",
"routara-mcp@1.0.1"
],
"env": {
"ROUTARA_API_KEY": "<your routara_api_key>",
"ROUTARA_API_BASE": "<ROUTARA_API_BASE>"
}
}
}
}
متغيرات البيئة
ROUTARA_API_KEYإلزامي سري Routara API key (sk-or-v1-...) from https://routara.ai/#authROUTARA_API_BASEOptional API base URL (default https://api.routara.ai/v1)
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
المحتويات
Routara MCP Server
Official Model Context Protocol server for Routara. Use Routara chat, image, and video models from Cursor, Claude Desktop, Codex, Windsurf, VS Code, and other MCP clients.
- Website and setup guide: https://routara.ai/mcp?utm_source=github&utm_medium=repository&utm_campaign=mcp_quickstart
- OpenAI-compatible API: https://api.routara.ai/v1
- Create an API key: https://routara.ai/auth?mode=register&returnTo=%2Fapp&utm_source=github&utm_medium=repository&utm_campaign=mcp_quickstart
- Run a first OpenAI SDK request: Python and Node.js quickstart
- Try the API in Postman: importable first-request collection
Practical walkthroughs: Python SDK · Node.js SDK · Cursor MCP · Claude Desktop MCP
Install
npx -y routara-mcp
Or install the one-click routara-mcp.mcpb bundle from the latest GitHub release.
Tools
| Tool | Description |
|---|---|
routara_list_models | Search and paginate the live model catalog |
routara_chat | Single-turn or multi-turn chat, including tool calls |
routara_generate_image | Text-to-image and reference-image generation |
routara_generate_video | Text-to-video and image-to-video submission |
routara_get_video_status | Poll an asynchronous video task |
MCP client configuration
{
"mcpServers": {
"routara": {
"command": "npx",
"args": ["-y", "routara-mcp"],
"env": {
"ROUTARA_API_KEY": "sk-or-v1-YOUR_KEY_HERE"
}
}
}
}
OpenAI Codex
[mcp_servers.routara]
command = "npx"
args = ["-y", "routara-mcp"]
enabled = true
[mcp_servers.routara.env]
ROUTARA_API_KEY = "sk-or-v1-YOUR_KEY_HERE"
After adding the config, restart your MCP client and ask it to list Routara models. Then ask it to use routara_chat with a model available to your account. The MCP connection exposes tools; it does not replace the host application's own model subscription or billing.
Environment
| Variable | Required | Default |
|---|---|---|
ROUTARA_API_KEY | Yes for tool calls | None |
ROUTARA_API_BASE | No | https://api.routara.ai/v1 |
ROUTARA_API_TIMEOUT_MS | No | 30000 |
The process can start and complete the MCP handshake without an API key. A key is resolved only when a Routara tool is invoked, which lets directories validate the server safely.
Reliability and compatibility
- Requests time out instead of hanging indefinitely.
- Transient network errors, HTTP 429, and HTTP 5xx responses are retried with bounded backoff.
- API errors include the upstream request ID and retry delay when available.
routara_chatreturns the complete OpenAI-compatible response, preserving reasoning content and tool calls.- Media parameters are forwarded only when explicitly supplied; model-specific support varies.
Development
npm ci
npm run build
npm test
npm run validate:registry
npm run build:mcpb
For a live API smoke test:
ROUTARA_API_KEY=sk-or-v1-... npm run test:live
Directory listings
Security
Do not commit API keys. If a key is exposed, revoke it in the Routara dashboard immediately. Please report security issues privately to support@routara.ai.
License
MIT
الأسئلة الشائعة
ما هو Routara LLM Gateway؟
OpenAI-compatible LLM, image and video APIs via Routara (api.routara.ai).
كيف أثبّت Routara LLM Gateway؟
يعمل على جهازك. في Claude Code: claude mcp add routara-llm-gateway -e 'ROUTARA_API_KEY=<your routara_api_key>' -e 'ROUTARA_API_BASE=<ROUTARA_API_BASE>' -- npx -y routara-mcp@1.0.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج Routara LLM Gateway إلى مفتاح API؟
نعم. يتطلب ROUTARA_API_KEY، وتضبطها في إعداداته.
هل Routara LLM Gateway مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون Routara LLM Gateway؟
ينشره 36412749-collab. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.