A windswept bonsai on a floating island

Get to know Cadenya

We’re developers who love to build. We set out to create a yes-code platform that makes building agents feel like the best parts of building software.

MCP servers as agent tools (2026)

MCP

By Cadenya

An agent uses an MCP server as a tool source in two calls: its MCP client lists the server’s tools with tools/list, then runs one with tools/call, over stdio on a laptop or over Streamable HTTP for a remote MCP server. The latest MCP specification revision, 2026-07-28, makes that HTTP transport stateless, and the OpenAI Agents SDK, the Claude API MCP connector, the Vercel AI SDK, LangGraph and Spring AI each add their own settings for auth, tool filtering and tool approval.

So pick the OpenAI Agents SDK when you want approval policies per MCP tool in Python. Pick the Claude MCP connector when you’d rather write no MCP client at all, the Vercel AI SDK for TypeScript, LangGraph when a paused approval should live in a checkpoint, and Spring AI for a Spring Boot app. And if you’d rather not write the agent loop, Cadenya is a hosted agent loop with approvals, conversation state, resume and model swap built in: it loads a remote MCP server as a tool set, with approval per tool and secrets per tool set. A coding agent can set it up with no account, in a temporary workspace you claim later. What it offers is at the end.

Every version and quote below comes from each vendor’s own pages, checked on November 11, 2026.

How each framework connects to a remote MCP server

How five agent clients and Cadenya call a remote MCP server:

Who calls the MCP serverTransportsCredentials to the serverPicking toolsApproval before a callLatest release
OpenAI Agents SDKYour process (MCPServerStreamableHttp), or the Responses API (HostedMCPTool)Streamable HTTP, stdio, and SSEheaders in params, such as Authorization: Bearertool_filter and create_static_tool_filterrequire_approval per server or per tool, plus on_approval_request for hosted toolsopenai-agents 0.24.0, October 15, 2026
Claude API MCP connectorAnthropic’s API, inside the Messages requestStreamable HTTP and SSE, at an https:// URLauthorization_token on each serverenabled per tool in mcp_toolset, plus defer_loading for tool searchClient-side MCP helpers let your code run each callanthropic 2.8.0 (Python), November 10, 2026
Vercel AI SDKYour process, through createMCPClientHTTP, SSE, and stdio for local serversheaders or an OAuth authProviderschemas pulls only the tools you definetoolApproval on streamText, which can read readOnlyHint@ai-sdk/mcp 2.0.96, November 10, 2026
LangChain and LangGraphYour process, through MCPAdapter (built on FastMCP)Inferred from the target: an https URL, a script over stdio, or an MCPConfig dict”Bearer tokens, OAuth 2.1, and per-user server auth”The list from adapter.list_tools()HumanInTheLoopMiddleware with a checkpointerlangchain 1.5.0 and langgraph 1.2.20
Spring AIYour Spring Boot app, through spring-ai-starter-mcp-clientstdio, SSE, Streamable HTTP and Stateless Streamable HTTPA McpSyncHttpClientRequestCustomizer or a WebClient ExchangeFilterFunction, per requestAn McpToolFilter beanYour own loop around ToolCallingManager2.0.2, October 23, 2026
CadenyaThe hosted agent loop, from an MCP tool setA remote MCP URL such as https://mcp.example.com/mcp, synced each hour or just in timeTool set headers that read secrets from the workspace, the tool set or the objectiveInclude and exclude filters on name, description and title, plus progressive discoveryRequired on every tool or on tools that match a filter, with a memo on denySDKs at 1.9.0 for TypeScript, Python, Ruby and Go

To build the MCP server itself from an OpenAPI spec, see OpenAPI specs as agent tools and MCP. This page covers the client side.

What changed in the 2026-07-28 MCP revision

“The current protocol version is 2026-07-28,” per the MCP versioning page. The revision before it is 2025-11-25.

The big change: a remote MCP server no longer holds a session. The changelog removes “protocol-level sessions and the Mcp-Session-Id header” and the initialize handshake. For an agent’s MCP client, that means:

  1. Every POST stands alone. “Every request now carries its protocol version and client capabilities in _meta,” and each POST carries MCP-Protocol-Version, Mcp-Method and, for tools/call, Mcp-Name headers.
  2. Discovery is one call. Servers “MUST implement” server/discover, which returns the server’s protocol versions, capabilities and identity.
  3. No stream resume. The revision removes “the Last-Event-ID header and SSE event IDs,” so a client “MUST re-issue” a request whose stream breaks.
  4. Questions come back as results. A server that needs input returns an InputRequiredResult, and the client retries the call with inputResponses.
  5. Long jobs moved to an extension. Tasks now live in io.modelcontextprotocol/tasks.

