ClaudioKitchen
Gives Claude access to OpenRouter's image, video, TTS, transcription, embeddings, and rerank APIs via a Streamable HTTP MCP server, with OIDC auth, file management, and per-request cost tracking.
README
🍳 ClaudioKitchen
Remote MCP server (Streamable HTTP) that gives Claude access to OpenRouter's image, video, TTS, transcription, embeddings, and rerank APIs. It adds OIDC auth (Pocket ID or any OIDC provider) with an email allowlist, plus file management and per-request cost tracking.
Why an OIDC proxy
Claude's remote MCP connectors require OAuth with Dynamic Client Registration (DCR). Pocket ID, like most OIDC providers, doesn't support DCR. FastMCP's OIDCProxy bridges the gap: Claude registers dynamically against the MCP server, and the server proxies the real login to your OIDC provider. Once you're logged in, ALLOWED_EMAILS is enforced on every tool call.
Setup
- Pocket ID: create a new OIDC client
- Callback URL:
https://<your-mcp-domain>/auth/callback - Copy the client id and secret
- Callback URL:
- Copy
.env.exampleto.envand fill everything in.BASE_URLmust be the public HTTPS URL, with a reverse proxy in front (Traefik, Caddy, Pangolin, etc.). docker compose up -d --build- In claude.ai: Settings → Connectors → Add custom connector, URL:
https://<your-mcp-domain>/mcp. Claude redirects you to Pocket ID, you log in, and you're done.
Docker image
A GitHub Actions workflow (.github/workflows/docker-publish.yml) builds and pushes an image to the GitHub Container Registry on every push to main and on v* tags. To run the prebuilt image instead of building locally, point compose.yml at it:
services:
openrouter-mcp:
image: ghcr.io/pianonic/claudiokitchen:latest
# drop the `build: .` line
Tags published: latest (default branch), the short commit SHA, and semver tags like 1.2 / 1.2.3 when you push a v1.2.3 tag. The package is private until you set it public in the repo's package settings.
Tools
| Tool | OpenRouter endpoint |
|---|---|
list_models |
GET /models?output_modalities=... |
list_video_models |
GET /videos/models |
upload_file / create_upload_url |
store any file, returns a download URL. Preferred: PUT raw bytes via create_upload_url, the browser uploader, or re-host an http URL. base64 is a fallback for small data. |
generate_image |
POST /chat/completions with modalities |
edit_image |
POST /chat/completions (input image(s) + instruction) |
describe_image |
POST /chat/completions (vision) |
generate_video / check_video |
POST /videos, GET /videos/{id} (async job) |
text_to_speech |
POST /chat/completions (streamed pcm16 audio to WAV) |
transcribe_audio |
POST /chat/completions (input_audio) |
create_embeddings |
POST /embeddings |
rerank |
POST /rerank |
list_files / delete_file / cleanup_files |
manage files under FILES_DIR (list, delete one, bulk-prune by age or keep-newest) |
usage_summary |
today / this-month / all-time spend (USD) with a per-tool breakdown |
Every model param accepts any OpenRouter model id. Discover them with list_models / list_video_models. Defaults are overridable via env (DEFAULT_IMAGE_MODEL, DEFAULT_TTS_MODEL, DEFAULT_STT_MODEL). Image-only models (Flux, Sourceful, Recraft, etc.) are handled automatically — if a model rejects the text modality, generate_image retries image-only. That includes Recraft's vector models (e.g. recraft/recraft-v4.1-pro-vector), which return a real SVG saved as .svg.
Per-request cost: every generating tool reports what the request cost in USD. generate_image and edit_image append a 💲 Request cost line; the rest return a cost_usd field. (OpenRouter credits are USD.)
Inline image display: generate_image and edit_image also ship an MCP Apps UI resource (ui://claudiokitchen/image.html). On hosts that support MCP Apps (claude.ai), the result renders inline in the chat instead of only as a download link. This works around a claude.ai limitation where a tool's image content is otherwise shown only inside the collapsed tool call. Hosts without MCP Apps support ignore it and fall back to the image block plus the download link, so nothing is lost.
Video runs in two modes:
generate_video(..., wait=False)(default): submits the job and returns a job id. Poll it later withcheck_video.generate_video(..., wait=True, wait_timeout=600): polls internally until the clip is done, emitting progress notifications, then returns the finished result with the downloaded video URL. Good for short clips. If it exceedswait_timeoutit returns the job id so you can continue withcheck_video.
Note: a remote MCP server can only return data as the result of an active tool call, or as progress notifications during one. It cannot push an unsolicited message into a Claude chat after the turn ends. Use
wait=Trueto have Claude report the finished video automatically.
Generated images, audio, and video are saved to FILES_DIR and served at /files/<uuid>.<ext>?token=<FILES_TOKEN>. Completed videos are pulled from OpenRouter's unsigned_urls onto this server, since those URLs expire.
Uploading your own files (images, PDFs, audio)
Any file type works. The extension comes from the filename you provide, or is sniffed from the bytes and content-type (falling back to .bin). Downloads are always served as attachments with nosniff. There are three ways to upload.
A) Claude with a sandbox (recommended, no base64): Claude calls create_upload_url to mint a short-lived ticket, then PUTs the raw file bytes directly:
curl -T /path/to/report.pdf "<upload_url>&name=report.pdf"
The PUT returns {"url": "https://.../files/<id>.pdf?token=..."}. Claude passes that url to the user, or to edit_image / describe_image / transcribe_audio / generate_video. Add &name=<filename> to keep the right extension. Tickets are time-limited (expires_in, default 900 s) and use-limited (max_uses, default 5).
B) Browser uploader (for a file pasted or attached in chat): open <BASE_URL>/upload?token=<FILES_TOKEN>, drag-drop any file, and copy the returned URL into chat.
C) upload_file tool: for a file Claude already has as base64, a data: URL, or an http URL. Pass filename to preserve the extension. Base64 decoding is tolerant, and the type is auto-detected (images, PDF, MP4, WAV, MP3, OGG, FLAC, ZIP, and more).
Cost tracking and budget
Every generating tool records its per-request USD cost to an append-only ledger (usage.jsonl, stored next to FILES_DIR on the volume; relocate it with USAGE_LOG). Ask for usage_summary to see today / this-month / all-time spend with a per-tool breakdown. Set MONTHLY_BUDGET_USD to a hard cap. Once this calendar month's recorded spend reaches it, generating tools refuse to run until next month. Video jobs are recorded once (deduped by job id) even if you poll check_video repeatedly.
Managing generated files
Files served under /files accumulate on the volume. Use list_files (name, size, modified time, URL, plus totals), delete_file (by filename or download URL), and cleanup_files (bulk-prune by older_than_days and/or keep_newest; dry_run=True previews first).
File security
The /files/ route requires ?token=<FILES_TOKEN>. Set FILES_TOKEN in .env (a stable secret) so download links keep working across restarts. If it's unset, a random one is generated per run and logged. Returned download URLs already include the token.
Hardening applied in this server:
- Downloads are served with
X-Content-Type-Options: nosniffandContent-Disposition: attachment, so a stored.svgor.htmlcan't execute script in the server's origin. - Outbound fetches (
upload_filefrom a URL,edit_image,describe_image,transcribe_audio) are restricted to public http(s) hosts. Loopback, link-local (including169.254.169.254), and private ranges are blocked (SSRF guard), redirects are disabled, and a size cap applies (FETCH_MAX_BYTES, default 100 MB). Uploads are capped byUPLOAD_MAX_BYTES.
Known limitation:
FILES_TOKENis a single global secret carried in the URL query string. Don't pass/filesURLs to third-party APIs, and configure your reverse proxy to strip query strings from access logs. Rotating it invalidates all existing download links.
Notes
- Video generation costs credits the moment you submit. Check pricing and capabilities with
list_video_modelsfirst. - TTS uses streamed
pcm16(OpenRouter requiresstream:truefor audio output), wrapped into a 24 kHz mono WAV. - For local testing without HTTPS, tunnel with
cloudflaredorngrokand set that URL asBASE_URL. - A
/healthendpoint (unauthenticated) is available for container and reverse-proxy health checks. The Docker image wires it into aHEALTHCHECK.
License
Apache-2.0 © pianonic
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。