
A runtime MCP registry that solves the frozen catalog problem. Every MCP client today locks its tool list at startup, so adding a new server means editing config and restarting your session. This acts as a dynamic proxy: activate a child server and its tools merge into the registry's catalog immediately, visible to the agent without restart. The find_tool action searches the official MCP registry, npm, and PyPI in one call, returns the top match with confidence scores, and auto-activates the server so you can invoke the tool next turn. Includes secret management per server, health checks, per-tool metrics, and a dashboard with MCP Inspector grade test panels. Supports stdio, SSE, and streamable-http transports for child servers.
Find, install and enable MCP servers in the middle of a session, on any MCP host. agent-discover is one local daemon that searches the official MCP Registry, npm and PyPI, installs a server after you approve the exact command and its provenance, and then exposes its tools to your host without a config edit or a restart. It also guards what it installs: tool definitions are pinned and a server whose tools change is quarantined, secrets live in the OS keychain, and every action is audited.
Current hosts (Claude Code, Codex, the Anthropic and OpenAI APIs) have their own tool search, so agent-discover is not mainly about saving prompt tokens any more. What a host's tool search cannot do is work with a server you have not installed yet. Adding a new MCP server still means editing the host's config and restarting the session. agent-discover removes that step:
install_server shows you the exact command or URL, the env and header names, the pinned version and the provenance checks (registry namespace, npm mcpName, PyPI, OCI label). Nothing runs until you accept.native mode (the default) every enabled server's tools are listed as <server>__<tool> and agent-discover sends notifications/tools/list_changed on each change, so the host's native tool search, permission prompts and alwaysLoad settings keep working. In proxy mode only eight meta tools are listed and everything goes through call_tool, for hosts with weak or no tool search.| Static MCP config | With agent-discover | |
|---|---|---|
| Discovery | Know the server name in advance | Search the registries by need, with provenance |
| Installation | Edit config, restart the session | One tool call, you approve the exact command |
| Enablement | All configured servers always load | Enable and disable mid-session; the index stays searchable |
| Secrets | Keys in config files or env | OS keychain (or an encrypted file), injected on connect |
| Changed tools | Silent | Pinned hashes, drift quarantines the server until you approve |
| Visibility | Per-host logs | /discover pane, health, per-tool metrics, audit log, OTel |
Install the plugin. It runs the stdio shim as the MCP server, adds the find and install skills and a Claude Code mod (function hooks) with the management UI:
claude plugin marketplace add keshrath/agent-discover
claude plugin install agent-discover@agent-discover

