Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / agent-discover

agent-discover

Find, install and enable MCP servers mid-session. Search tools across installed and marketplace servers, approve installs with full provenance, and manage everything in the /discover pane.

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonCodeInputSelectText
network, draws

What it does

  • Draws a pane, a band above the prompt, toasts
  • Adds /discover
  • Hooks prompt.context, session.start
  • Calls the network

Good points

  • Starts no processes
  • Written in TypeScript
  • Handles errors
  • Writes no files

Code to start from

A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like agent-discover by keshrath (pane, band, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/keshrath-agent-discover/
// Written by ModsCode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the pane: open it with $.ui.open({ id: 'my-pane', title: "agent-discover" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Select } = $.ui.resolve(e)
    const hotkey = '…'
    const label = '…'
    const hotkey2 = '…'
    const label2 = '…'
    const hotkey3 = '…'
    const label3 = '…'
    const busy = '…'
    const server = '…'
    const message = '…'
    const title = '…'
    const server2 = '…'
    const message2 = '…'
    const server3 = '…'
    const message3 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="column">
          <Box flexWrap="wrap" columnGap={2}>
            <Text>
              <Text color="suggestion">
                {hotkey}
                {": "}
              </Text>
              <Text bold underline>
                {label}
              </Text>
            </Text>
            <Text>
              <Text color="suggestion">
                {hotkey2}
                {": "}
              </Text>
              <Text bold underline>
                {label2}
              </Text>
            </Text>
            <Text>
              <Text color="suggestion">
                {hotkey3}
                {": "}
              </Text>
              <Text bold underline>
                {label3}
              </Text>
            </Text>
            <Button label="Refresh" hotkey="r" plain dimColor />
          </Box>
          <Text color="warning" wrap="truncate">
            {busy}
            …
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
          <Text color="warning" bold>
            {server}
            {" asks"}
          </Text>
          <Text>
            {message}
          </Text>
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Box flexWrap="wrap" columnGap={1}>
            <Button label="Accept" variant="primary" />
            <Button label="Decline" />
            <Button label="Cancel" dimColor />
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
          <Text color="warning" bold>
            {server2}
            {" asks"}
          </Text>
          <Text>
            {message2}
          </Text>
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Box flexWrap="wrap" columnGap={1}>
            <Button label="Accept" variant="primary" />
            <Button label="Decline" />
            <Button label="Cancel" dimColor />
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1}>
          <Text color="warning" bold>
            {server3}
            {" asks"}
          </Text>
          <Text>
            {message3}
          </Text>
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Select label={`${title}`} />
          <Box flexWrap="wrap" columnGap={1}>
            <Button label="Accept" variant="primary" />
            <Button label="Decline" />
            <Button label="Cancel" dimColor />
          </Box>
        </Box>
      </Box>
    )
  })

  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const what = '…'
    return (
      <Box flexDirection="column">
        <Box columnGap={1} flexWrap="wrap">
          <Text color="warning">
            {"MCP: "}
            {what}
          </Text>
          <Button label="Review" variant="primary" />
          <Button label="Dismiss" dimColor />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const name = '…'
    const server = '…'
    await $.ui.toast(`agent-discover: ${name} quarantined, review before use`)
    await $.ui.toast(`agent-discover: ${server} asks a question (/discover)`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

plugin/hooks/register.tsx lines 827–853 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const el = $.ui.resolve(e);
    const snap = await read($, snapshot);
    if (!snap) return <el.Text dimColor>Loading...</el.Text>;

    return (
      <Pane
        el={el}
        snap={snap}
        route={await read($, route)}
        detail={await read($, detail)}
        tool={await read($, tool)}
        confirm={await read($, confirm)}
        browse={await read($, browse)}
        plan={await read($, plan)}
        logs={await read($, logs)}
        audit={await read($, audit)}
        busy={await read($, busy)}
        notice={await read($, notice)}
        isFocused={e.props.isFocused}
        columns={e.props.bodyColumns}
        masked={await read($, masked)}
        editing={await read($, editing)}
        on={actions($)}
      />
    );
  });