The old HTTP+SSE transport is now formally Deprecated, so pick Streamable HTTP for a new remote MCP server.

MCP SDK releases

From each registry:

SDKPackageLatestReleasedNeeds
TypeScript@modelcontextprotocol/client2.4.0October 23, 2026Node 20 or later
TypeScript, 1.x line@modelcontextprotocol/sdk1.32.2October 23, 2026Node 18 or later
Pythonmcp2.3.0October 2, 2026Python 3.10 or later
Javaio.modelcontextprotocol.sdk:mcp2.1.0October 15, 2026
Gogithub.com/modelcontextprotocol/go-sdkv1.8.0September 4, 2026
Rubymcp gem1.10.0November 11, 2026Ruby 2.7 or later

The Python SDK’s v2.0.0 release shipped on July 28, 2026, and “supports the 2026-07-28 revision of the Model Context Protocol and serves every earlier revision from the same server.” The TypeScript SDK’s 2.x packages serve 2026-07-28 connections too.

OpenAI Agents SDK MCP: HostedMCPTool, MCPServerStreamableHttp and require_approval

The OpenAI Agents SDK gives you two ways in. HostedMCPTool lets “OpenAI’s Responses API call a publicly reachable MCP server on the model’s behalf,” and the model “invokes them without an extra callback to your Python process.” MCPServerStreamableHttp connects from your own process, with the token in a header:

async with MCPServerStreamableHttp(
    name="Streamable HTTP Python Server",
    params={
        "url": "http://localhost:8000/mcp",
        "headers": {"Authorization": f"Bearer {token}"},
        "timeout": 10,
    },
    cache_tools_list=True,
    max_retry_attempts=3,
) as server:
    agent = Agent(name="Assistant", mcp_servers=[server])

Tool approval for MCP calls is a setting on the server object. MCPServerStdio, MCPServerSse and MCPServerStreamableHttp “all accept require_approval”: "always", "never", a map per tool, or a callable. From the docs:

async with MCPServerStreamableHttp(
    name="Filesystem MCP",
    params={"url": "http://localhost:8000/mcp"},
    require_approval={"always": {"tool_names": ["delete_file"]}},
) as server:
    ...

One catch: a local require_approval callable “does not receive the specific call’s arguments or call ID.” It decides per tool. For hosted tools, require_approval goes in tool_config, and an on_approval_request callback can return {"approve": False, "reason": "Escalate to a human reviewer"}. The SDK works with both mcp>=1.19.0,<2 and mcp>=2,<3.

Claude API MCP connector: mcp_servers, mcp_toolset and authorization_token

The Claude MCP connector lets you “connect to MCP servers without implementing an MCP client.” You list servers in mcp_servers, add a matching mcp_toolset to tools, and send the mcp-client-2026-09-15 beta header, which replaces mcp-client-2025-11-20. From the docs:

curl https://api.anthropic.com/v1/messages \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -H "anthropic-beta: mcp-client-2025-11-20" \
  -d '{
    "model": "claude-opus-5-5",
    "max_tokens": 1000,
    "messages": [{"role": "user", "content": "What tools do you have available?"}],
    "mcp_servers": [
      {
        "type": "url",
        "url": "https://example-server.modelcontextprotocol.io/sse",
        "name": "example-mcp",
        "authorization_token": "YOUR_TOKEN"
      }
    ],
    "tools": [{"type": "mcp_toolset", "mcp_server_name": "example-mcp"}]
  }'

The server’s URL “must start with https://.” Each tool takes enabled (for allowlists and denylists) and defer_loading, which keeps a description out of the prompt until the tool search tool finds it.

The mcp-client-2026-09-15 header adds a tools field with “a pinned copy of the server’s tool list,” so a server that changes its tools mid-conversation doesn’t change what Claude sees.

MCP tool approval in the Vercel AI SDK, LangGraph and Spring AI

The MCP spec says “there SHOULD always be a human in the loop with the ability to deny tool invocations,” and also that clients “MUST consider tool annotations to be untrusted unless they come from trusted servers.” So every client treats readOnlyHint and destructiveHint as input to your policy, not as the policy.

Vercel AI SDK. createMCPClient from @ai-sdk/mcp supports “stateless MCP 2026-07-28,” and the docs warn that stdio “cannot be deployed to production environments.” Approval is the toolApproval option on streamText. This policy, adapted from the docs, runs only tools the server marks read-only:

const result = streamText({
  model,
  tools,
  toolApproval: ({ toolCall }) => {
    const annotations = (
      toolCall.toolMetadata as McpProviderMetadata | undefined
    )?.annotations;

    return annotations?.readOnlyHint === true
      ? 'not-applicable'
      : { type: 'user-approval', reason: 'Not marked read-only.' };
  },
  prompt,
});

