{"name":"@modelcontextprotocol/core","version":"2.3.0","keywords":["modelcontextprotocol","mcp","schemas","zod"],"author":{"url":"https://anthropic.com","name":"Anthropic, PBC"},"license":"Apache-2.0","_id":"@modelcontextprotocol/core@2.3.0","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":"ochafik-ant","email":"ochafik@anthropic.com"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/typescript-sdk/issues"},"dist":{"shasum":"e16da853964147db06c34e12fab7269a07e10ed6","tarball":"http://registry-npm.ywwl.com/@modelcontextprotocol/core/download/@modelcontextprotocol/core-2.3.0.tgz","fileCount":21,"integrity":"sha512-09BHFaNVBe5pB2AhzCfLj0cqmsKLERvZQ4FblzP90UMGLaXVqdZPByFjURwsUYCmxonUW2yAwgTTvle+8O2/8w==","signatures":[{"sig":"MEUCIDKbeFrMPMjupJcPSKOon78e8xL+RDkBMZ/0lH7j8fTGAiEAhW0YcNX8yD1hB1idTgU0ChWBvmpsBJWkPKfVwcwvY7E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGG9nJWAQGd3TX+FV+h/helPYiZ0BH9wUSy4R2YfoBP0AiBmjLsndTYQIAmSc7xGLw2B7mha80g0Sga5Un1OaxEQwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@modelcontextprotocol%2fcore@2.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1316868,"size":154828,"noattachment":false,"key":"/@modelcontextprotocol/core/-/@modelcontextprotocol/core-2.3.0.tgz"},"main":"./dist/index.cjs","type":"module","_from":"file:modelcontextprotocol-core-2.3.0.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"}},"./internal":{"import":{"types":"./dist/internal.d.mts","default":"./dist/internal.mjs"},"require":{"types":"./dist/internal.d.cts","default":"./dist/internal.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":"7e59aa82-0594-4d71-9c49-58da458b63de"}},"_resolved":"/tmp/1265113c2a621c5feced5b2ad67c6530/modelcontextprotocol-core-2.3.0.tgz","_integrity":"sha512-09BHFaNVBe5pB2AhzCfLj0cqmsKLERvZQ4FblzP90UMGLaXVqdZPByFjURwsUYCmxonUW2yAwgTTvle+8O2/8w==","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.21.0","dependencies":{"zod":"^4.2.0"},"typesVersions":{"*":{"internal":["dist/internal.d.mts"]}},"_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/eslint-config":"^2.0.0","@modelcontextprotocol/vitest-config":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_2.3.0_1790963052575_0.9041363855911004","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":1790963052683,"_cnpm_publish_time":1790963052683,"dist-tags":{"latest":"2.4.0"}}