@agents-js/mcp-bridge
v0.4.0
Published
MCP server that exposes A2A agents as MCP tools. Each configured agent becomes a callable tool.
Maintainers
Readme
@agents-js/mcp-bridge
MCP server that exposes A2A agents as MCP tools. Each configured agent becomes a callable tool.
Installation
bun add @agents-js/mcp-bridgeAPI
Classes
DiscoveryIndex— In-memory index. Rebuilt at bridge start; no persistence. Search is a case-insensitive substring match overnameanddescription. Empty / whitespace-only query returns the full catalog (bounded...
Functions
bridgeConfigFromRegistry— Build a {BridgeConfig} from the shared agent registry file. Reads the registry at the given path (or the default~/.agents-js/registry.json/$AGENTS_JS_REGISTRY), maps every A2A entry to an {A...createBridgeServer— Create and configure an MCP server that bridges A2A agents as MCP tools. For each agent in the config, connects to the A2A endpoint, fetches its agent card, and registers an MCP tool. Tool calls ar...
Interfaces
AgentEndpoint— Configuration for a single A2A agent endpoint that the bridge will expose as an MCP tool.BridgeConfig— Full bridge configuration: a list of agent endpoints to expose.DiscoveryEntry— Lightweight metadata returned bytool_search. Intentionally not the full tool spec — just enough for an agent to decide whether to follow up withload_tool(or, in non-progressive mode, a direc...SearchOptions
Types
DiscoveryEntrySource— Source system that contributed a discoverable entry. Existing sources: agents-bridged-as-MCP-tools,-js/skillsregistry entries, and freeform host-provided internal tools.
Dependencies
@agents-js/a2a-client@agents-js/skills@modelcontextprotocol/sdkzod
License
MIT
