PluginBench
MCP Server
Active
Apache-2.0

AAI Gateway MCP Server

io.github.gybob/aai-gateway

Unified MCP & Skill management gateway that reduces context tokens by 99% and auto-discovers tools across AI agents.

What is the AAI Gateway MCP server?

AAI Gateway is a unified management gateway for Agent Apps (MCP servers and Skill packages) that abstracts multiple tools under a single interface. It dramatically reduces context token bloat by loading tool summaries on-demand instead of injecting full schemas, and enables agents to auto-discover and install new capabilities without manual configuration or restarts.

AAI Gateway solves three core problems: context bloat (99% token savings by using summaries instead of full schemas), tool discovery (agents can search for and auto-install tools via natural language), and configuration duplication (import once, share across all AI agents). It works with Claude Code, Codex, OpenCode, and OpenClaw.

How to install AAI Gateway

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "aai-gateway": {
      "command": "npx",
      "args": [
        "-y",
        "aai-gateway"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • search:discover — Search and install new tools with natural language
  • mcp:import — Import an MCP Server as an Agent App
  • skill:import — Import a Skill package as an Agent App
  • listAllAaiApps — List all registered Agent Apps
  • enableApp / disableApp — Enable or disable an Agent App per Agent
  • removeApp — Remove an Agent App
  • aai:exec — Execute a specific tool within an Agent App

Use cases

  • Search for and auto-install new MCP servers or skill packages using natural language without manual configuration
  • Reduce context token usage by 99% by loading tool summaries on-demand instead of injecting full schemas into every conversation
  • Share imported tools and configurations across multiple AI agents (Claude Code, Codex, OpenCode) without duplicating setup
  • Enable agents to discover and use locally-installed Agent Apps (Claude Code, Codex, OpenCode) automatically
  • Execute specific tools within imported Agent Apps through a unified interface

AAI Gateway MCP server FAQ

What is AAI Gateway?

AAI Gateway is a unified management gateway for Agent Apps (MCP servers and Skill packages). It abstracts multiple tools under a single interface, reduces context token bloat by 99%, and enables agents to auto-discover and install new capabilities without manual configuration.

How much do context tokens get reduced?

AAI Gateway reduces context tokens by approximately 99% compared to traditional approaches. Instead of injecting 50+ full tool schemas (≈7,500 tokens), each Agent App needs fewer than 50 tokens for a summary, with details loaded on demand.

How do I install AAI Gateway in Claude Code?

Run: `claude mcp add --scope user --transport stdio aai-gateway -- npx -y aai-gateway`

How do I install AAI Gateway in Codex?

Run: `codex mcp add aai-gateway -- npx -y aai-gateway`

Is AAI Gateway free?

Yes, AAI Gateway is open-source and free to use. It's available on npm as `aai-gateway`.

Can I contribute my own Agent App?

Yes. Create an `aai.json` descriptor file and submit a PR to `src/discovery/descriptors/`. Your Agent App will be auto-discovered when users' local environments meet the specified conditions.

README (reference)

Source of truth, from the repository.

English | 简体中文 | 日本語 | 한국어


AAI Gateway: Unified MCP & Skill Management, Shared Across AI Agents, 99% Context Token Savings

npm version license


What Is It

AAI = Agent App Interface

AAI Gateway is the interaction gateway for Agent Apps.

What is an Agent App? An Agent App is a collection of capabilities that an Agent can use. For example:

  • An MCP Server is an Agent App — it provides a set of tools
  • A Skill package is an Agent App — it provides one or more skills

In AAI Gateway, they are abstracted as Agent Apps under unified management. Import once, and all AI Agents can use them immediately.


What Problems Does It Solve

Context Bloat

Traditional: 10 MCPs × 5 tools = 50 full schemas ≈ 7,500 tokens injected into every conversation.

AAI Gateway: each Agent App needs only fewer than 50 tokens for a summary, with details loaded on demand. 99% token savings.

Finding Tools Is Hard

Traditional: search GitHub → read READMEs → copy JSON configs → debug connections → restart Agent.

AAI Gateway: tell your Agent "use AAI to search for xxx" — auto-searches, installs, ready to use.

"Use AAI to search for a browser automation tool"

→ Search → finds Playwright MCP → Agent summarizes a one-line Agent App summary → install → ready to use, no restart needed

"Use AAI to search for a PPT creation skill"

→ Search → finds PPT Skill → uses skill description as Agent App summary → install → ready to use, no restart needed

Duplicate Config

Configure the same thing in Claude Code, Codex, and OpenCode separately? Import once through AAI Gateway, all Agents share instantly.


Quick Start (30 Seconds)

Claude Code:

claude mcp add --scope user --transport stdio aai-gateway -- npx -y aai-gateway

Codex:

codex mcp add aai-gateway -- npx -y aai-gateway

OpenCode — add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "aai-gateway": {
      "type": "local",
      "command": ["npx", "-y", "aai-gateway"],
      "enabled": true
    }
  }
}

OpenClaw:

openclaw plugins install openclaw-aai-gateway-plugin

Once installed, just tell your Agent what you want to do.


Built-in Tools

ToolDescription
search:discoverSearch and install new tools with natural language
mcp:importImport an MCP Server as an Agent App
skill:importImport a Skill package as an Agent App
listAllAaiAppsList all registered Agent Apps
enableApp / disableAppEnable or disable an Agent App per Agent
removeAppRemove an Agent App
aai:execExecute a specific tool within an Agent App

Each imported Agent App generates an app_<app-id> tool that returns the full operation guide and tool list when called.

Preset Agent Apps (auto-discovered when locally installed)

App IDNameDescription
claudeClaude CodeAI coding assistant for code editing, analysis, and development
codexCodexOpenAI-powered AI coding assistant
opencodeOpenCodeAI development assistant for editing files and running commands

Architecture

Architecture


Developers: Get Your Agent App Auto-Discovered

Create an aai.json descriptor and submit it to src/discovery/descriptors/. When a user's local environment meets the discovery.checks conditions, the Agent will auto-discover your Agent App.

{
  "schemaVersion": "2.0",
  "version": "1.0.0",
  "app": {
    "name": { "default": "My App" }
  },
  "discovery": {
    "checks": [
      { "kind": "command", "command": "my-app" }
    ]
  },
  "access": {
    "protocol": "mcp",
    "config": {
      "command": "my-app-mcp",
      "args": ["--stdio"]
    }
  },
  "exposure": {
    "summary": "Use when the user wants to do X."
  }
}

discovery.checks supports three check types: command (command exists), file (file exists), path (directory exists).

Supported protocols: mcp, skill, acp-agent

Welcome to submit a PR to contribute new Agent App descriptors, or open an issue for feedback.

Related MCP servers

Job postings with real posting dates, read from employers' Greenhouse/Lever/Ashby/Beisen/Moka ATS.

2
Python
MIT
View repository →

RISE CRM MCP server — 36 tools across CRM, projects, tickets, finance, sales, HR, and reports.

View repository →

Model Context Protocol server for the DocAuto document-generation API.

View repository →

Trade bonding curve tokens on Base via Mint Club V2 — buy, sell, swap, create

6
TypeScript
View repository →

PubMed molecular-hydrogen medical literature with delivery-aware safety notes inline.

0
JavaScript
MIT
View repository →

Connect AI agents to H2BIS ProjectBrain - manage projects, use cases, and capabilities via MCP.

0
TypeScript
View repository →