ki-bridge
Provides access to Gemini models for analysis of images, PDFs, audio, video, and long documents, plus image understanding and Google Search-grounded answers. Uses only free Gemini models and can fall back across models when limits are hit.
Enables image generation through the OpenAI Images API and targeted questions or second opinions through the OpenAI Responses API, with local estimated cost tracking, balance warnings, and confirmation before calls above a configured threshold.
Click on "Deploy 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., "@ki-bridge Ask Gemini to summarize this video and create a handoff for anything I need to do."
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.
ki-bridge
ki-bridge is a small local MCP server that lets Claude act as a main AI that hands work to other AIs and to you. Claude keeps the overview and does most of the work itself. When another model is clearly better at a part of the task, Claude delegates it. When a part cannot be done by any of the connected systems, Claude turns it into a precise task for you and keeps working on everything else in the meantime.
The problem it solves: using several AI tools side by side usually means copying prompts between browser tabs, losing track of what is done and finding out halfway through a project that something is still missing. ki-bridge gives that coordination to one assistant and makes the human an explicit part of the workflow.
The idea: clear roles
Who | Role |
Claude | Main AI. Planning, writing, code, structure and merging all results. Does everything it can do well itself. |
Gemini | Analysis of video, audio and very long documents, image understanding with coordinates, answers grounded in Google Search. |
ChatGPT | Image generation and targeted second opinions. |
You | Tasks that are outside the connected systems. |
Delegation follows a fixed order. Claude first tries to do a task itself, then with its own tools (web search, browser control, connected apps, files and code), then through Gemini or ChatGPT. Only when none of that works does the task become a handoff to you. Every delegation comes with a one sentence reason, so you can see why a task went where it went.
Why the human is part of the system
Not every step of a real project can be done by an AI. Instead of pretending these steps do not exist, ki-bridge treats them as normal tasks with a clear format:
what exactly to do, in concrete steps
where to do it (an app, a website or "offline")
what to bring back (a file, text, a photo, a measurement or a confirmation)
how urgent it is: does it block Claude now or only later
if something has to be bought: exact name, quantity, rough price and where to get it
if another AI tool is involved: a ready to copy prompt with the right settings
Every open task is written to a handoffs.md in the project and ticked off when it is done. If
the result is a file, ki-bridge watches your Downloads folder for up to 15 minutes. It only
reacts to new files of the expected type, renames them and moves them into the project. Other
files in the folder are never opened or changed.
Related MCP server: Houtini LM
The kickoff
Before any larger task Claude gives a short kickoff:
what Claude does itself
what it delegates to Gemini or ChatGPT and why
everything you need to deliver or do, all at once and sorted by urgency
at most three open questions that would really change the result
The point is parallel work. If you learn on minute one what you need to provide, you can do that while Claude writes the code or the text. Requests that trickle in one by one leave both sides waiting. If something is still missing later, Claude has to explain why it could not be foreseen.
Small tasks skip the kickoff and are simply done.
Cost control and privacy
Estimated cost tracking. You can store your current OpenAI balance with
set_balance. After every call the estimated cost is subtracted and logged locally instate/usage_log.csv.Confirmation before expensive calls. Any single OpenAI call above a configurable cost threshold is blocked until you approve it. Image quality and the number of images per request are limited by default.
Low balance warnings at configurable thresholds.
Stop on insufficient funds. If the API reports
insufficient_quotaor a similar error, the server stops all OpenAI calls without retrying, tells you and offers a handoff for the affected task. Calls resume after you update the balance.No automatic top ups. The server never adds credit or touches billing settings.
No paid Gemini usage. Only models listed as free in
src/ki_bridge/gemini_tools.pyare used. When a model hits a limit, the server tries the next one and finally returns a wait time or a handoff instead of anything paid.Confidential content. Google may use input on its free API tier to improve its products. The suggested rules tell Claude not to send personal or confidential material to Gemini without asking you first.
All costs are estimates. Your provider dashboard is the source of truth.
Tools
Tool | What it does |
| Creates images with the OpenAI Images API, optionally with a transparent background |
| Asks an OpenAI model via the Responses API (a low cost model by default) |
| Asks Gemini with optional files (images, PDF, audio, video) and Google Search |
| Creates a task for the human, writes it to |
| Shows open handoffs or waits for an expected file |
| Ticks off a handoff |
| Stores your current OpenAI balance and lifts a stop after insufficient funds |
| Shows estimated balance, spending this month and what it was spent on |
Model names, thresholds and limits live in src/ki_bridge/config.py and can be overridden in
state/config.json. They were taken from the official OpenAI and Google documentation at the
time of writing. Check them again when you set this up.
Setup on macOS
Install uv (Python package manager):
curl -LsSf https://astral.sh/uv/install.sh | shClone the repository and install dependencies:
git clone https://github.com/Mir4clEmi/ki-bridge.git ~/ki-bridge && cd ~/ki-bridge && ~/.local/bin/uv syncGet API keys.
Gemini: create a key in Google AI Studio (aistudio.google.com/apikey).
OpenAI: create a key at platform.openai.com/api-keys.
Store the keys as environment variables. Copy the two
exportlines from.env.exampleinto~/.zshenvand insert your keys. This file is read by every zsh, including when the Claude desktop app starts the server. Then quit and restart Claude completely.Register the server in Claude Code for all projects:
claude mcp add --scope user ki-bridge -- /bin/zsh ~/ki-bridge/bin/ki-bridgeOptional: Claude desktop app. Add this to
~/Library/Application Support/Claude/claude_desktop_config.jsonand keep existing entries. Replace/Users/<you>with your home folder, because the app does not expand~:"mcpServers": { "ki-bridge": { "command": "/bin/zsh", "args": ["/Users/<you>/ki-bridge/bin/ki-bridge"] }, "claude-code": { "command": "/bin/zsh", "args": ["/Users/<you>/ki-bridge/bin/claude-code", "mcp", "serve"] } }The second entry exposes Claude Code itself, so the desktop app can edit files and run commands.
bin/claude-codeuses an installedclaudeCLI or the one bundled with the app.Add the working rules. Append
CLAUDE.example.mdto~/.claude/CLAUDE.md. For the desktop app paste the text fromDESKTOP_ANWEISUNGEN.example.mdinto your profile preferences.Optional: set your balance. Tell Claude your current OpenAI balance so it can track estimated costs and warn you in time.
Quick check without Claude:
cd ~/ki-bridge && ~/.local/bin/uv run python tools/mcp_client.py usage_reportUpdate: cd ~/ki-bridge && git pull && ~/.local/bin/uv sync
Uninstall: claude mcp remove --scope user ki-bridge, remove the entries from the desktop
config, delete the folder and remove the keys from ~/.zshenv.
Limitations
These are deliberate:
No browser automation of ChatGPT or Gemini. Only the official APIs are used. Anything that would need the web apps becomes a handoff with a ready to copy prompt.
Tasks outside the connected systems go to the user. ki-bridge does not try to cover everything. It hands those tasks over in a clear format and picks up the results.
No paid Gemini features. Some features, such as Google Search grounding, may be unavailable depending on your API access. In that case Gemini answers without search and says so clearly.
Estimated costs only. The balance is tracked locally from token usage and price tables. It does not read your real balance from OpenAI.
The download watcher runs inside the server process. If Claude restarts during a handoff, the watch stops and you move the file yourself.
macOS first. Paths and the launcher scripts are written for macOS with zsh.
German messages. Tool descriptions and messages are currently in German. The control words
RÜCKFRAGE NÖTIG(confirmation needed) andSTOPP(stop) are part of the protocol between the server and Claude.
tools/clean_sprite.py is a small helper for transparent pixel art: image models often add a
soft half transparent glow. The script removes it, crops the image and scales it down without
smoothing.
Examples from real use
Coming soon.
License
MIT, see LICENSE.
Available Tools
8 toolsask_chatgptB
Fragt ChatGPT über die OpenAI API (Standard: günstiges Modell). Nur nutzen, wenn es echten Mehrwert bringt (Zweitmeinung, nachweisliche Stärke). Kostenpflichtig; Regeln wie bei generate_image (confirmed / low_balance_ok).
Inputs: prompt (required), model, system, confirmed, +2 more. Returns: result
ask_geminiA
Fragt Gemini (nur kostenlose Modelle). Gut für Video-/Audio-Analyse, sehr lange Dokumente/PDFs, Bilder und Fragen mit Google-Suche (use_google_search=true). - files: absolute Pfade zu Bildern, PDFs, Audio, Video, Text. Achtung Datenschutz: Eingaben im kostenlosen API-Tarif kann Google zur Verbesserung nutzen. Keine vertraulichen/persönlichen Inhalte ohne Zustimmung der Person senden. Bei Limit (429 / limit: 0) wird automatisch ein anderes Free-Modell probiert, sonst kommt eine Wartezeit bzw. ein Handoff-Vorschlag zurück.
Inputs: prompt (required), files, model, system, +1 more. Returns: result
complete_handoffB
Hakt einen Handoff in handoffs.md ab (z. B. wenn die Person Text/Foto im Chat geliefert hat).
Inputs: handoff_id (required), note, project_dir. Returns: result
generate_imageA
Erzeugt Bild(er) mit der OpenAI Images API und speichert sie als Datei.
- output_path: Zielordner (Standard: <Projekt>/assets/images) ODER kompletter Dateipfad.
- filename: Dateiname ohne Endung (Standard: aus dem Prompt abgeleitet).
- quality: Standard "medium". "high" NUR auf ausdrücklichen Wunsch der Person.
- transparent_background: true für Sprites/Charaktere (PNG mit Alpha).
- n: Anzahl Bilder (Obergrenze pro Anfrage siehe config).
- confirmed: erst true setzen, nachdem die Person Kosten über der Schwelle bestätigt hat.
- low_balance_ok: erst true, nachdem die Person bei kritischem Kontostand zugestimmt hat.
- project_dir: absoluter Projektpfad (für Standard-Zielordner assets/images).
Vorher der Person kurz sagen, was erzeugt wird und in welcher Qualität.
Inputs: prompt (required), n, size, quality, +6 more. Returns: result
handoff_statusC
Status der Download-Überwachung eines Handoffs bzw. Liste offener Handoffs. wait_seconds (max. 600): so lange auf das Eintreffen der Datei warten.
Inputs: handoff_id, project_dir, wait_seconds. Returns: result
handoff_to_meA
Erstellt eine Aufgabe für die Person (alles, was Claude/ChatGPT/Gemini nicht selbst können oder was Geld kosten würde) und trägt sie in /handoffs.md ein.
- steps: konkrete Schritte. where: App/Website oder "offline/physisch".
- bring_back: was zurückkommen soll (Datei, Text, Foto, Messwert, Bestätigung).
- urgency: blockiert sofort / blockiert später / nicht blockierend.
- copy_prompt + prompt_settings: fertiger Prompt für ChatGPT/Gemini im Browser und die
richtige Einstellung (z. B. Modell, Modus, Länge).
- hardware: Liste von {"name", "menge", "kosten_ca", "bezugsquelle"}.
- expected_file_types: z. B. ["audio"] oder [".mp3", ".wav"]. Wenn gesetzt, wird der
Download-Ordner bis zu 15 Minuten überwacht; nur NEUE passende Dateien werden umbenannt
und nach target_subdir (Standard: assets/images|audio|other) verschoben.
- project_dir: absoluter Projektpfad (Standard: aktuelles Projekt).
Text, Fotos und Antworten gibt die Person direkt im Chat. Während sie arbeitet, mit
allem weitermachen, was nicht davon abhängt.
Inputs: steps (required), title (required), where (required), urgency (required), +11 more. Returns: result
set_balanceA
Setzt den aktuellen OpenAI-Guthabenstand (USD), z. B. nach dem Nachfüllen. Hebt eine evtl. bestehende Sperre nach einem Quota-Fehler auf.
Inputs: balance_usd (required). Returns: result
usage_reportB
Zeigt geschätzten OpenAI-Reststand, Verbrauch diesen Monat und wofür.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a clearly distinct action or resource: balance administration, OpenAI text/image calls, Gemini multimodal calls, and a three-step handoff lifecycle. ask_chatgpt/ask_gemini and generate_image all call external models, but provider, cost, and media constraints are explicit enough that boundaries are clear.
All names are snake_case and most follow a verb_noun pattern (set_balance, generate_image, ask_chatgpt, ask_gemini, complete_handoff). The exceptions are noun-first/status names like usage_report, handoff_status, and handoff_to_me, which are readable but break the dominant verb_noun convention.
Eight tools are well-scoped for an AI bridge: balance setting/reporting, three AI/API operations, and three handoff lifecycle tools. There is no obvious redundancy or missing slot that would require more or fewer tools.
The surface covers the core workflows: set/report balance, generate images, ask ChatGPT, ask Gemini, and create/check/complete handoffs. Minor gaps exist around editing or cancelling handoffs and richer handoff retrieval, but agents can work around these.
Maintenance
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets ChatGPT or any MCP client securely delegate coding tasks to a local Claude Code instance, with git checkpointing, approval gates, and structured results. Supports code review, test running, and rollback via simple tool calls.MIT
- FlicenseNot gradedqualityAmaintenanceAn MCP server that lets Claude Code or any MCP client hand bounded work — code review, boilerplate, commit messages, format conversion, embeddings — to a local GPU model, an OpenAI-compatible endpoint, a router, or a cheap cloud API, so those files never enter the orchestrator's context window. This cuts token spend and quota use while providing a second model to sanity-check results.-
- FlicenseNot gradedqualityAmaintenanceA local MCP server that lets a primary AI assistant delegate parts of a prompt to specialized sub-agent CLIs (Gemini, Claude, Codex, Cursor), which run in parallel against a shared context bundle. It then aggregates their findings into a single synthesized response, using existing CLI tools and subscriptions with no extra cost.-
- FlicenseNot gradedqualityAmaintenanceThis local MCP server lets a primary AI assistant delegate tasks in parallel to specialized sub-agent CLIs (Gemini, Claude, Codex, Cursor) that share the same project context, then aggregates and synthesizes their findings into one response. It uses existing CLI tools and API subscriptions with no markup, supporting 26+ MCP-compatible IDEs.-