package
Model Context Protocol for TypeScript — public Zod schemas (spec + OAuth/OpenID)
npm install @modelcontextprotocol/coreGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
7.2 MB
Includes dependencies.
Canonical public home for the Model Context Protocol specification and OAuth/OpenID Zod schemas.
These are the exact schema constants the SDK validates protocol and OAuth/OpenID payloads against internally. The @modelcontextprotocol/server and @modelcontextprotocol/client packages keep a Zod-free public surface, so this package exists as the supported place to import the
raw schemas when you need to validate or parse MCP messages yourself.
npm install @modelcontextprotocol/coreimport { CallToolResultSchema } from '@modelcontextprotocol/core';
// Throws on invalid input; returns the typed result on success.
const result = CallToolResultSchema.parse(payload);
// Or non-throwing:
const parsed = CallToolResultSchema.safeParse(payload);
if (parsed.success) {
// parsed.data is a fully typed CallToolResult
}This package exports only Zod schema constants (*Schema), in two groups:
CallToolResultSchema, ListToolsResultSchema, …; andOAuthTokensSchema, OAuthMetadataSchema, IdJagTokenExchangeResponseSchema, … (the schemas v1 exposed from @modelcontextprotocol/sdk/shared/auth.js).The corresponding TypeScript types, error classes, enums, and type guards are part of the public API of @modelcontextprotocol/server and
@modelcontextprotocol/client.
Migrating from v1? In v1 these schemas were imported from
@modelcontextprotocol/sdk/types.js(spec schemas) and@modelcontextprotocol/sdk/shared/auth.js(OAuth/OpenID schemas). Point those*Schemaimports at@modelcontextprotocol/coreand your existing.parse()/.safeParse()calls keep working unchanged.
Latest published Oct 23, 2026
latest
pcarleton
paul@modelcontextprotocol.io