MCP v2.0 SDK Released — Introducing Stateless HTTP and OAuth 2.1 Security Standards

Maru

@maru

MCP v2.0 SDK 출시 — 무상태 HTTP와 OAuth 2.1 보안 표준 도입

MCP v2.0 SDK Released — Introducing Stateless HTTP and OAuth 2.1 Security Standards

The Model Context Protocol (MCP), the technical standard connecting AI agents with external tools, is being overhauled with a stateless HTTP architecture. Previous versions of MCP relied on local-centric standard I/O or Server-Sent Events, which required session persistence and made scaling in distributed server environments challenging. The recently released 2026-07-28 specification candidate and TypeScript SDK v2.0 overcome these limitations by introducing stateless network design and robust enterprise security specifications, seamlessly supporting large-scale production deployments.

Paradigm Shift to Stateless HTTP Design and Package Modularization

The core change in the Model Context Protocol spec candidate and TypeScript SDK v2.0 is the full transition to stateless HTTP transport. In previous specifications, servers had to maintain connections with clients, issuing and managing session IDs. Consequently, horizontal scaling of servers in large-scale services imposed infrastructure burdens, such as requiring sticky sessions on load balancers or implementing separate session-sharing storage.

In the redesigned specification, the initial handshake is omitted, and protocol versions and feature definitions are transmitted independently with every request. Thanks to this self-contained structure where every request is fully autonomous, developers can distribute server instances freely using standard round-robin load balancing without complex session management.

To enable seamless implementation of this stateless architecture, the existing single SDK package has been cleanly split into @modelcontextprotocol/server and @modelcontextprotocol/client for client development. Additionally, various lightweight adapter packages are provided to integrate with your preferred web frameworks.

For example, in Hono or Cloudflare Workers environments that support web-standard interfaces, standard handlers provided by the SDK can be served directly without conversion. Conversely, in the widely used Express ecosystem under Node.js, you can easily integrate into a router with just a few lines of code using a dedicated adapter.

typescript
// @modelcontextprotocol/server v2.0 및 Node.js 어댑터 기준
import express from 'express';
import { createMcpHandler, McpServer } from '@modelcontextprotocol/server';
import { toNodeHandler } from '@modelcontextprotocol/node';

const mcpHandler = createMcpHandler(() => {
  const server = new McpServer({ name: 'enterprise-tools', version: '2.0.0' });
  // 여기에 도구 및 리소스 등록 로직을 추가합니다.
  return server;
});

const app = express();
app.all('/mcp', toNodeHandler(mcpHandler));
app.listen(3000);

Thanks to this new stateless design and modular package structure, you can now build and operate MCP tool servers with great flexibility—not only on lightweight virtual servers or serverless platforms but also within complex microservice architectures.

Security Interoperability Structure Based on OAuth 2.1 and RFC 9728

For agents to dynamically discover and securely execute tools on external servers, a robust authentication system is required. MCP v2 has adopted OAuth 2.1 and RFC 9728 (OAuth Protected Resource Metadata) as its core authentication architecture to handle large-scale distributed environments.

When an unauthenticated agent client calls a tool execution API, the MCP server rejects the request while sending a challenge response so the client can identify the authentication method itself. At this point, the server returns a 401 Unauthorized status code along with the protected resource metadata path in the WWW-Authenticate header.

http
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource"

The client accesses the resource_metadata endpoint specified in the header to fetch JSON metadata describing the authorization server addresses trusted by the MCP server and the supported scopes. This allows agents to mechanically initiate the next step of the OAuth 2.1 authorization code flow without hard-coded credentials. Ultimately, this structure provides high interoperability, enabling multiple MCP servers and clients to dynamically extend trust boundaries without complex pre-integration configurations.

Simplified Interface Validation with Standard Schema v1.0 Integration

The architecture for real-time validation of tool inputs executed by agents has also been significantly overhauled. MCP TypeScript SDK v2 now includes built-in support for Standard Schema v1.0, the common validation specification for the TypeScript ecosystem. Consequently, you can use any validation library—such as Zod, Valibot, or ArkType—directly as a tool's input schema without needing separate adapters or transformation layers.

In the past, the SDK was tightly coupled to specific versions of Zod, often causing dependency conflicts with the developer’s project or issues like missing schemas during JSON schema transformation. The v2 SDK binds any object meeting the Standard Schema specification as inputSchema immediately, completely resolving these chronic version conflicts.

Below is an example of registering a tool using a Zod schema with the @modelcontextprotocol/server package.

typescript
import { McpServer } from "@modelcontextprotocol/server";
import { z } from "zod";

const server = new McpServer({
  name: "weather-service",
  version: "1.0.0"
});

server.registerTool(
  "get_weather",
  {
    description: "특정 도시의 현재 날씨를 조회합니다.",
    inputSchema: z.object({
      city: z.string().describe("날씨를 조회할 도시 이름 (예: 서울, 부산)")
    })
  },
  async ({ city }) => {
    return {
      content: [{ type: "text", text: `${city}의 날씨는 맑음입니다.` }]
    };
  }
);

Using this approach, the request body sent by the client at call-time is automatically validated against the defined schema. Developers can immediately use statically typed input arguments within the handler without complex manual parsing, significantly improving runtime stability and the developer experience.

Secure Tool Infrastructure Realized in Distributed Environments

By combining stateless HTTP design with OAuth 2.1 standard security, MCP v2.0 elevates AI agent integration from simple prototypes to true enterprise-grade microservice architectures.

Developers can now build distributed MCP tool networks that are independently scalable and security-verified, rather than relying on heavy integration logic coupled to clients. As major agent frameworks like Vercel AI SDK and LangChain quickly adopt these standards, building tool ecosystems based on stateless APIs will become an essential choice for real-world production deployments.


Reference Links