Skip to content

Vercel.AI.Mcp

API reference

Model Context Protocol client and transports.

Type Summary
CallToolResults Normalizes MCP tools/call results, including structured-only results.
HttpMcpTransport MCP over Streamable HTTP. Posts JSON-RPC and accepts a JSON body or an SSE data: payload.
JsonRpcMessages Checks JSON-RPC 2.0 requests, notifications, results, and errors.
McpAppFingerprint SHA-256 fingerprint of an MCP app resource.
McpClient Lists MCP tools and adapts them to Tool.
MCPClientError An MCP call failed. Carries the JSON-RPC and HTTP details when the transport has them.
McpNdjson Newline-delimited JSON used by the upstream stdio transport.
McpNdjson.Buffer Buffer that reassembles newline-delimited messages split across chunks.
McpToolHeaders Reads x-mcp-header annotations and encodes Mcp-Param- headers.
McpToolHeaders.Binding One header bound to a tool argument path.
McpToolHeaders.BindingResult Result of reading header bindings.
OAuthResources OAuth resource URL checks from the MCP authorization helper.
SseMcpTransport MCP over the legacy HTTP+SSE transport. StartAsync(CancellationToken) opens a GET event stream, waits for the endpoint event, then CancellationToken) posts JSON-RPC messages to that endpoint. Responses arrive on the stream.
StdioEnvironment Environment passed to an MCP stdio child. The caller’s dictionary is not modified.
StdioMcpOptions How to start an MCP stdio server. Mirrors the upstream StdioConfig.
StdioMcpTransport MCP over a child process using newline-delimited JSON-RPC messages.
Type Summary
IMcpTransport Sends one JSON-RPC call and returns the result object.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product