Skip to main content
Glama
universal-ai-agent-bridge

universal-ai-agent-bridge

by libragik

πŸŒ‰ Universal AI Agent Bridge = UAAB

One bridge. Every AI agent.

Universal MCP server that connect Claude Code, Codex, Gemini, Antigravity, and other AI agents through a unified, flexible bridge.


πŸ“‘ Table of Contents


Related MCP server: spiderswitch

⚑ 30-Second Quickstart for Every Agent

1. Claude Desktop

Add to your claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "universal-ai-agent-bridge": {
      "command": "node",
      "args": ["<PATH_TO_REPO>/index.mjs"]
    }
  }
}

2. Claude Code CLI

Add UAAB with a single command:

claude mcp add universal-ai-agent-bridge node <PATH_TO_REPO>/index.mjs

3. Cursor & Windsurf

In Settings > Features > MCP:

  • Name: universal-ai-agent-bridge

  • Type: command

  • Command: node <PATH_TO_REPO>/index.mjs

4. Google Antigravity Desktop

Run the automated 1-click setup script:

  • Windows:

    powershell -ExecutionPolicy Bypass -File .\setup.ps1
  • macOS / Linux:

    chmod +x setup.sh && ./setup.sh

5. Standalone Terminal CLI

Use UAAB directly from your favorite terminal without any editor or host agent:

# Link globally
npm link

# Test active provider
uaab active
uaab test

# Run a query with streaming
uaab ask "Explain quantum annealing in 3 bullet points" --stream

# Convene multi-model AI council
uaab council "Should we use PostgreSQL or Redis for high-frequency locks?"

πŸ”₯ Why UAAB? (Comparison Matrix)

Feature

Raw API Keys

Standard MCP Servers

LiteLLM Proxy

Universal AI Agent Bridge (UAAB)

Agent Support

❌ Manual code

⚠️ 1 Agent at a time

⚠️ HTTP daemon needed

βœ… Universal (Claude, Cursor, Codex, Gemini, Antigravity)

Zero Dependencies

❌

⚠️ Heavy npm packages

❌ Heavy Python pip

βœ… 100% Pure Native Node.js ESM

Cold Start Latency

N/A

~500ms - 2s

~1.5s - 3s

⚑ < 15ms Instant Boot

Zero-Downtime Cascade

❌ Fails on 429

❌ Hard crash

⚠️ Complex YAML

βœ… Built-in Auto-Failover (Dahl β†’ Groq β†’ DeepSeek β†’ Local)

Local Engine Auto-Scan

❌

❌

❌ Manual config

βœ… 1-Click Port Scanner (Ollama, LM Studio, vLLM, 9Router)

Multi-Model Consensus

❌

❌

❌

βœ… AI Council Deliberation (llm_council)

Prompt Token Compressor

❌ Full cost

❌ Full cost

❌

βœ… RTK Engine (Saves 20% - 50% Input Tokens)

Deterministic Cache

❌

❌

⚠️ External Redis

βœ… Built-in SHA-256 0ms Cache

Real-Time Token Ledger

❌

❌

⚠️ Database required

βœ… Built-in USD & Token Accounting


πŸ—οΈ Multi-Agent Architecture

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚               AI Agents & Environments (Claude / Codex / Gemini / AGY)  β”‚
 β”‚                                                                         β”‚
 β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
 β”‚   β”‚  Claude Code  β”‚     β”‚ Codex / Cursorβ”‚    β”‚ Antigravity / Gemini β”‚   β”‚
 β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚                     β”‚                       β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚ JSON-RPC 2.0 over Stdio (MCP Protocol)
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚             Universal AI Agent Bridge - UAAB (MCP Server)               β”‚
 β”‚                                                                         β”‚
 β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
 β”‚  β”‚    Provider Vault     β”‚   β”‚   Adaptive Client & Engine           β”‚   β”‚
 β”‚  β”‚ (llm_providers.json)  β”‚   β”‚  (Chat, Fallback, Council, Cache)    β”‚   β”‚
 β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                   β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                   β–Ό                               β–Ό                  β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚     Dahl     β”‚    β”‚  DeepSeek /  β”‚                β”‚ Local Router β”‚   β”‚ Local Offlineβ”‚
 β”‚  Inference   β”‚    β”‚  OpenRouter  β”‚                β”‚(FreeLLMAPI / β”‚   β”‚  (Ollama /   β”‚
 β”‚   Cluster    β”‚    β”‚  Groq / Mist β”‚                β”‚   9Router)   β”‚   β”‚  LM Studio)  β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ 8 Unbeatable Superpowers

