Summary
The mcp gem — the official Ruby SDK for the Model Context Protocol, maintained by the Model Context Protocol org — is not instrumented by this SDK. It provides the core execution surface for building MCP servers (that expose tools, prompts, and resources) and MCP clients (that connect to any MCP server and invoke its tools), and is actively released (v1.5.1, 2026-09-09).
This is distinct from the already-tracked gap in #195, which covers the mcp_servers/container request parameters on Anthropic's own Messages API (i.e., Claude calling out to a remote MCP connector mid-generation). This issue is about instrumenting the standalone mcp gem itself — the protocol implementation applications use to build and run MCP servers/clients and execute tool calls, independent of any specific model provider.
What is missing
No instrumentation exists for any mcp execution surface. Key APIs that should be instrumented:
Server-side tool execution
MCP::Tool.call(**args, server_context:) — the handler invoked when a client calls a tool on an MCP::Server. Each invocation is a discrete unit of agent tool execution with structured input (per the tool's input_schema) and a structured MCP::Tool::Response.
MCP::Server.new(name:, tools:, ...) — registers the set of tools/prompts/resources a server exposes; request routing for tools/call, tools/list, resources/*, and prompts/* JSON-RPC methods happens inside the server/transport layer.
Client-side tool invocation
MCP::Client#call_tool(tool:, arguments:) — the core client-side execution call: sends a tools/call request to a connected MCP server and returns the result. This is the primary point where an agent decides to execute an external tool via MCP.
MCP::Client#tools — lists available tools from the connected server (discovery step preceding execution).
MCP::Client#connect — performs the MCP initialization handshake over a transport (MCP::Client::Stdio, MCP::Client::HTTP).
Expected instrumentation
Tool call spans (both server-side Tool.call and client-side Client#call_tool) should capture:
- Input: tool name, arguments
- Metadata: server/client identity, transport type (stdio/HTTP)
- Output:
MCP::Tool::Response content (or error, for MCP::Tool::Response.new(..., is_error: true))
Braintrust docs status
not_found — Checked https://www.braintrust.dev/docs/integrations/sdk-integrations and https://www.braintrust.dev/docs/integrations, neither mentions instrumenting the modelcontextprotocol/ruby-sdk gem. The only MCP-related integration listed, https://www.braintrust.dev/docs/integrations/developer-tools/mcp ("Braintrust MCP"), is a hosted MCP server that lets AI assistants (Claude Code, Cursor, Codex, etc.) query Braintrust's own platform data — an unrelated, opposite-direction integration. It does not cover tracing applications built with the Ruby MCP SDK.
Upstream sources
Local repo files inspected
lib/braintrust/contrib.rb — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No MCP integration.
lib/braintrust/contrib/ — contains only openai/, ruby_openai/, ruby_llm/, anthropic/, and rails/ directories. No mcp/ directory.
Appraisals — no appraisal scenarios for mcp
braintrust.gemspec — no mention of mcp
- Grep for
mcp (case-insensitive) across lib/braintrust/ returns zero matches
Summary
The
mcpgem — the official Ruby SDK for the Model Context Protocol, maintained by the Model Context Protocol org — is not instrumented by this SDK. It provides the core execution surface for building MCP servers (that expose tools, prompts, and resources) and MCP clients (that connect to any MCP server and invoke its tools), and is actively released (v1.5.1, 2026-09-09).This is distinct from the already-tracked gap in #195, which covers the
mcp_servers/containerrequest parameters on Anthropic's own Messages API (i.e., Claude calling out to a remote MCP connector mid-generation). This issue is about instrumenting the standalonemcpgem itself — the protocol implementation applications use to build and run MCP servers/clients and execute tool calls, independent of any specific model provider.What is missing
No instrumentation exists for any
mcpexecution surface. Key APIs that should be instrumented:Server-side tool execution
MCP::Tool.call(**args, server_context:)— the handler invoked when a client calls a tool on anMCP::Server. Each invocation is a discrete unit of agent tool execution with structured input (per the tool'sinput_schema) and a structuredMCP::Tool::Response.MCP::Server.new(name:, tools:, ...)— registers the set of tools/prompts/resources a server exposes; request routing fortools/call,tools/list,resources/*, andprompts/*JSON-RPC methods happens inside the server/transport layer.Client-side tool invocation
MCP::Client#call_tool(tool:, arguments:)— the core client-side execution call: sends atools/callrequest to a connected MCP server and returns the result. This is the primary point where an agent decides to execute an external tool via MCP.MCP::Client#tools— lists available tools from the connected server (discovery step preceding execution).MCP::Client#connect— performs the MCP initialization handshake over a transport (MCP::Client::Stdio,MCP::Client::HTTP).Expected instrumentation
Tool call spans (both server-side
Tool.calland client-sideClient#call_tool) should capture:MCP::Tool::Responsecontent (or error, forMCP::Tool::Response.new(..., is_error: true))Braintrust docs status
not_found— Checked https://www.braintrust.dev/docs/integrations/sdk-integrations and https://www.braintrust.dev/docs/integrations, neither mentions instrumenting themodelcontextprotocol/ruby-sdkgem. The only MCP-related integration listed, https://www.braintrust.dev/docs/integrations/developer-tools/mcp ("Braintrust MCP"), is a hosted MCP server that lets AI assistants (Claude Code, Cursor, Codex, etc.) query Braintrust's own platform data — an unrelated, opposite-direction integration. It does not cover tracing applications built with the Ruby MCP SDK.Upstream sources
Local repo files inspected
lib/braintrust/contrib.rb— registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No MCP integration.lib/braintrust/contrib/— contains onlyopenai/,ruby_openai/,ruby_llm/,anthropic/, andrails/directories. Nomcp/directory.Appraisals— no appraisal scenarios formcpbraintrust.gemspec— no mention ofmcpmcp(case-insensitive) acrosslib/braintrust/returns zero matches