{"name":"@modelcontextprotocol/core","version":"2.0.0-alpha.1","keywords":["modelcontextprotocol","mcp","schemas","zod"],"author":{"url":"https://anthropic.com","name":"Anthropic, PBC"},"license":"MIT","_id":"@modelcontextprotocol/core@2.0.0-alpha.1","maintainers":[{"name":"jspahrsummers","email":"justin@jspahrsummers.com"},{"name":"pcarleton","email":"paul@modelcontextprotocol.io"},{"name":"fweinberger","email":"fweinberger@anthropic.com"},{"name":"thedsp","email":"david@modelcontextprotocol.io"},{"name":"ashwin-ant","email":"ashwin@anthropic.com"},{"name":"ochafik-ant","email":"ochafik@anthropic.com"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/typescript-sdk/issues"},"dist":{"shasum":"260b8e17cde3f0146f91f19f982420c19a3188ef","tarball":"http://registry-npm.ywwl.com/@modelcontextprotocol/core/download/@modelcontextprotocol/core-2.0.0-alpha.1.tgz","fileCount":7,"integrity":"sha512-AWdY7gcVq3mRdekXOI+Gh1W+B7aeWDaGERmcQ7PfSu9C0S78yu8jR+JseNWO375l6MM8FjIWVLD9U7KX2sbTpg==","signatures":[{"sig":"MEUCIQDhGuUzpSca0w5ldBqaUC+P6ev0x4i6nNMNTcHTJhUAIgIgJzFpyxFE8D+r5vT4ALKlJc/55gPJrTMKbBsmEwhCcSs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@modelcontextprotocol%2fcore@2.0.0-alpha.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":572824,"size":68153,"noattachment":false,"key":"/@modelcontextprotocol/core/-/@modelcontextprotocol/core-2.0.0-alpha.1.tgz"},"type":"module","_from":"file:modelcontextprotocol-core-2.0.0-alpha.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"eslint src/ && prettier --ignore-path ../../.prettierignore --check .","test":"vitest run","build":"tsdown","check":"pnpm run typecheck && pnpm run lint","lint:fix":"eslint src/ --fix && prettier --ignore-path ../../.prettierignore --write .","typecheck":"tsgo -p tsconfig.json --noEmit","test:watch":"vitest","build:watch":"tsdown --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e59aa82-0594-4d71-9c49-58da458b63de"}},"_resolved":"/tmp/38e24275647e44794a0af73c30e074f7/modelcontextprotocol-core-2.0.0-alpha.1.tgz","_integrity":"sha512-AWdY7gcVq3mRdekXOI+Gh1W+B7aeWDaGERmcQ7PfSu9C0S78yu8jR+JseNWO375l6MM8FjIWVLD9U7KX2sbTpg==","repository":{"url":"git+https://github.com/modelcontextprotocol/typescript-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"Model Context Protocol for TypeScript — public Zod schemas (spec + OAuth/OpenID)","directories":{},"_nodeVersion":"24.17.0","dependencies":{"zod":"^4.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.2","tsdown":"^0.18.0","vitest":"^4.0.15","prettier":"3.6.2","@eslint/js":"^9.39.2","typescript":"^5.9.3","eslint-plugin-n":"^17.23.1","typescript-eslint":"^8.48.1","eslint-config-prettier":"^10.1.8","@typescript/native-preview":"^7.0.0-dev.20251217.1","@modelcontextprotocol/tsconfig":"^2.0.0","@modelcontextprotocol/core-internal":"^2.0.0-alpha.2","@modelcontextprotocol/eslint-config":"^2.0.0","@modelcontextprotocol/vitest-config":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_2.0.0-alpha.1_1782416779226_0.7463651416959847","host":"s3://npm-registry-packages-npm-production"},"readme":"# @modelcontextprotocol/core\n\nCanonical public home for the [Model Context Protocol](https://modelcontextprotocol.io) specification and OAuth/OpenID **Zod schemas**.\n\nThese 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\nraw schemas when you need to validate or parse MCP messages yourself.\n\n## Install\n\n```sh\nnpm install @modelcontextprotocol/core\n```\n\n## Usage\n\n```ts\nimport { CallToolResultSchema } from '@modelcontextprotocol/core';\n\n// Throws on invalid input; returns the typed result on success.\nconst result = CallToolResultSchema.parse(payload);\n\n// Or non-throwing:\nconst parsed = CallToolResultSchema.safeParse(payload);\nif (parsed.success) {\n    // parsed.data is a fully typed CallToolResult\n}\n```\n\n## Scope\n\nThis package exports **only** Zod schema constants (`*Schema`), in two groups:\n\n- the MCP **spec** schemas — `CallToolResultSchema`, `ListToolsResultSchema`, …; and\n- the **OAuth/OpenID** auth schemas — `OAuthTokensSchema`, `OAuthMetadataSchema`, `IdJagTokenExchangeResponseSchema`, … (the schemas v1 exposed from `@modelcontextprotocol/sdk/shared/auth.js`).\n\nThe corresponding TypeScript types, error classes, enums, and type guards are part of the public API of [`@modelcontextprotocol/server`](https://www.npmjs.com/package/@modelcontextprotocol/server) and\n[`@modelcontextprotocol/client`](https://www.npmjs.com/package/@modelcontextprotocol/client).\n\n> **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 `*Schema` imports at `@modelcontextprotocol/core` and your existing `.parse()` /\n> `.safeParse()` calls keep working unchanged.\n","publish_time":1782416779375,"_cnpm_publish_time":1782416779375,"dist-tags":{"latest":"2.4.0"}}