1. πŸ›‘οΈ Zero-Downtime Smart Fallback Cascade

Never let a rate limit (429), concurrency spike, or cloud outage (500/502/503) abort your agent's task. If your primary provider fails or hits quota, UAAB automatically cascades across your fallback list (e.g. dahl β†’ groq β†’ deepseek β†’ openrouter β†’ ollama) and delivers the response seamlessly.

2. πŸ” Zero-Config Local Port Scanner (llm_autodetect)

Probes ports 11434 (Ollama), 1234 (LM Studio), 20128 (9Router/OmniRoute), 4000 (FreeLLMAPI), 8000 (vLLM), 8080 (LocalAI), and 1337 (Jan) in parallel under 100ms. Discovers live loaded models and mounts them instantly into your active vault.

3. πŸ“‰ Smart Prompt Compression (RTK Token-Saver)

Compresses repetitive log polling lines, strips deep stack traces (like giant node_modules paths), and eliminates redundant indentation while strictly preserving syntactical meaning. Slashes context costs by 20% to 50%.

4. βš–οΈ Multi-Model Council Consensus (llm_council)

Query multiple distinct LLM architectures in parallel (e.g., DeepSeek-R1 for chain-of-thought logic, MiniMax/Claude for structural code, Groq Llama-3.3 for lightning sanity check). An automated Chief Justice model analyzes candidate outputs, cross-examines discrepancies, flags subtle bugs, and synthesizes the final consensus verdict.

5. ⚑ 0ms Deterministic Response Cache (llm_cache)

Identical queries and repetitive code checks yield instant 0ms responses via canonical SHA-256 hashing. Includes configurable TTL and LRU eviction to maximize developer speed and eliminate wasted API spend.

6. πŸ’° Real-Time Token & Cost Ledger (ledger.mjs, llm_get_analytics)

Local persistent accounting logs exact prompt tokens, completion tokens, and dollar expenditures. Pre-configured rate cards for Dahl, DeepSeek, Groq, OpenRouter, and 100% free local models (Ollama/LM Studio).

7. 🌊 Live SSE Streaming with Token Velocity Telemetry

Built-in Server-Sent Events engine streams tokens in real-time, isolates <think> / reasoning_content deltas, and measures Time-To-First-Token (TTFT) and tokens/sec velocity.

8. 🎭 Expert Persona Presets Vault (presets.mjs)

Instant cognitive lens switching:

  • security-auditor: Zero-trust code audits, injection detection, auth vulnerabilities.

  • systems-architect: High-scale distributed architecture, CAP theorem analysis.

  • code-simplifier: Clean code, cyclomatic complexity reduction, readability.

  • quant-trader: Mathematical rigor, low-latency execution algorithms.

  • Custom presets created easily via chat or CLI.


πŸ”Œ Supported Providers Matrix

Category

Providers

Default Models

High-Throughput Clusters

Dahl

MiniMaxAI/MiniMax-M2.7, deepseek-ai/DeepSeek-V4-Flash-0731, zai-org/GLM-5.3-Flash

Cloud Frontier APIs

DeepSeek, Groq, OpenRouter, Cerebras, Together AI

deepseek-chat, deepseek-reasoner, llama-3.3-70b-versatile, claude-3.7-sonnet

Local Multiplexers

FreeLLMAPI, 9Router, OmniRoute

Any multiplexed model

100% Offline Local Engines

Ollama, LM Studio, vLLM, Jan

qwen2.5-coder:latest, deepseek-r1:latest, llama3.2