LangChain and LangGraph. Install langchain[mcp] (version 1.4.0 or later), open an MCPAdapter on a URL, and pass await adapter.list_tools() to create_agent. LangChain has a migration guide from the older langchain-mcp-adapters package. For approval, HumanInTheLoopMiddleware takes interrupt_on with a when predicate that can read the MCP destructive hint and the call’s arguments. “Human-in-the-loop requires checkpointing to handle interrupts,” and you resume with Command(resume={"decisions": [{"type": "approve"}]}).

Spring AI. The spring-ai-starter-mcp-client 2.0.2 starter depends on Spring Boot 4.1.2, per its POM on Maven Central. Connections live in YAML:

spring:
  ai:
    mcp:
      client:
        streamable-http:
          connections:
            server1:
              url: http://localhost:8080

The starter exposes MCP tools as a ToolCallbackProvider. To gate a call, the tools page lists “gating tool execution on an external approval step” as a reason to set AdvisorParams.toolCallingAdvisorAutoRegister(false) and run each call through ToolCallingManager yourself.

MCP OAuth for a remote MCP server: what the client sends

“Authorization is OPTIONAL for MCP implementations,” and stdio servers “retrieve credentials from the environment.” On HTTP, a protected remote MCP server follows OAuth 2.1:

  1. The server publishes where to sign in. “MCP servers MUST implement OAuth 2.0 Protected Resource Metadata (RFC9728).”
  2. The client names the server. Clients “MUST implement Resource Indicators for OAuth 2.0” (RFC 8707), so each token is issued for one MCP server.
  3. Every request carries the token. “Authorization MUST be included in every HTTP request from client to server.”
  4. The server keeps its token to itself. “MCP servers MUST NOT accept or transit any other tokens,” so calls to your own API need a token issued for that API.

Client registration now prefers Client ID Metadata Documents, and Dynamic Client Registration is deprecated. Cadenya’s own MCP server at https://mcp.cadenya.com/mcp works this way: app.cadenya.com is the authorization server, and clients register with client ID metadata documents. For the full flow, see MCP OAuth and per-user auth. For agents that act as a user, see AI agents acting on behalf of users.

What does Cadenya add to MCP servers?

Each client above gives your code an MCP connection, and the loop stays yours. Cadenya is the agent loop itself, hosted, and a remote MCP server joins it as a tool set. Here’s what that covers:

  1. MCP is one of four tool set adapters. A tool set reads an OpenAPI 3.0 or later spec, an MCP server, HTTP endpoints you define, or Bare tools your app answers.
  2. Tools synced, not fetched on every run. Interval syncing caches the server’s tools and checks for changes each hour, so objectives start faster. Just-in-time syncing fits a server that lists different tools for an admin and a member.
  3. A header you can verify. Each sync request carries an X-Cadenya-Challenge-Token header, and an account endpoint rotates the token.
  4. Secrets per tool set. Put {{ secrets.MY_SECRET }} in a tool set header. Cadenya resolves it from the workspace, the tool set, then the objective, and the most specific value wins. An objective secret can hold a short-lived JWT minted for one user.
  5. Approval per tool. Require approval for every call, or only for tools that match a filter. The objective emits toolApprovalRequested, your backend approves or denies, and a denial carries a memo the agent reads. Several tools can wait at once.
  6. A smaller context window. Filter an MCP tool set by name, description and title, and turn on progressive discovery to load tools on demand.
  7. Conversation state and resume. Every objective carries a durable event log of its agent loop. Stream new events and resume with the last event ID.
  8. Model swap with no deploy. The model is a setting on an agent variation. Connect your own AI provider keys and pay the provider directly.
  9. An MCP server for your coding agent. https://mcp.cadenya.com/mcp speaks MCP 2026-07-28 over Streamable HTTP and covers the Cadenya API in three tools: cadenya_discover, cadenya_read and cadenya_write. Add it to Claude Code with claude mcp add --transport http cadenya https://mcp.cadenya.com/mcp, then sign in or send an API key as a bearer token.

MCP tool sets shows the sync options and the challenge token, and the free plan needs no card.

No account yet? A coding agent can create a temporary workspace with cadenya workspaces create --temporary, run its first objectives there, and hand you a link to claim it, as auth.md explains. To create an account, sign up at app.cadenya.com/signup, then copy your API key from the API keys page at app.cadenya.com/account/apiKeys.

Grow wherever AI goes next.

Start shipping agents that are equipped to evolve.

A pine bonsai overlooking a mountain lake