Skip to main content

Type Aliases

McpServerLimits

Ƭ McpServerLimits: Object Limits one session may not exceed.

Type declaration


McpServerDefinition

Ƭ McpServerDefinition: Object One MCP server: the tools it publishes and how its sessions start.

Type declaration


McpServerDeclaration

Ƭ McpServerDeclaration: Readonly<{ name: string ; description: string ; instructions: string | null ; sessions: SessionPolicy ; tools: Readonly<Record<string, ToolDeclaration>> ; limits: Required<McpServerLimits> | null }> A validated server declaration.

McpModuleOptions

Ƭ McpModuleOptions: Object What mcpModule needs beyond the servers themselves.

Type declaration


McpSession

Ƭ McpSession: Object What a function learns about the server session calling it.

Type declaration

Variables

MAX_INSTRUCTIONS

• Const MAX_INSTRUCTIONS: 8192 The longest a server’s instructions may be, in characters.

Functions

mcpTables

▸ mcpTables(): Object The two coordination tables every server shares. Spread them into the application’s schema. Sessions name who acts for what until when; admissions count each session’s requests in the current minute. Neither holds business data or authority: what a session may do, and whether it is live, is the engine’s own record of it, decided by the access model on every call.

Returns

Object

defineMcpServer

▸ defineMcpServer(name, definition): McpServerDeclaration Declare one MCP server, served at /mcp/<name>. Throws on an inconsistent declaration.

Parameters

Returns

McpServerDeclaration

mcpSession

▸ mcpSession(ctx): Promise<McpSession | null> The server session calling this query or mutation, or null for every other caller. A tool with no arguments learns its object here; the model never names it. The engine admits a session’s principal only while the session is live, so a session read here is. This reads the session only: the caller’s rules still decide every row.

Parameters

Returns

Promise<McpSession | null>

mountMcp

▸ mountMcp(http, servers): void Mount every server and its OAuth protected-resource metadata on the application’s router.

Parameters

Returns

void

mcpModule

▸ mcpModule(options): Record<string, unknown> & { isFunctionBundle: true } The functions behind every declared server, as one function bundle: export it as the default of bijection/mcp.ts.

Parameters

Returns

Record<string, unknown> & { isFunctionBundle: true }