Skip to main content
Glama

Agent Hub and Agent Studio

CI License: PolyForm Noncommercial

One MCP endpoint in front of many independently built agents. Every agent repo that follows the capability template becomes a capability: the hub registers it, namespaces its tools, and adds auth, rate limits, approvals and health checks. Adding a new agent takes one pull request here and no change to the hub's code.

flowchart LR
    C["MCP client<br/>(orchestrator, Claude, Cursor)"] -->|"Bearer token"| G
    subgraph Hub["agent-hub"]
      G["MCP gateway<br/>/api/mcp"] --- R[("Registry<br/>capabilities/*.json")]
    end
    G -->|"web_research__*"| W["Web Research Agent<br/>ai-web-research-assistant"]
    G -->|"trip_planner__*"| T["Trip Planner Agent<br/>ai-trip-planner-agent"]
    G -.->|"next PR"| N["Next capability"]

Agent Studio

The hub's web app is Agent Studio, the place to see and use every connected agent:

  • Capabilities: every agent with a live status light and its tools; each agent's page shows its skill and a form, built from the tool's own input schema, to run any tool.

  • Chat: an orchestrator that picks capabilities, reads their skills and chains their tools for one request, showing each call. Tools that contact people or spend money stop and wait for the owner's approval in the conversation.

  • Access: anyone can browse; running tools and the chat need the owner, who signs in once with a hub token (the cookie holds a signed session, never the token).

  • Cost: the chat uses a low-cost model on Vercel AI Gateway with at most 8 steps and 1,500 output tokens a reply, 30 messages a chat and a daily request cap; the gateway team budget is the hard ceiling.

Related MCP server: mcpgate

Why

Each agent repo works on its own: its own deploy, keys and data. Without a hub, every client has to know every agent's URL, auth and quirks, and every new agent means changing the clients. The hub turns that N×M wiring into one contract:

  • A capability owns its code and secrets. The hub never holds an OpenAI, Tavily or Twilio key, only one scoped bearer token per capability.

  • The manifest is the contract. capability.json declares the tools, what each one can do to the world (sideEffects), its timeout and its skills. The hub exposes only declared tools, even if a capability serves more.

  • Risky actions need a human. Tools that contact people or spend money must declare requiresConfirmation; the hub then returns a signed, argument-bound token that the client may only pass back after the user approves.

  • Skills travel with the code. Each capability publishes SKILL.md files as MCP resources, so the orchestrator learns how to use a tool from the repo that owns it.

How a call flows

  1. The client connects to /api/mcp with its hub token and lists tools. The hub fetches each capability's live tool list (cached for a minute), keeps the declared ones and prefixes them: trip-planner + plan_trip → trip_planner__plan_trip.

  2. The client calls hub__list_capabilities to choose, and hub__read_skill to learn the capability's rules.

  3. The client calls a tool. The hub checks the argument size (32 KB) and the capability's rate limit, asks for confirmation if the tool needs it, then forwards the call with the capability's token and its declared timeout.

  4. The answer comes back capped at 100,000 characters. Each call logs one JSON line with the capability, tool, outcome and duration, never the arguments.

If a capability is down, its tools drop out of the list and calls to it fail cleanly; the rest of the hub keeps working.

Capabilities

Capability

Repo

Tools

Web Research Agent

ai-web-research-assistant

search_web, research_topic

Trip Planner Agent

ai-trip-planner-agent

plan_trip, get_trip, refine_trip

The live list, with each tool's side effects, is on the hub's home page; /api/health reports whether each capability is up.

Connect a client

{
  "mcpServers": {
    "agent-hub": {
      "type": "http",
      "url": "https://<your-hub-deployment>/api/mcp",
      "headers": { "Authorization": "Bearer <hub token>" }
    }
  }
}

Add a capability

  1. Create the agent repo from agent-capability-template, or copy its src/capability/kit.ts and scripts/capability.mjs into an existing repo.

  2. Fill in capability.json, the tools, a SKILL.md and eval cases; deploy it with CAPABILITY_TOKENS set.

  3. Check the deployment: CAPABILITY_TOKEN_<ID>=... npm run capability:check -- ./path/to/capability.json --url https://...

  4. Open a PR here adding capabilities/<id>.json, run npm run registry:generate, and add CAPABILITY_TOKEN_<ID> to the hub's environment.

The full checklist is in docs/adding-a-capability.md; design decisions are in docs/architecture.md.

Run locally

npm ci
cp .env.example .env.local   # set HUB_API_TOKENS, HUB_CONFIRMATION_SECRET and capability tokens
npm run dev                  # http://localhost:3000, MCP at /api/mcp

To develop against local capabilities, point the hub at them:

HUB_ENDPOINT_OVERRIDES=trip-planner=http://127.0.0.1:3001,web-research=http://127.0.0.1:3002 npm run dev

Command

What it does

npm test

Gateway, confirmation, rate-limit, auth and end-to-end MCP tests

npm run registry:check

Validates every manifest and checks the generated registry is current

npm run schema:check

Checks schema/*.json matches the zod source of truth

npm run capability:check -- <id>

Checks a deployed capability: tools, skills and live evals

Deploy

Deploy to Vercel and set one secret, HUB_API_TOKENS (see .env.example). Everything else is keyless:

  • Hub → capabilities: the hub presents its Vercel OIDC token; each capability lists the hub's team_id/project in CAPABILITY_TRUSTED_CALLERS and verifies the token against Vercel's public keys.

  • Chat model: Vercel AI Gateway authenticates with the same OIDC token.

  • Confirmation tokens: signed with a key derived from the hub token unless HUB_CONFIRMATION_SECRET is set.

Until HUB_API_TOKENS is set, the studio can be browsed but /api/mcp, running tools and the chat are refused.

Roadmap

  • Phase 1, foundation: manifest schema, capability template, registry and gateway; Web Research and Trip Planner connected.

  • Phase 2, orchestrator: Agent Studio with a capability console and a chat orchestrator that chains tools across capabilities.

  • Phase 3, hard cases: the Calling Agent (async jobs and confirmation) and the RAG support agent.

  • Phase 4, scale-out: the remaining agent repos on the template, scheduled evals and a capabilities dashboard.

Security

See SECURITY.md. In short: tokens are compared in constant time, every endpoint fails closed when unconfigured, capability results are data the client must not treat as instructions, and nothing secret is logged.

License

PolyForm Noncommercial 1.0.0. Copyright (c) 2026 Abhay Raj Singh.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Puts a single MCP endpoint in front of many downstream MCP servers, routing each prompt to the right server and tools so an agent sees a few relevant tools instead of every schema. Reads run automatically, writes require explicit user confirmation via elicitation, and consequential calls are blocked by a risk gate that logs every routing decision and call.
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes any number of upstream MCP servers (stdio subprocesses or Streamable HTTP endpoints) as one MCP server for LLM agents, with namespaced tool names so servers cannot shadow each other. Every tool call passes centralized OAuth 2.1 bearer validation, per-client tool RBAC, rate limits, JSON Schema argument checks, a hash-chained audit log, and tool-definition pinning that quarantines changed tools until an operator approves them.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI agents one MCP and REST endpoint to discover, inspect, and run tools across many upstream MCP servers, OpenAPI REST APIs, and Composio apps. Credentials, per-agent permissions, tool switches, reviews, and call logs are managed centrally in one self-hosted place.
      AGPL 3.0