Appearance
Shadow MCP and agent discovery
Symptoms of shadow MCP and agent discovery: the inventory of MCP servers and AI agents that call the application.
An MCP server I know about keeps appearing as unknown
- Cause: its path is not under
mcp.paths,mcp.serversordiscovery.known_servers, or it is listed in a different form. The inventory normalises numbers and IDs, so/mcp/42is/mcp/{id}, and a list entry/mcpdoes not cover/mcp/v2. - Check: the event's key (the normalised path) and its snippet (the request path);
waap api get -app shopfordiscovery.known_servers. - Fix: acknowledge it under
known_servers(a trailing*covers a prefix), or enforce it undermcp.servers. Each node flags a server once; the flag stops for the new version at once.
An MCP server is not listed
- Cause: the inventory is off (
discovery.enabledordiscovery.mcpis false, or API protection is off); the body is bigger thanmcp.message_sizeor over the API JSON limits;"jsonrpc"is not in the first 512 bytes; the client only opened an event stream (a stream alone never makes a server); or the application reached 100 servers on this node. - Check: the trace of a request to it (the
discoverystep); the request body's size and start; how many servers the application already has in the inventory. - Fix: turn discovery on, raise
mcp.message_size, or clear old servers by declaring them.
Ordinary JSON-RPC traffic shows up as MCP
- Cause: a JSON-RPC 2.0 request used a method of the MCP protocol (
initialize,tools/...,resources/...,prompts/...,notifications/...); or the path was already seen as an MCP server; or the client sentMcp-Session-IdorMCP-Protocol-Version. - Check: the method names in the request body.
- Fix: acknowledge the path under
known_serversto stop the flag. It stays listed.
"new tool" event for a tool that has always been there
- Cause: the node first saw the tool more than a day after the server. Rarely called tools, or tools that appear only in
tools/listanswers outside the response scope before, look new. - Fix: if the tool is expected, add it to the server's
toolsinmcp.servers(allowed tools are not reported), or ignorediscovery.mcp.new_toolfor the path with an exception.
After adding a server to mcp.servers, agents get 403
- Cause: in block mode,
api_schemarefuses calls outside the server's tool list (api.mcp.tool), messages over itsmessage_size(api.mcp.size), batches over itsbatchlimit (api.mcp.batch), and bodies that are not JSON-RPC (api.mcp.syntax). The message names the server. - Check:
waap events list -app shop -rule api.mcp.tool. - Fix: add the missing tools (the inventory lists the observed ones), or run the application or API protection in detect mode while the list settles.
No AI agents are listed
- Cause: agents are recognised from bot mitigation. Bot mitigation is off, the agent's user agent is not in the bot catalog under
ai_crawler, or its signature agent is not configured; ordiscovery.agentsis false. - Fix: turn on bot mitigation, and add the agent to the catalog or as a signature agent.
discovery.agent.newevents needdiscovery.flag_agents: log, which is off by default.
"Put under enforcement" is refused
- Cause: the path is already under
mcp.pathsor another server; the name is taken or is not lowercase letters, digits and dashes; the server was not seen in this application; or the policy changed since the inventory was read. - Check: the server's status on the MCP and agents tab (or
waap api mcp -app NAME) says whether it is already declared. - Fix: edit the existing entry under "Declared MCP servers", choose another name, or reload and retry.
The MCP inventory answers 503
- Cause: this node has no inventory store (a control plane started without a database).
- Fix: run it with the node's data directory. The inventory is stored by the inspection node's flush every few seconds.