πŸ› οΈ MCP Tools Reference

Once connected, your AI agents have access to 14 built-in tools:

Tool

Purpose

Key Arguments

llm_query

Query any LLM with optional reasoning extraction

prompt, system_prompt, model, provider, endpoint_url, api_key

llm_compare

Benchmark answers from 2+ models side-by-side

prompt, models, providers

llm_council

Multi-model deliberation & synthesis

prompt, members, synthesizer_model

llm_autodetect

Scan localhost ports for running engines

None

llm_compress_prompt

Compress text to save input tokens

text, aggressive

llm_list_models

Query live available models from endpoint

provider, endpoint_url, api_key

llm_test_connection

Measure ping latency & validate keys

provider, endpoint_url, api_key

llm_manage_providers

Add, edit, remove, or switch providers

action, key, name, base_url, api_key, model

llm_get_analytics

Inspect token usage & USD costs

timeframe, provider

llm_cache

Inspect or flush response cache

action, ttl_seconds

llm_presets

List, use, or create expert personas

action, name, system_prompt

llm_generate_image

Generate images via /v1/images/generations

prompt, model, size

llm_generate_video

Generate video via /v1/videos/generations

prompt, model, duration


πŸ’» CLI Reference (uaab / agy-llm)

Usage:
  uaab list                           List all configured providers in vault
  uaab active                         Show current active provider
  uaab set <provider_key>             Switch active default provider
  uaab test [provider_key]            Test connection & measure latency
  uaab models [provider_key]          Fetch live models list from provider
  uaab add <key> <url> [key] [model]  Add or update a provider endpoint
  uaab cascade [set prov1 prov2...]   Configure zero-downtime failover cascade
  uaab scan                           Auto-scan local ports for running AI engines
  uaab compress <text>                Compress prompt text & calculate savings
  uaab council [--members p1:m1,p2]   Convene multi-model AI council
  uaab ledger [clear]                 View token consumption & estimated USD costs
  uaab preset [list|show|add|del]     Manage expert personas & prompt presets
  uaab ask [--preset p] <prompt>      Quick test query using active provider
  uaab remove <provider_key>          Remove a provider from vault

πŸ”’ Security & Zero-Leakage Privacy

  • 100% Local-First: UAAB runs entirely on your machine.

  • Zero Third-Party Telemetry: No middleman server tracks your prompts, code, or tokens.

  • Direct Encrypted Transport: All API requests travel directly between your machine and your designated base URL using TLS/HTTPS.

  • Safe Secrets Handling: Provider keys in llm_providers.json and .env are automatically ignored by Git.


🀝 Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request


πŸ“œ License

Distributed under the MIT License. See LICENSE for more information.

Available Tools

13 tools
llm_autodetectA

Auto-scan local network ports for running AI servers (Ollama on 11434, LM Studio on 1234, 9Router/OmniRoute on 20128, FreeLLMAPI on 4000, vLLM on 8000, LocalAI on 8080, Jan on 1337). Detects online engines, lists their active models, and automatically syncs them into your Antigravity vault.

Inputs: auto_sync, timeout_ms, custom_ports.

llm_cacheA

Manage the Dynamic Response Cache for external LLMs. Inspect cache hit rates, view token and USD savings, prune expired entries, or clear the cache.

Inputs: action (required), limit.

llm_compareB

Benchmark and compare responses to the exact same prompt across multiple models or providers in parallel (e.g. Dahl vs DeepSeek vs Groq vs Ollama).

Inputs: prompt (required), candidates (required), system_prompt.

llm_compress_promptA

Compress any prompt, code block, log output, or stack trace using RTK Smart Compression to strip redundant whitespace, duplicate lines, and deep library frames while maintaining code semantics. Returns token savings metrics.

Inputs: text (required).

llm_councilA

Multi-Model Consensus & Council Deliberation. Broadcasts a complex problem, code architecture, or security audit in parallel to multiple LLM council members (e.g. Dahl, DeepSeek, Groq, Ollama), then automatically uses a designated Chief Justice / Synthesizer model to critique, cross-examine, and deliver the single optimal consensus solution.

