88``sync_time`` against a clock the checker serves, and the forwarded headers wherever an answer shows them, on ``/`` and
99on a GET route with its trailing slash toggled, which a server may redirect, and the cookies those answers set:
1010none tied to a domain, and a warning for one whose lifetime is an absolute ``Expires`` with no ``Max-Age``. A site whose
11- card declares an ``mcp`` interface, being an MCP server too, must answer ``initialize`` there and ``tools/list`` with
12- the tools its card lists (streamable HTTP, ``MCP_PROTOCOL_VERSION``); a site without one skips that check.
11+ card declares an ``mcp`` interface, being an MCP server too, must answer ``initialize`` there and list, every page of
12+ ``tools/list`` read, no tool its card doesn't (streamable HTTP, ``MCP_PROTOCOL_VERSION``); a card's tool it doesn't
13+ list is a warning, since a hidden-by-default tool is listed to no caller until one enables it. A site without one
14+ skips that check.
1315
1416Every request goes to the server under check: a card's path or URL naming another scheme, host or port fails the check
1517that would have used it, with nothing sent there. The round trip leaves the server's data as it found it, adding the
4345CLOCK_START = datetime .datetime (2031 , 5 , 6 , 7 , 8 , 9 , tzinfo = datetime .timezone .utc )
4446CLOCK_SLACK_S = 120
4547MCP_PROTOCOL_VERSION = "2025-06-18"
48+ MCP_LIST_PAGES = 100
4649
4750
4851@dataclasses .dataclass (frozen = True )
@@ -203,8 +206,9 @@ def _data_plane(self, card: dict) -> tuple[Status, str]:
203206 return "passed" , f"{ len (exported )} part(s) round-tripped through reset and add"
204207
205208 def _mcp (self , card : dict ) -> tuple [Status , str ]:
206- """The MCP endpoint the card declares answers ``initialize`` and lists the card's tools; its answers needn't
207- carry ``X-Universe-Now``, which the MCP transport doesn't promise."""
209+ """The MCP endpoint the card declares answers ``initialize`` and lists no tool the card doesn't, reading up to
210+ ``MCP_LIST_PAGES`` pages of ``tools/list``; its answers needn't carry ``X-Universe-Now``, which the MCP
211+ transport doesn't promise."""
208212 interfaces = [i for i in card .get ("additionalInterfaces" ) or [] if isinstance (i , dict )
209213 and i .get ("transport" ) == MCP_TRANSPORT ]
210214 if not interfaces :
@@ -223,18 +227,30 @@ def _mcp(self, card: dict) -> tuple[Status, str]:
223227 headers ["Mcp-Session-Id" ] = session
224228 try :
225229 self .client .post (url , headers = headers , json = {"jsonrpc" : "2.0" , "method" : "notifications/initialized" })
226- listed = _mcp_result (self .client .post (url , headers = headers , json = {
227- "jsonrpc" : "2.0" , "id" : "tools/list" , "method" : "tools/list" }), "tools/list" )
230+ served : list = []
231+ cursor = None
232+ for _page in range (MCP_LIST_PAGES ):
233+ listed = _mcp_result (self .client .post (url , headers = headers , json = {
234+ "jsonrpc" : "2.0" , "id" : "tools/list" , "method" : "tools/list" ,
235+ ** ({"params" : {"cursor" : cursor }} if cursor else {})}), "tools/list" )
236+ served += [t .get ("name" ) for t in listed .get ("tools" ) or [] if isinstance (t , dict )]
237+ cursor = listed .get ("nextCursor" )
238+ if not cursor :
239+ break
240+ else :
241+ return "failed" , f"tools/list at { path } still had a next page after { MCP_LIST_PAGES } "
228242 finally :
229243 if session :
230244 with contextlib .suppress (httpx .HTTPError ):
231245 self .client .delete (url , headers = headers )
232- served = sorted (t .get ("name" ) for t in listed .get ("tools" ) or [] if isinstance (t , dict ))
233- advertised = sorted (t .get ("name" ) for t in (card .get ("capabilities" ) or {}).get ("tools" ) or []
234- if isinstance (t , dict ))
235- if served != advertised :
236- return "failed" , f"tools/list at { path } named { served } , the card { advertised } "
237- return "passed" , f"{ server .get ('name' ) or 'the server' } at { path } lists the card's { len (served )} tool(s)"
246+ advertised = {t .get ("name" ) for t in (card .get ("capabilities" ) or {}).get ("tools" ) or [] if isinstance (t , dict )}
247+ if unadvertised := sorted (set (served ) - advertised ):
248+ return "failed" , f"tools/list at { path } named { unadvertised } , which the card doesn't list"
249+ name = server .get ("name" ) or "the server"
250+ if unlisted := sorted (advertised - set (served )):
251+ return "warned" , (f"{ name } at { path } lists { len (served )} of the card's tools, not { unlisted } : hidden by "
252+ "default, or missing" )
253+ return "passed" , f"{ name } at { path } lists the card's { len (served )} tool(s)"
238254
239255 def _clock (self , card : dict ) -> tuple [Status , str ]:
240256 if find_extension (card , CLOCK_EXTENSION_URI ) is None :
0 commit comments