McpServerTool - TypeScript SDK

McpServerTool type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

MCP (Model Context Protocol) tool configuration

Example Usage

1import { McpServerTool } from "@openrouter/sdk/models";
2
3let value: McpServerTool = {
4 serverLabel: "my-server",
5 type: "mcp",
6};

Fields

FieldTypeRequiredDescription
allowedToolsmodels.AllowedToolsUnionN/A
authorizationstringN/A
connectorIdmodels.ConnectorIdN/A
headersRecord<string, *string*>N/A
requireApprovalmodels.RequireApprovalUnionN/A
serverDescriptionstringN/A
serverLabelstring✔️N/A
serverUrlstringN/A
type”mcp”✔️N/A