Skip to content

Documentation / @agentick/mcp / MCPRequestContext

Interface: MCPRequestContext

Defined in: protocol/types.ts:92

Properties

_meta?

optional _meta: Record<string, unknown>

Defined in: protocol/types.ts:135

Request-level metadata from the JSON-RPC _meta field.


authInfo?

optional authInfo: Record<string, unknown>

Defined in: protocol/types.ts:131

Auth info from the MCP SDK's built-in auth layer (RFC 9728 / OAuth). Present when the SDK transport provides validated token claims. Distinct from user (populated by the server's contextProvider).


clientCapabilities?

optional clientCapabilities: Record<string, unknown>

Defined in: protocol/types.ts:111

MCP client capabilities from the initialize handshake. Tells the server what features the client supports (sampling, elicitation, roots, apps, etc.). Useful in toolFilter to hide tools the client can't render (e.g., app tools for non-UI clients).


clientInfo?

optional clientInfo: object

Defined in: protocol/types.ts:104

MCP client identity. Populated automatically from the SDK's clientInfo. Examples: { name: "claude-desktop", version: "1.2.0" }, { name: "cursor", version: "0.50.0" }, { name: "chatgpt", ... }

name

name: string

version?

optional version: string


metadata?

optional metadata: Record<string, any>

Defined in: protocol/types.ts:143

Arbitrary application metadata (tracing, gateway ID, provenance, etc.)


requestId?

optional requestId: string | number

Defined in: protocol/types.ts:133

JSON-RPC request ID — tracing/correlation across client ↔ server.


requestInfo?

optional requestInfo: unknown

Defined in: protocol/types.ts:139

Original HTTP request info (headers, URL, etc.) when transport is HTTP.


session?

optional session: object

Defined in: protocol/types.ts:119

Session metadata from the active session. Includes transport type, session ID, and timing. Useful in toolFilter to distinguish in-process agents from HTTP clients.

createdAt

createdAt: number

sessionId

sessionId: string

transportType

transportType: "sse" | "streamable-http" | "stdio" | "in-process"


signal?

optional signal: AbortSignal

Defined in: protocol/types.ts:96

Abort signal for cancellation


taskId?

optional taskId: string

Defined in: protocol/types.ts:137

SDK task ID for long-running operations.


user?

optional user: UserContext

Defined in: protocol/types.ts:94

Authenticated user — references kernel's UserContext (single source of truth).

Released under the ISC License.