plugin/hooks/view.tsx lines 297–385 · Pane
export function Pane(p: PaneProps) {
  const { Box, Text, Button, Code } = p.el;
  const { snap, route, on } = p;
  const width = Math.min(p.columns, MAX_COLUMNS);
  // Every tab needs the daemon: no tabs then, just what to do about it.
  if (!snap.isUp)
    return (
      <Box flexDirection="column" gap={1} width={width}>
        <Box flexDirection="column">
          <Text color={BAD} bold>
            The agent-discover daemon is not running
          </Text>
          <Text dimColor>
            Nothing answers at {snap.origin}. The next MCP call starts it, or run:
          </Text>
        </Box>
        <Code source="agent-discover daemon" language="shell" />
        <Button key="retry" label="Retry" variant="primary" onPress={on.refresh} />
      </Box>
    );
  let body;
  if (route.tab === 'servers' && route.server)
    body = p.detail ? (
      <Detail
        el={p.el}
        on={on}
        d={p.detail}
        tool={p.tool}
        confirm={p.confirm}
        masked={p.masked}
        editing={p.editing}
      />
    ) : (
      <Text dimColor>Loading {route.server}…</Text>
    );
  else if (route.tab === 'servers') body = <Servers el={p.el} on={on} snap={snap} />;
  else if (route.tab === 'browse')
    body = <Browse el={p.el} on={on} browse={p.browse} plan={p.plan} masked={p.masked} />;
  else if (route.tab === 'logs') body = <Logs el={p.el} on={on} logs={p.logs} />;
  else body = <Audit el={p.el} on={on} audit={p.audit} />;

  return (
    <Box flexDirection="column" gap={1} width={width}>
      <Box flexDirection="column">
        <Box flexWrap="wrap" columnGap={2}>
          {TABS.map(([tab, label, hotkey]) =>
            route.tab === tab && !route.server ? (
              <Text key={`tab:${tab}`}>
                <Text color={ACCENT}>{hotkey}: </Text>
                <Text bold underline>
                  {label}
                </Text>
              </Text>
            ) : (
              <Button
                key={`tab:${tab}`}
                label={label}
                hotkey={hotkey}
                plain
                {...(route.tab === tab ? {} : { dimColor: true })}
                onPress={() => on.go(tab)}
              />
            ),
          )}
          <Button key="refresh" label="Refresh" hotkey="r" plain dimColor onPress={on.refresh} />
        </Box>
        {/* One status line under the tabs: the action in flight, else its outcome, else the
            keys. Nothing above the view grows or shrinks as actions come and go. */}
        {p.busy ? (
          <Text color={WARN} wrap="truncate">
            {p.busy}…
          </Text>
        ) : p.notice ? (
          <Text {...color(isFailure(p.notice) ? BAD : OK)}>{p.notice}</Text>
        ) : (
          <Text dimColor wrap="truncate">
            {p.isFocused
              ? 'Tab moves · Enter presses · ↑↓ scroll · Esc to the prompt'
              : 'ctrl+x tab to work this pane from the keyboard'}
          </Text>
        )}
      </Box>
      {snap.elicitations.map((q) => (
        <Question key={`q:${q.id}`} el={p.el} on={on} q={q} />
      ))}
      {body}
    </Box>
  );
}
plugin/hooks/view.tsx lines 387–435 · Pane
function Question({ el, on, q }: ViewProps & { q: AgentDiscoverElicitation }) {
  const { Box, Text, Button, Input, Select } = el;
  return (
    <Box flexDirection="column" borderStyle="round" borderColor={WARN} paddingX={1}>
      <Text color={WARN} bold>
        {q.server} asks
      </Text>
      <Text>{q.message}</Text>
      {q.fields.map((f) =>
        f.options.length && Select ? (
          <Select
            key={`q:${q.id}:${f.name}`}
            label={f.title}
            options={f.options.map((o) => ({ value: o, label: o }))}
            onSelect={(v) => on.answer(q.id, f.name, v)}
          />
        ) : (
          Input && (
            <Input
              key={`q:${q.id}:${f.name}`}
              label={`${f.title}${f.required ? ' *' : ''}`}
              submitLabel="set"
              onSubmit={(v) => on.answer(q.id, f.name, v)}
            />
          )
        ),
      )}
      <Box flexWrap="wrap" columnGap={1}>
        <Button
          key={`q:${q.id}:accept`}
          label="Accept"
          variant="primary"
          onPress={() => on.respond(q.id, 'accept')}
        />
        <Button
          key={`q:${q.id}:decline`}
          label="Decline"
          onPress={() => on.respond(q.id, 'decline')}
        />
        <Button
          key={`q:${q.id}:cancel`}
          label="Cancel"
          dimColor
          onPress={() => on.respond(q.id, 'cancel')}
        />
      </Box>
    </Box>
  );
}
plugin/hooks/register.tsx lines 864–877 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const snap = await read($, snapshot);
    if (
      e.props.hasSurvey ||
      (await read($, paneOpen)) ||
      !snap?.isUp ||
      (snap.attention.length === 0 && snap.elicitations.length === 0) ||
      (await read($, dismissed)) === signature(snap)
    ) {
      return next(e);
    }

    return <Band el={$.ui.resolve(e)} snap={snap} on={actions($)} />;
  });
