const servers = await api.mcp.list();
// [{ name: "example", label: "Example", url: "https://mcp.example.com/sse",
// category: "read", allowed: 2, available: 17,
// protocolVersion: "2026-07-28", listedAt: "…", lastError: "" }]servers = api.mcp.list()
# [{"name": "example", "label": "Example", "url": "https://mcp.example.com/sse",
# "category": "read", "allowed": 2, "available": 17,
# "protocolVersion": "2026-07-28", "listedAt": "…", "lastError": ""}]namestringIts name here — what mcp: [...] takes.
label · urlstringDisplay name, and the address.
categorystringThe permission its tools carry.
allowedintegerHow many tools are allowed.
availableintegerHow many the server offers.
protocolVersionstringThe revision agreed at the last handshake.
listedAtstringWhen its tools were last read.
lastErrorstringThe last refusal, if there was one.
No token, and no schemas
Tokens never appear in it, and neither do the tool schemas — which are large. For a server's tools, call get(); for the tokens an agent needs, forAgent() exists and is read by the engine.
allowed against available
allowed: 2 of available: 17 is the normal, healthy shape. allowed: 0 means the server is connected and inert — nothing of it is declared to any model.
allowed is what a turn costs
Each allowed tool is one declaration on every turn of every run that uses the server. Summing allowed across the servers an agent is given is the number worth watching.
lastError is worth surfacing
A server whose token expired, or whose address moved, keeps working in the list and fails at call time. The field is where that shows before a run discovers it.