Inputs: prompt (required), judge, members, temperature, +2 more.

llm_generate_imageA

Generate an image using ANY external /v1 endpoint that supports image generation (e.g., SiliconFlow, Together AI, OpenAI DALL-E, OpenRouter, or local ComfyUI/Diffusers bridge). Saves the generated image locally and returns an embeddable file path.

Inputs: prompt (required), size, model, api_key, +2 more.

llm_generate_videoC

Generate a video using an external /v1 endpoint that supports video generation (e.g., SiliconFlow LTX-Video, Together, MiniMax Hailuo Video, or custom video bridge).

Inputs: prompt (required), model, api_key, duration, +2 more.

llm_get_analyticsA

Retrieve comprehensive cost, token usage, and latency analytics from the Antigravity Local LLM Ledger. View total tokens spent, estimated USD expenditure, breakdowns per provider (Dahl, Groq, DeepSeek, Ollama) and per model, or reset ledger statistics.

Inputs: limit, model, action, provider.

llm_list_modelsB

List available models from an OpenAI-compatible /v1 endpoint by calling GET /v1/models.

Inputs: api_key, provider, endpoint_url.

llm_manage_providersB

Manage configured LLM providers in your Antigravity vault. List all providers, add a new endpoint, set active default, or update API keys.

Inputs: action (required), name, api_key, base_url, +4 more.

llm_presetsB

Manage and inspect expert System Personas and Prompt Presets (e.g. 'security-auditor', 'systems-architect', 'code-simplifier', 'quant-trader', 'fullstack-reviewer', 'explain-like-pro'). List available personas, view system prompts, or save custom domain presets to the vault.

Inputs: name, title, action, description, +3 more.

llm_queryA

Query ANY external LLM using an OpenAI-compatible /v1 endpoint (e.g. Dahl, DeepSeek, OpenRouter, Groq, Ollama, LM Studio, FreeLLMAPI, 9Router, OmniRoute, or any custom endpoint). Supports reasoning/thinking extraction, custom system prompts, and ad-hoc endpoint overrides.

Inputs: prompt (required), model, preset, stream, +11 more.

llm_test_connectionA

Test connectivity, latency, and credentials for any LLM endpoint or configured provider.

Inputs: api_key, provider, endpoint_url.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 13 tools

    Disambiguation3/5

    Most tools have clear purposes, but llm_query, llm_list_models, and llm_test_connection could be confused - a user might call query when they only want to list models, or test_connection when checking availability. llm_generate_video and llm_generate_image are distinct by media type, but llm_compare, llm_council, and llm_query all involve sending prompts to multiple models, though their outputs differ significantly.

    Naming Consistency4/5

    All tools follow a consistent 'llm_' prefix with descriptive verb_noun naming (generate_video, list_models, test_connection, manage_providers). Minor inconsistency: 'llm_autodetect' is a verb alone without an object, and 'llm_cache' is a noun-only name rather than a verb_noun pair, but overall the pattern is predictable and readable.

    Tool Count5/5

    13 tools is well within the ideal range for a domain-focused server. The tools cover distinct operational areas: querying, generation, model management, caching, analytics, and multi-model orchestration, each earning its place without unnecessary duplication.

    Completeness4/5

    The surface covers core LLM operations: querying, listing models, testing connections, managing providers, generating content, comparing models, and caching. Missing operations like streaming responses, stopping/canceling ongoing requests, or batch processing are minor gaps for a local dev tool, but the main workflows are complete.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI applications to access 20+ model providers (including OpenAI, Anthropic, Google) through a unified interface for text and image generation.
      2
      30
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that enables agents to dynamically switch between multiple AI models (OpenAI, Anthropic, Google, etc.) with unified protocol-driven configuration and capability discovery.
      Apache 2.0
    • F
      license
      A
      quality
      D
      maintenance
      Unified MCP server for querying multiple LLM providers (Gemini, OpenAI, Anthropic, etc.) with advanced routing, cost optimization, and fallback resilience.
      2
      -