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.
Before you start
Section titled “Before you start”- You hold a privilege that reads the realm’s configuration, such as
RealmViewerorRealmOwner, with your session in$CVYUH_SESSION(Call the API), andjqto read the answers. - Your devices are enrolled and approved for AI governance; see Get started with AI Governance.
Find them
Section titled “Find them”-
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 -
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; docurl -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.txtmaya-laptop claude-code github http <server address> onben-laptop cursor tickets stdio <command> on -
Look for what you didn’t expect. A server reached over
httporsseshows where your users’ tools send their calls; astdioserver shows a program they run on the laptop. The fleet record’ssourceon each server names the settings file it came from, so you can tell the user exactly where to remove it. -
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; docurl -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.txtAsk each user to move the key into the server’s headers or environment, in the file named last.
Check it worked
Section titled “Check it worked”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.
Undo it
Section titled “Undo it”Nothing to undo: these calls only read. Delete devices.txt when you’re done.
Related
Section titled “Related”- MCP servers and skills: what’s listed for each, and what’s left out.
- Supported tools: which tools’ MCP servers are found.
- Fleet records: every call the fleet answers.
- Protect an MCP server: for the MCP servers you run, decide each tool call at the gateway.