Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/mcp / / CreateMCPClientOptions

Interface: CreateMCPClientOptions

Defined in: packages/mcp/src/client/types.ts:27

Options accepted by createMCPClient.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
authProvider?readonlyOAuthAuthorizationProviderPre-built OAuth provider that resolves the bearer header on every request. Mutually exclusive with bearerToken.packages/mcp/src/client/types.ts:33
bearerToken?readonlystringPre-shared bearer token (rare; prefer authProvider).packages/mcp/src/client/types.ts:35
clientName?readonlystringOperator-supplied client name advertised to the server on initialize.packages/mcp/src/client/types.ts:60
clientVersion?readonlystringOperator-supplied client version advertised to the server on initialize.packages/mcp/src/client/types.ts:62
collisionStrategy?readonlyCollisionStrategyPer-client default for the strategy-aware tool registry. Falls through to the per-call value on MCPClient.toTools. Default 'auto-prefix'packages/mcp/src/client/types.ts:42
elicitation?readonlyMCPElicitationHandlerHandler for server-initiated elicitation (elicitation/create) requests — the server asks the human for structured input mid-call (WI-13 / P2-2). When provided, the client advertises the elicitation capability and routes requests here; back it with a HITL surface (e.g. a CLI prompt or the agent's approval channel). When omitted, the capability is not advertised and a conforming server will not elicit (gated; no implicit prompting). Note: an elicitation arrives while a callTool(...) JSON-RPC request is in flight, so the handler resolves in-process — it does not durably suspend a Graphorin run. Durable-suspend elicitation across the request lifetime is a follow-up.packages/mcp/src/client/types.ts:84
eventStore?readonlyEventStorePluggable EventStore for resumable Streamable HTTP sessions. The default is the in-memory store with capacity 1024.packages/mcp/src/client/types.ts:50
logger?readonly(level, message, fields?) => voidOperator-supplied logger.packages/mcp/src/client/types.ts:54
priority?readonlynumberPer-client priority value used by the 'priority' strategy.packages/mcp/src/client/types.ts:44
sampling?readonlyMCPSamplingHandlerHandler for server-initiated sampling (sampling/createMessage) requests — the server asks the client's model to generate a completion (WI-13 / P2-2). When provided, the client advertises the sampling capability and routes requests here; back it with a Provider. The request messages are MCP-derived (untrusted), so the backing provider should apply the usual sensitivity/redaction middleware. When omitted, the capability is not advertised (gated).packages/mcp/src/client/types.ts:95
serverInfoName?readonlystringOperator-supplied server identity overrides.packages/mcp/src/client/types.ts:52
suppressDeprecatedTransportWarning?readonlybooleanSkip the deprecated-transport WARN log. Useful for tests + the standalone server's startup banner. Default falsepackages/mcp/src/client/types.ts:69
transportreadonlyMCPTransportConfig-packages/mcp/src/client/types.ts:28