plugin/hooks/view.tsx lines 1157–1173 · Band
export function Band({ el, snap, on }: ViewProps & { snap: AgentDiscoverSnapshot }) {
  const { Box, Text, Button } = el;
  const what = [
    snap.attention.length > 0 &&
      `${snap.attention.join(', ')} ${snap.attention.length === 1 ? 'needs' : 'need'} a look`,
    snap.elicitations.length > 0 &&
      `${plural(snap.elicitations.length, 'question')} waiting for you`,
  ].filter(Boolean);

  return (
    <Box columnGap={1} flexWrap="wrap">
      <Text color={WARN}>MCP: {what.join(' · ')}</Text>
      <Button key="open" label="Review" variant="primary" onPress={on.openFromBand} />
      <Button key="dismiss" label="Dismiss" dimColor onPress={on.dismiss} />
    </Box>
  );
}
Licence text (MIT)
MIT License

Copyright (c) 2026 MuK IT GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

How to build this: Pane (panel), Add a slash command

What its code calls

networkenv varsships servers

What its code shows

Read from the source at commit c70b3f91a36a. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.plugin/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.plugin/hooks/register.tsx:72 fetch(`${base}/api/token`); plugin/hooks/register.tsx:77 fetch(`${base}${path}`)
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.npx (an MCP server)
Reads and sendsWhether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables and reaches the network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets ModsCode show its code; otherwise the code is linked.MIT
Settings hooksHooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone
Servers it shipsMCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).mcp agent-discover: npx
Skills, commands, agentsWhat its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.skill find: allowed-tools mcp__plugin_agent-discover_agent-discover__search…
Tools and MCPWhether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).calls no tool, MCP server or command
Asks of the modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command discover
Events it hooksBy what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (discover) · shapes: prompt.context · also: session.start, ui.render (Pane, AbovePrompt) · timers: clock.every
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: AGENT_DISCOVER_PORT
Writes, by nameThe files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.writes no files, environment variables, settings or conversation rows

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and ModsCode does not vouch for what this code does. Read its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

From its marketplace

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add keshrath/agent-discover
/plugin install agent-discover@agent-discover
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (c70b3f91a36a). Compare them before you install. /reload-plugins loads it into a session that is already open.

Try the commit ModsCode read

No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:

git clone https://github.com/keshrath/agent-discover
git -C agent-discover checkout c70b3f91a36ad2d9e85985dbb6c166bdf15c1c25
claude plugin validate agent-discover/plugin
claude --plugin-dir agent-discover/plugin

The validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.

Ask Claude about it

With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:

Read the ModsCode mod "keshrath-agent-discover" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/keshrath-agent-discover.svg)](https://modscode.com/claude-mods/mods/keshrath-agent-discover/)