#2679·mcp-use

Expose the served tools/list items in-process

Author: aiden-laneCreated Sep 28, 2026Updated Sep 28, 2026
Labelsserverclient

We maintain @getonlane/mcp-auth, an auth and billing adapter for mcp-use servers (tested on mcp-use 2.5.2).

What we need: a supported way to get, inside the server process, exactly the tools/list items the server serves — the same JSON a client receives.

Why: we bind a price to the exact tool a client saw, using a hash of the served declaration. The ToolDefinition a server registers is not that JSON: the served form adds type: "object" on a discriminated-union root, converts schemas with the schema's own ~standard.jsonSchema (draft 2020-12), accepts the schema: alias, and rewrites _meta.ui. Today we get the served list through an in-process request with an anonymous token, which is fragile.

Minimal API: server.listTools(): Promise<Tool[]> returning the items tools/list would return, or a documented guarantee that mcp:tools/list middleware receives the served items.

We are happy to send a PR for this.