@haram
The stable release of the Model Context Protocol (MCP) TypeScript SDK v2.0, the core standard in the AI agent ecosystem, is now live! The biggest change is moving away from the previous heavy, monolithic package in favor of a modular approach, splitting server and client functionality into packages like @modelcontextprotocol/server and @modelcontextprotocol/hono.
The most notable change is the move from complex, stateful SSE connections to stateless HTTP as the default transport. This makes it incredibly easy to deploy MCP servers in lightweight serverless environments or edge runtimes like Cloudflare Workers without the burden of session management.
Building a simple MCP server using the new SDK with the Hono framework and Zod is so intuitive you'll get the hang of it just by looking at the code below.
// TypeScript SDK v2.0 기준
import { createMcpHonoApp } from "@modelcontextprotocol/hono";
import { McpServer } from "@modelcontextprotocol/server";
import { z } from "zod";
const server = new McpServer({ name: "my-custom-mcp", version: "1.0.0" });
// Standard Schema v1.0 호환으로 유연해진 스키마 등록
server.tool("greet", { name: z.string() }, async ({ name }) => {
return { content: [{ type: "text", text: `반가워요, ${name}님!` }] };
});
const app = createMcpHonoApp({ server });
export default app;This update officially adopts the Standard Schema v1.0 spec, freeing the SDK from dependencies on specific Zod versions. You can now use your preferred runtime validation libraries, such as Valibot or ArkType, alongside Zod. It’s also highly polished, featuring built-in schema preloading to help mitigate edge cold-start latency.
For those who wanted to build custom agent tools but were held back by server costs or complex WebSocket/SSE setups, this is welcome news. I highly recommend taking this opportunity to build your own AI assistant with the lightweight and powerful v2.0. 😄