{"name":"@modelcontextprotocol/core","version":"2.0.0-beta.2","keywords":["modelcontextprotocol","mcp","schemas","zod"],"author":{"url":"https://anthropic.com","name":"Anthropic, PBC"},"license":"MIT","_id":"@modelcontextprotocol/core@2.0.0-beta.2","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":"f2269cd7fce21ba70079653096edda0aab305585","tarball":"http://registry-npm.ywwl.com/@modelcontextprotocol/core/download/@modelcontextprotocol/core-2.0.0-beta.2.tgz","fileCount":11,"integrity":"sha512-NrmqBcBzycPRK1FwhjGhqbEfXKmiHsRO8oqKrsMTObm6gpcP5hs6UXWEER6o0WslAhkTdTX+JX5PHfN5DrrekA==","signatures":[{"sig":"MEUCIQDO46llJA2riawo8XJfWC2fz+2oy+Zbrbu8uqllf7Z+hwIga4y0CjZ53Be+vG9YOTgukDhUVfcYsUl3ipZ9P8bA55o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@modelcontextprotocol%2fcore@2.0.0-beta.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1157097,"size":128108,"noattachment":false,"key":"/@modelcontextprotocol/core/-/@modelcontextprotocol/core-2.0.0-beta.2.tgz"},"main":"./dist/index.cjs","type":"module","_from":"file:modelcontextprotocol-core-2.0.0-beta.2.tgz","types":"./dist/index.d.mts","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"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/6bc39a5ef0edc2b304d7319d8888e7a6/modelcontextprotocol-core-2.0.0-beta.2.tgz","_integrity":"sha512-NrmqBcBzycPRK1FwhjGhqbEfXKmiHsRO8oqKrsMTObm6gpcP5hs6UXWEER6o0WslAhkTdTX+JX5PHfN5DrrekA==","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.18.0","dependencies":{"zod":"^4.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","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-beta.1","@modelcontextprotocol/eslint-config":"^2.0.0","@modelcontextprotocol/vitest-config":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_2.0.0-beta.2_1782995264337_0.25750446535693716","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":1782995264477,"_cnpm_publish_time":1782995264477,"dist-tags":{"latest":"2.4.0"}}