external-api_external-api
Ships a built-in Ollama preset (http://localhost:11434/v1) so the server can send chat completions to a local Ollama instance via ask_ai and enumerate installed model IDs via list_provider_models, with usage/cost accounting and failover handling.
Sends prompts to OpenAI (and any OpenAI-compatible) /v1/chat/completions endpoints on the user's behalf through ask_ai, discovers models via /models, and tracks per-provider token usage, USD cost, remaining budget, latency and errors with priority ordering and automatic failover between providers.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why External API?
Add Many APIs One by One: Built-in presets for OpenRouter, OpenAI, Groq, DeepSeek, Together AI, Mistral, xAI (Grok), Ollama, LM Studio, and any Custom OpenAI-compatible
/v1/chat/completionsendpoint — with a Save & add another workflow.Priority Ordering & Drag-and-Drop: Drag rows (or use
↑/↓) to sort your providers into#1 Primary,#2 Fallback,#3 Fallback, and toggle any provider On / Off anytime.Automatic Failover: When Auto-switch on failure is enabled, requests automatically fall back down your sorted list of enabled providers if a higher-priority API errors, times out, or hits its budget cap.
Usage, Cost & Remaining Budget Stats: Tracks requests, errors, prompt/completion/total tokens, USD spend (using API-reported
usage.costwhen provided or configurable per-1M token rates), remaining budget, latency, and recent request logs.Native Antigravity MCP App UI: Syncs with Antigravity's theme, host fonts, and light/dark mode tokens across the Sidebar, Side Panel, and Inline Chat views.
Zero-Exposure API Key Entry: Enter and update API keys directly inside the External API UI panel (
visibility: ["app"]tools) without pasting secrets into chat history. Stored locally in${PLUGIN_DATA}/registry.json(0600permissions) and masked in every tool output.
Scope note: Antigravity plugins extend the agent via MCP tools, interactive MCP App panels, and skills. They do not add third-party models to Antigravity's built-in Model Selection dropdown.
Related MCP server: Antigravity Context Card
Installation
Option 1: Install from GitHub (Antigravity CLI)
agy plugin install https://github.com/shrikantdange/external-api-antigravity-pluginOption 2: Install Locally (Antigravity App / IDE / CLI)
Clone directly into your global Antigravity plugins directory (no npm install or build step needed — prebuilt runtime bundles scripts/server.cjs and ui/dashboard.html are included):
git clone https://github.com/shrikantdange/external-api-antigravity-plugin.git ~/.gemini/config/plugins/external-apiAntigravity discovers ~/.gemini/config/plugins/external-api automatically (Node.js 20+ required, or Antigravity's bundled Node runtime).
Quick Start
Open External API from the Plugins sidebar, the side panel
+menu, or ask in chat:Open External API to add and manage my AI providersClick + Add API, choose a preset (e.g., OpenRouter, Groq, DeepSeek, Ollama), enter your API key (optional for local Ollama/LM Studio), and click Fetch models to verify connectivity and pick a default model.
Add additional providers with Save & add another, then drag rows (or use
↑/↓) to set your priority order.Use
/external-apior ask Antigravity naturally:"Show my External API usage, cost, and remaining budget"
"Ask my configured external AI model to review this function"
"List available models on my OpenRouter provider"
Supported Presets & Endpoints
Preset | Default Base URL | API Key |
OpenRouter |
| Required |
OpenAI |
| Required |
Groq |
| Required |
DeepSeek |
| Required |
Together AI |
| Required |
Mistral |
| Required |
xAI (Grok) |
| Required |
Ollama (Local) |
| Optional |
LM Studio (Local) |
| Optional |
Custom | Any OpenAI-compatible | Optional |
MCP Tools Reference
The bundled MCP server (external-api_external-api) exposes:
Model-Callable Tools
Tool | Description |
| Opens the External API panel in the side pane ( |
| Renders current usage, token counts, USD spend, remaining budget, and recent logs inline in chat. |
|
|
| Sends a prompt to a specific provider or |
| Queries a provider's |
App-Only Tools (visibility: ["app"])
Used internally by the interactive MCP App UI (ui://external-api/dashboard.html) so API keys typed in the UI never enter LLM chat context:
app_get_state,app_save_provider,app_delete_provider,app_test_provider,app_reset_stats,app_reorder_providers,app_set_auto_failover,app_quick_ask.
Security & Privacy
API keys are stored locally in
${PLUGIN_DATA}/registry.jsonwith0600file permissions (inside a0700directory).Raw API keys are never returned in tool text (
content) orstructuredContent— all outputs return masked keys (e.g.,sk-a••••1234).Adding or editing keys via the External API UI panel bypasses LLM conversation history completely.
See SECURITY.md for reporting vulnerabilities.
Development & Building from Source
# Install dev/build dependencies
npm install
# Type-check TypeScript sources
npm run typecheck
# Rebuild scripts/server.cjs and ui/dashboard.html
npm run build
# Run end-to-end tests against a local mock OpenAI HTTP server
npm test
# Build and sync directly to ~/.gemini/config/plugins/external-api
npm run syncRepository Structure
.
├── plugin.json # Antigravity plugin manifest
├── mcp_config.json # Stdio MCP server wiring (${PLUGIN_ROOT} / ${PLUGIN_DATA})
├── assets/logo.svg # Square SVG plugin icon
├── skills/external-api/SKILL.md # /external-api skill instructions
├── scripts/server.cjs # Prebuilt single-file Node.js MCP server
├── ui/dashboard.html # Prebuilt single-file MCP App UI
├── src/
│ ├── registry.ts # Provider store, cost/budget accounting & failover router
│ ├── server.ts # MCP server & tool/resource definitions
│ ├── ui.ts # Interactive MCP App client logic
│ └── styles.css # Host-themed Antigravity styling
├── build.mjs # esbuild bundler for server + single-file HTML UI
└── test_e2e.mjs # Automated MCP stdio + mock HTTP end-to-end test suiteContributing & License
Contributions are welcome — see CONTRIBUTING.md. Licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
One API key for every AI model, routed to the cheapest provider. OpenAI-compatible.
Connect ChatGPT or Claude to your CRM, store or shipping API. Keys stay out of the chat.
AI model routing on your own vendor keys: pick the best model per prompt, or route and run it.
One API key, dozens of capabilities for your AI agent. Zero provider auth.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage Google Antigravity accounts, switch active profiles, and check live AI quotas through natural language.13 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables real-time monitoring of Google Antigravity context usage with detailed Messages/Thinking/Tool breakdowns, cache and checkpoint telemetry, one-click compaction, and smart suggested replies across Desktop, IDE, and CLI/tmux.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables Google Antigravity users to view 5-hour and weekly model quota balances alongside offline local token usage, context size, and cache hit rates from a side-pane interface.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Antigravity to orchestrate parallel GPT/Codex and Claude Code subagents with live progress dashboards, quota-aware routing, and USD budget guardrails.MIT