New to the pane? The tutorial walks through it with screenshots.
/discover opens the agent-discover pane (docked beside the transcript in the fullscreen layout, above the prompt otherwise; also in the desktop Code tab and VS Code). Keys 1-4 switch tabs, and the focus lands on the next step (Approve, Enable, the search field, a missing secret, Install). Servers: every installed server with its state; open one for its config (command or URL, tags, source and registry status, package; env and header key names only), a secrets editor (set or delete, values never shown), its tools with input schemas and per-tool metrics, health check and error reset, the quarantine diff with Approve / Keep disabled, OAuth sign-in (the authorize URL as a link), and Enable / Disable / Re-index / Uninstall. Browse: search the registries, review the install plan (exact command or URL, provenance, warnings, required keys with secret inputs) and install. Logs (recent proxied calls) and Audit (filter by server and action, paged). Questions upstream servers ask (elicitation) appear on top./discover <what you need> opens Browse with the results.MCP 2/6 enabled · 1 to review (enabled of installed, and how many servers need a look), a toast when a server is quarantined, goes unhealthy or asks a question, and a band above the prompt that shows only while something needs you and the pane is closed.search_tools before saying a capability is missing.agent-discover entry from ~/.claude.json so tools do not appear twice.{
"mcpServers": {
"agent-discover": { "command": "npx", "args": ["-y", "agent-discover@^3"] }
}
}
Hosts with Streamable HTTP can instead point at http://127.0.0.1:3424/mcp when the daemon already runs. Cursor, Codex, VS Code, Claude Desktop and the rest: docs/SETUP.md.
Other hosts use agent-discover through its MCP tools (markdown results; the MCP Apps widget where the host renders it). Approving a quarantined server or installing without an elicitation-capable client happens in Claude Code's /discover pane, or an operator sets AGENT_DISCOVER_ALLOW_UNCONFIRMED_INSTALL=1.
git clone https://github.com/keshrath/agent-discover.git
cd agent-discover
npm install
npm run build
node dist/index.js daemon
One daemon per machine, agent-discover daemon, listens on 127.0.0.1:3424 and serves the REST API (/api/*, what the Claude Code pane talks to) and MCP Streamable HTTP at /mcp. /mcp speaks the 2026-07-28 protocol and the 2025 sessionful protocol on the same endpoint.
The default bin agent-discover is a thin stdio shim: it checks /api/health, starts the daemon if it is not running (lockfile-guarded, detached) and relays stdio to /mcp. Every host and every session shares the one daemon, so connection and enablement state has a single owner. The daemon exits after 30 minutes with no open HTTP exchanges (AGENT_DISCOVER_IDLE_MS).
Details: docs/ARCHITECTURE.md.
| Tool | Purpose |
|---|---|
search_servers | Installed servers plus public registry / npm / PyPI matches, for something not installed yet. |
install_server | Install by exact registry, npm or PyPI name (version pinned) or from a manual command or URL. Asks you to confirm the plan, then indexes. |
enable_server | Expose a server's tools to the host. A quarantined server asks you to review a diff and re-approve first. |
disable_server | Stop exposing the tools. The server stays installed and searchable. |
server_status | Installed / indexed / enabled / connected / quarantined, tool counts, flagged tools, health (check_health runs a live probe). |
search_tools | Batch search (up to 10 queries) across the tool index of every installed server, enabled or not. |
get_tool | Full definition of one indexed tool by server and name. |
call_tool | Call any indexed tool and return the upstream result unchanged. The way to call tools in proxy mode. |
Prompts discover, install and status appear as slash commands in hosts that surface MCP prompts. All tools except call_tool declare an outputSchema and return structuredContent plus a markdown rendering.
MCP Apps widget. Tool results carry ui://agent-discover/app.html, a single widget that renders search results, server cards, install consent and a tool tester. Claude Desktop, claude.ai and VS Code render it. Claude Code does not render MCP Apps yet and shows the markdown instead.
Full schemas: docs/API.md.
agent-discover sits between your host and MCP servers it did not write, so it assumes their descriptions are hostile. Full model: docs/SECURITY.md.
confirm argument.GET /api/audit.OTEL_EXPORTER_OTLP_ENDPOINT or AGENT_DISCOVER_OTEL=1.iss check), with sign-in handed to you as a URL; agent-discover never opens it itself.Not covered: sandboxing upstream stdio servers. They run with your user's privileges.
search_tools ranks with SQLite FTS5 (Porter stemming, fielded BM25 over name, description and argument names), typo repair, server routing and a small usage prior. A local or OpenAI embedding provider is opt-in and adds dense scores.
Measured on the retrieval bench in bench/retrieval/: 50 real MCP servers, 1674 tools, 468 hand-labelled queries (paraphrase, task, cross-server, multi-step, typo, German, and unanswerable). All tuning used the dev split; these numbers are the held-out test split (269 answerable queries).
| Ranker | R@1 | R@5 | R@10 | MRR |
|---|---|---|---|---|
| plain BM25 (about what hosted BM25 tool search does) | 0.305 | 0.522 | 0.618 | 0.430 |
| agent-discover 1.x | 0.307 | 0.561 | 0.642 | 0.446 |
| agent-discover 2.0, zero config | 0.338 | 0.576 | 0.661 | 0.474 |
2.0 + multilingual-e5-small (opt-in) | 0.381 | 0.618 | 0.722 | 0.522 |
Read this honestly:
npm install @huggingface/transformers by hand (about 130 MB model, about 3 minutes to index 1674 tools on one thread) and is not run in CI.Methodology, per-category results and how to run it: bench/retrieval/README.md. CI runs npm run bench:retrieval -- --check.
updated_since sync, deprecated and deleted status tracking, and exact-name installs. A server whose registry entry was deleted is flagged in server_status.input_required and 2025 elicitation/create requests are relayed to your client./discover pane, the MCP Apps widget (Claude Desktop, claude.ai, VS Code) and markdown results for every other host (OpenCode, Cursor, Codex, ...). There is no web dashboard since 3.0.AGENT_DISCOVER_SETUP_FILE) listing servers to ensure installed at daemon start.The common ones. The complete list is in docs/API.md.
| Variable | Default | Description |
|---|---|---|
AGENT_DISCOVER_PORT | 3424 | Daemon port |
AGENT_DISCOVER_HOST | 127.0.0.1 | Listen address |
AGENT_DISCOVER_DATA_DIR | platform data dir | Data directory (see Upgrading from 1.x) |
AGENT_DISCOVER_DB | agent-discover.db in it | SQLite file path |
AGENT_DISCOVER_MODE | native | native lists enabled servers' tools; proxy lists only the meta tools |
AGENT_DISCOVER_IDLE_MS | 1800000 | Daemon idle exit (0 = never) |
AGENT_DISCOVER_SETUP_FILE | unset | Declarative server list synced at start |
AGENT_DISCOVER_EMBEDDING_PROVIDER | none | local or openai adds semantic ranking |
AGENT_DISCOVER_SECRETS | auto | keyring or file forces the secret backend |
From 2.x: 3.0 removes the web dashboard on port 3424 (and its WebSocket, tester, presets and transient-server routes) and agent-desk support. Manage servers in Claude Code with /discover; other hosts keep the MCP tools. Host configs move to agent-discover@^3. Details in CHANGELOG.md.
From 1.x: 2.0 was a breaking release. The single registry tool is replaced by the eight tools above, REST routes were renamed, the setup file key auto_activate is now enabled, secrets move to the keychain, and the default bin is the shim. The database migrates itself and moves from ~/.claude to the per-user data directory (%LOCALAPPDATA%\agent-discover, ~/Library/Application Support/agent-discover, or $XDG_DATA_HOME/agent-discover / ~/.local/share/agent-discover; AGENT_DISCOVER_DATA_DIR overrides) on first start, so stop any running 1.x process first. Full list in CHANGELOG.md.
structuredContent to the model as JSON text instead of the markdown content (upstream behaviour, anthropics/claude-code#55677 closed as not planned, see also #15412). Other hosts and the widget use the markdown / UI.npm test # 218 tests across 27 files (+9 e2e skipped unless AGENT_DISCOVER_E2E=1, +16 pane e2e)
npm run check # typecheck + lint + format + test
npm run bench:retrieval
npm run plugin:check # claude plugin validate + the pane's 9 plugin tests
npm run e2e:claude # the /discover pane in the real Claude Code CLI (inline and docked), screenshots to ~/.claude/tmp/pane-shots
/discover pane step by step, with screenshotsMIT, see LICENSE