diff --git a/examples/server/package.json b/examples/server/package.json
index f86cc1375..4bd313256 100644
--- a/examples/server/package.json
+++ b/examples/server/package.json
@@ -36,14 +36,17 @@
"dependencies": {
"@hono/node-server": "catalog:runtimeServerOnly",
"@modelcontextprotocol/examples-shared": "workspace:^",
- "@modelcontextprotocol/node": "workspace:^",
- "@modelcontextprotocol/server": "workspace:^",
"@modelcontextprotocol/express": "workspace:^",
"@modelcontextprotocol/hono": "workspace:^",
+ "@modelcontextprotocol/node": "workspace:^",
+ "@modelcontextprotocol/server": "workspace:^",
+ "@valibot/to-json-schema": "catalog:devTools",
+ "arktype": "catalog:devTools",
"better-auth": "^1.4.17",
"cors": "catalog:runtimeServerOnly",
"express": "catalog:runtimeServerOnly",
"hono": "catalog:runtimeServerOnly",
+ "valibot": "catalog:devTools",
"zod": "catalog:runtimeShared"
},
"devDependencies": {
diff --git a/examples/server/src/arktypeExample.ts b/examples/server/src/arktypeExample.ts
new file mode 100644
index 000000000..ff96a334a
--- /dev/null
+++ b/examples/server/src/arktypeExample.ts
@@ -0,0 +1,28 @@
+#!/usr/bin/env node
+/**
+ * Minimal MCP server using ArkType for schema validation.
+ * ArkType implements the Standard Schema spec with built-in JSON Schema conversion.
+ */
+
+import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
+import { type } from 'arktype';
+
+const server = new McpServer({
+ name: 'arktype-example',
+ version: '1.0.0'
+});
+
+// Register a tool with ArkType schema
+server.registerTool(
+ 'greet',
+ {
+ description: 'Generate a greeting',
+ inputSchema: type({ name: 'string' })
+ },
+ async ({ name }) => ({
+ content: [{ type: 'text', text: `Hello, ${name}!` }]
+ })
+);
+
+const transport = new StdioServerTransport();
+await server.connect(transport);
diff --git a/examples/server/src/valibotExample.ts b/examples/server/src/valibotExample.ts
new file mode 100644
index 000000000..46ab793c0
--- /dev/null
+++ b/examples/server/src/valibotExample.ts
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+/**
+ * Minimal MCP server using Valibot for schema validation.
+ * Use toStandardJsonSchema() from @valibot/to-json-schema to create
+ * StandardJSONSchemaV1-compliant schemas.
+ */
+
+import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
+import { toStandardJsonSchema } from '@valibot/to-json-schema';
+import * as v from 'valibot';
+
+const server = new McpServer({
+ name: 'valibot-example',
+ version: '1.0.0'
+});
+
+// Register a tool with Valibot schema
+server.registerTool(
+ 'greet',
+ {
+ description: 'Generate a greeting',
+ inputSchema: toStandardJsonSchema(v.object({ name: v.string() }))
+ },
+ async ({ name }) => ({
+ content: [{ type: 'text', text: `Hello, ${name}!` }]
+ })
+);
+
+const transport = new StdioServerTransport();
+await server.connect(transport);
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 63bd0034c..e4b744219 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -12,6 +12,7 @@ export * from './shared/uriTemplate.js';
export * from './types/types.js';
export * from './util/inMemory.js';
export * from './util/schema.js';
+export * from './util/standardSchema.js';
// experimental exports
export * from './experimental/index.js';
diff --git a/packages/core/src/util/schema.ts b/packages/core/src/util/schema.ts
index adecee361..fddd38877 100644
--- a/packages/core/src/util/schema.ts
+++ b/packages/core/src/util/schema.ts
@@ -1,14 +1,17 @@
+/**
+ * Internal Zod schema utilities for protocol handling.
+ * These are used internally by the SDK for protocol message validation.
+ */
+
import * as z from 'zod/v4';
/**
* Base type for any Zod schema.
- * This is the canonical type to use when accepting user-provided schemas.
*/
export type AnySchema = z.core.$ZodType;
/**
- * A Zod schema for objects specifically (not unions).
- * Use this when you need to constrain to ZodObject schemas.
+ * A Zod schema for objects specifically.
*/
export type AnyObjectSchema = z.core.$ZodObject;
@@ -73,7 +76,6 @@ export function getSchemaDescription(schema: AnySchema): string | undefined {
/**
* Checks if a schema is optional (accepts undefined).
- * Uses the public .type property which works in both zod/v4 and zod/v4/mini.
*/
export function isOptionalSchema(schema: AnySchema): boolean {
const candidate = schema as { type?: string };
@@ -83,7 +85,6 @@ export function isOptionalSchema(schema: AnySchema): boolean {
/**
* Unwraps an optional schema to get the inner schema.
* If the schema is not optional, returns it unchanged.
- * Uses the public .def.innerType property which works in both zod/v4 and zod/v4/mini.
*/
export function unwrapOptionalSchema(schema: AnySchema): AnySchema {
if (!isOptionalSchema(schema)) {
diff --git a/packages/core/src/util/standardSchema.ts b/packages/core/src/util/standardSchema.ts
new file mode 100644
index 000000000..e93008e1b
--- /dev/null
+++ b/packages/core/src/util/standardSchema.ts
@@ -0,0 +1,179 @@
+/**
+ * Standard Schema utilities for user-provided schemas.
+ * Supports Zod v4, Valibot, ArkType, and other Standard Schema implementations.
+ * @see https://standardschema.dev
+ */
+
+/* eslint-disable @typescript-eslint/no-namespace */
+
+import type { JsonSchemaType, jsonSchemaValidator } from '../validation/types.js';
+
+// Standard Schema interfaces (from https://standardschema.dev)
+
+export interface StandardTypedV1 {
+ readonly '~standard': StandardTypedV1.Props;
+}
+
+export namespace StandardTypedV1 {
+ export interface Props {
+ readonly version: 1;
+ readonly vendor: string;
+ readonly types?: Types | undefined;
+ }
+
+ export interface Types {
+ readonly input: Input;
+ readonly output: Output;
+ }
+
+ export type InferInput = NonNullable['input'];
+ export type InferOutput = NonNullable['output'];
+}
+
+export interface StandardSchemaV1 {
+ readonly '~standard': StandardSchemaV1.Props;
+}
+
+export namespace StandardSchemaV1 {
+ export interface Props extends StandardTypedV1.Props {
+ readonly validate: (value: unknown, options?: Options | undefined) => Result