Skip to content
AI GovernanceMarkdown

Find the MCP servers on your devices

List every MCP server your users' AI tools are configured with, on which machine, in which tool, and what it runs or reaches.

API

Your security team asks which MCP servers your users’ AI tools are connected to, and whether any of them reach something nobody approved. Your realm’s AI fleet already holds the answer for every approved device: each tool’s MCP servers, by name, transport, and the command it runs or the address it reaches.

  • You hold a privilege that reads the realm’s configuration, such as RealmViewer or RealmOwner, with your session in $CVYUH_SESSION (Call the API), and jq to read the answers.
  • Your devices are enrolled and approved for AI governance; see Get started with AI Governance.
  1. List the fleet’s devices, and keep their fleet device ids:

    Terminal window
    curl -s https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" | jq -r '.[].id' > devices.txt
  2. Read each device’s tools, and print one line per MCP server: the machine, the tool, the server’s name, its transport, and the command it runs or the address it reaches:

    Terminal window
    while read -r id; do
    curl -s "https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices/$id" \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" |
    jq -r '.hostname as $h | .discoveries[] | .kind as $k | .mcp_servers[]
    | [$h, $k, .name, .transport, (.url // .command), (if .enabled then "on" else "off" end)] | @tsv'
    done < devices.txt
    maya-laptop claude-code github http <server address> on
    ben-laptop cursor tickets stdio <command> on
  3. Look for what you didn’t expect. A server reached over http or sse shows where your users’ tools send their calls; a stdio server shows a program they run on the laptop. The fleet record’s source on each server names the settings file it came from, so you can tell the user exactly where to remove it.

  4. Look for keys in addresses. An address is sent as written, so a key placed in its query shows here. List the ones that carry a query:

    Terminal window
    while read -r id; do
    curl -s "https://foobar.cvyuh.com/api/v0/endpoint/aig/v1/api/v1/devices/$id" \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" |
    jq -r '.hostname as $h | .discoveries[] | .kind as $k | .mcp_servers[]
    | select((.url // "") | contains("?") or contains("@")) | [$h, $k, .name, .source] | @tsv'
    done < devices.txt

    Ask each user to move the key into the server’s headers or environment, in the file named last.

Add an MCP server to a tool on one device, wait a minute or two, and run step 2 again: the new server is listed. The AI tools agent looks again soon after a settings file changes, and every 15 minutes regardless.

Nothing to undo: these calls only read. Delete devices.txt when you’re done.