Add dynamic agent discovery tools
All checks were successful
build / test (push) Successful in 20s
publish / npm (push) Successful in 22s

This commit is contained in:
2026-06-05 20:07:37 -03:00
parent 80261e5224
commit 3ebe88708e
9 changed files with 628 additions and 75 deletions

View File

@@ -23,6 +23,7 @@ interrupts.
```bash
npx -y a2amcp login
npx -y a2amcp search "security evidence"
npx -y a2amcp add <agent-name>
npx -y a2amcp doctor
```
@@ -48,6 +49,7 @@ Restart the client after adding or removing agents.
a2amcp login # sign in through Keycloak and save OAuth tokens
a2amcp whoami # show current account
a2amcp agents # list agents visible to your account
a2amcp search [query] # search visible agents by text, tag, or skill
a2amcp add <name> # expose one agent through this gateway
a2amcp list # list locally enabled agents
a2amcp remove <name> # stop exposing an agent
@@ -57,6 +59,18 @@ a2amcp logout # clear local credentials
Running `a2amcp` with no command starts the MCP gateway over stdio.
The gateway also exposes local management tools to MCP clients:
```text
a2a_search_agents # search visible agents from inside the MCP client
a2a_add_agent # enable one matching agent dynamically
a2a_list_enabled_agents # show agents currently exposed by this gateway
```
After `a2a_add_agent`, clients that support tool-list change notifications can
refresh tools immediately. Other clients may need a manual tool refresh or
restart.
`a2amcp login` uses Keycloak Authorization Code + PKCE. It starts a local
loopback callback server, opens the browser, exchanges the code for a Keycloak
access token, and stores the token in `~/.a2a/credentials.json`. For headless