Skip to content
providerkit
GitHub

McpToolsOptions

Defined in: agents/src/mcp.ts:79

Where the server is. Streamable HTTP only.

allow: Readonly<Record<string, McpToolPolicy>>;

Defined in: agents/src/mcp.ts:83

The tools the model may call, by their name on the server. No other tool reaches it.


optional fetch?: (url, init?) => Promise<Response>;

Defined in: agents/src/mcp.ts:51

Replaces the global fetch: a proxy, a service binding, a test.

Parameter Type
url string | URL
init? RequestInit

Promise<Response>

McpServerOptions.fetch


optional key?: string;

Defined in: agents/src/mcp.ts:49

Sent as Authorization: Bearer <key>, with surrounding spaces removed before sending and redacting. Tool metadata containing the key is refused.

McpServerOptions.key


optional prefix?: string;

Defined in: agents/src/mcp.ts:85

Goes before every name with _: prefix “docs” turns “search” into “docs_search”.


recorded: readonly McpToolRecord[];

Defined in: agents/src/mcp.ts:81

The server’s tools as listMcpTools returned them.


optional timeoutMs?: number;

Defined in: agents/src/mcp.ts:53

How long one call may take, connecting included, in ms. Default 60000.

McpServerOptions.timeoutMs


url: string;

Defined in: agents/src/mcp.ts:44

The server’s Streamable HTTP endpoint, such as https://docs.example.com/mcp.

McpServerOptions.url


optional wrap?: (text, tool) => string;

Defined in: agents/src/mcp.ts:87

Rewrites server text before the model reads it, for example to fence it as untrusted data.

Parameter Type
text string
tool string

string