Framework Adapters
WebMCP provides zero-dependency framework adapters that bridge the core SDK's WebStandardHttpTransport to popular web frameworks.
How Adapters Work
All adapters follow the same pattern:
- Create a
WebStandardHttpTransport(from the core SDK) - Create a
WebMCPServerand register tools - Use the adapter to expose the transport as a framework-native handler
HTTP Request → Framework Adapter → WebStandardHttpTransport → WebMCPServer → Tool Handler
│
HTTP Response ← Framework Adapter ← WebStandardHttpTransport ← JSON-RPC ResponseThe adapters are thin wrappers that convert between framework-specific request/response types and the Web Standard Request/Response API used by the transport.
Available Adapters
| Adapter | Package | Framework |
|---|---|---|
| Express.js | @thestudioxi/webmcp-adapter-express | Express 4/5 |
| Hono | @thestudioxi/webmcp-adapter-hono | Hono |
| NestJS | @thestudioxi/webmcp-adapter-nest | NestJS |
| Vercel AI SDK | @thestudioxi/webmcp-adapter-vercel-ai | Vercel AI SDK |
No Adapter Needed
If your framework uses the Web Standard Request/Response API natively (Bun, Deno, Cloudflare Workers), you can use the transport directly:
ts
import {
WebMCPServer,
WebStandardHttpTransport,
createWebMCPHttpHandler,
} from '@thestudioxi/webmcp';
const transport = new WebStandardHttpTransport();
const server = new WebMCPServer({ transport });
// ... register tools ...
await server.start();
// Bun native server
Bun.serve({
port: 3000,
fetch: createWebMCPHttpHandler(transport),
});