├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CODEOWNERS └── workflows │ ├── main.yml │ ├── publish.yml │ └── update-spec-types.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.json ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── docs ├── capabilities.md ├── client.md ├── faq.md └── server.md ├── eslint.config.mjs ├── package.json ├── scripts ├── cli.ts └── fetch-spec-types.ts ├── src ├── __fixtures__ │ ├── serverThatHangs.ts │ ├── testServer.ts │ └── zodTestMatrix.ts ├── __mocks__ │ └── pkce-challenge.ts ├── client │ ├── auth-extensions.test.ts │ ├── auth-extensions.ts │ ├── auth.test.ts │ ├── auth.ts │ ├── cross-spawn.test.ts │ ├── index.test.ts │ ├── index.ts │ ├── middleware.test.ts │ ├── middleware.ts │ ├── sse.test.ts │ ├── sse.ts │ ├── stdio.test.ts │ ├── stdio.ts │ ├── streamableHttp.test.ts │ ├── streamableHttp.ts │ └── websocket.ts ├── examples │ ├── README.md │ ├── client │ │ ├── elicitationUrlExample.ts │ │ ├── multipleClientsParallel.ts │ │ ├── parallelToolCallsClient.ts │ │ ├── simpleClientCredentials.ts │ │ ├── simpleOAuthClient.ts │ │ ├── simpleOAuthClientProvider.ts │ │ ├── simpleStreamableHttp.ts │ │ ├── simpleTaskInteractiveClient.ts │ │ ├── ssePollingClient.ts │ │ └── streamableHttpWithSseFallbackClient.ts │ ├── server │ │ ├── README-simpleTaskInteractive.md │ │ ├── demoInMemoryOAuthProvider.test.ts │ │ ├── demoInMemoryOAuthProvider.ts │ │ ├── elicitationFormExample.ts │ │ ├── elicitationUrlExample.ts │ │ ├── jsonResponseStreamableHttp.ts │ │ ├── mcpServerOutputSchema.ts │ │ ├── simpleSseServer.ts │ │ ├── simpleStatelessStreamableHttp.ts │ │ ├── simpleStreamableHttp.ts │ │ ├── simpleTaskInteractive.ts │ │ ├── sseAndStreamableHttpCompatibleServer.ts │ │ ├── ssePollingExample.ts │ │ ├── standaloneSseWithGetStreamableHttp.ts │ │ └── toolWithSampleServer.ts │ └── shared │ │ └── inMemoryEventStore.ts ├── experimental │ ├── index.ts │ └── tasks │ │ ├── client.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── mcp-server.ts │ │ ├── server.ts │ │ ├── stores │ │ ├── in-memory.test.ts │ │ └── in-memory.ts │ │ ├── task-listing.test.ts │ │ ├── task.test.ts │ │ └── types.ts ├── inMemory.test.ts ├── inMemory.ts ├── integration-tests │ ├── processCleanup.test.ts │ ├── stateManagementStreamableHttp.test.ts │ ├── taskLifecycle.test.ts │ └── taskResumability.test.ts ├── server │ ├── auth │ │ ├── clients.ts │ │ ├── errors.ts │ │ ├── handlers │ │ │ ├── authorize.test.ts │ │ │ ├── authorize.ts │ │ │ ├── metadata.test.ts │ │ │ ├── metadata.ts │ │ │ ├── register.test.ts │ │ │ ├── register.ts │ │ │ ├── revoke.test.ts │ │ │ ├── revoke.ts │ │ │ ├── token.test.ts │ │ │ └── token.ts │ │ ├── middleware │ │ │ ├── allowedMethods.test.ts │ │ │ ├── allowedMethods.ts │ │ │ ├── bearerAuth.test.ts │ │ │ ├── bearerAuth.ts │ │ │ ├── clientAuth.test.ts │ │ │ └── clientAuth.ts │ │ ├── provider.ts │ │ ├── providers │ │ │ ├── proxyProvider.test.ts │ │ │ └── proxyProvider.ts │ │ ├── router.test.ts │ │ ├── router.ts │ │ └── types.ts │ ├── completable.test.ts │ ├── completable.ts │ ├── elicitation.test.ts │ ├── express.ts │ ├── index.test.ts │ ├── index.ts │ ├── mcp.test.ts │ ├── mcp.ts │ ├── middleware │ │ └── hostHeaderValidation.ts │ ├── sse.test.ts │ ├── sse.ts │ ├── stdio.test.ts │ ├── stdio.ts │ ├── streamableHttp.test.ts │ ├── streamableHttp.ts │ ├── title.test.ts │ ├── zod-compat.ts │ └── zod-json-schema-compat.ts ├── shared │ ├── auth-utils.test.ts │ ├── auth-utils.ts │ ├── auth.test.ts │ ├── auth.ts │ ├── metadataUtils.ts │ ├── protocol-transport-handling.test.ts │ ├── protocol.test.ts │ ├── protocol.ts │ ├── responseMessage.ts │ ├── stdio.test.ts │ ├── stdio.ts │ ├── toolNameValidation.test.ts │ ├── toolNameValidation.ts │ ├── transport.ts │ ├── uriTemplate.test.ts │ └── uriTemplate.ts ├── spec.types.test.ts ├── spec.types.ts ├── types.capabilities.test.ts ├── types.test.ts ├── types.ts └── validation │ ├── ajv-provider.ts │ ├── cfworker-provider.ts │ ├── index.ts │ ├── types.ts │ └── validation.test.ts ├── tsconfig.cjs.json ├── tsconfig.json ├── tsconfig.prod.json ├── vitest.config.ts └── vitest.setup.ts /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json linguist-generated=true 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.github/CODEOWNERS -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/update-spec-types.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.github/workflows/update-spec-types.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.npmrc -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.prettierignore -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/.prettierrc.json -------------------------------------------------------------------------------- /CLAUDE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/CLAUDE.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/SECURITY.md -------------------------------------------------------------------------------- /docs/capabilities.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/docs/capabilities.md -------------------------------------------------------------------------------- /docs/client.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/docs/client.md -------------------------------------------------------------------------------- /docs/faq.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/docs/faq.md -------------------------------------------------------------------------------- /docs/server.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/docs/server.md -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/eslint.config.mjs -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/package.json -------------------------------------------------------------------------------- /scripts/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/scripts/cli.ts -------------------------------------------------------------------------------- /scripts/fetch-spec-types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/scripts/fetch-spec-types.ts -------------------------------------------------------------------------------- /src/__fixtures__/serverThatHangs.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/__fixtures__/serverThatHangs.ts -------------------------------------------------------------------------------- /src/__fixtures__/testServer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/__fixtures__/testServer.ts -------------------------------------------------------------------------------- /src/__fixtures__/zodTestMatrix.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/__fixtures__/zodTestMatrix.ts -------------------------------------------------------------------------------- /src/__mocks__/pkce-challenge.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/__mocks__/pkce-challenge.ts -------------------------------------------------------------------------------- /src/client/auth-extensions.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/auth-extensions.test.ts -------------------------------------------------------------------------------- /src/client/auth-extensions.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/auth-extensions.ts -------------------------------------------------------------------------------- /src/client/auth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/auth.test.ts -------------------------------------------------------------------------------- /src/client/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/auth.ts -------------------------------------------------------------------------------- /src/client/cross-spawn.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/cross-spawn.test.ts -------------------------------------------------------------------------------- /src/client/index.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/index.test.ts -------------------------------------------------------------------------------- /src/client/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/index.ts -------------------------------------------------------------------------------- /src/client/middleware.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/middleware.test.ts -------------------------------------------------------------------------------- /src/client/middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/middleware.ts -------------------------------------------------------------------------------- /src/client/sse.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/sse.test.ts -------------------------------------------------------------------------------- /src/client/sse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/sse.ts -------------------------------------------------------------------------------- /src/client/stdio.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/stdio.test.ts -------------------------------------------------------------------------------- /src/client/stdio.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/stdio.ts -------------------------------------------------------------------------------- /src/client/streamableHttp.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/streamableHttp.test.ts -------------------------------------------------------------------------------- /src/client/streamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/streamableHttp.ts -------------------------------------------------------------------------------- /src/client/websocket.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/client/websocket.ts -------------------------------------------------------------------------------- /src/examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/README.md -------------------------------------------------------------------------------- /src/examples/client/elicitationUrlExample.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/elicitationUrlExample.ts -------------------------------------------------------------------------------- /src/examples/client/multipleClientsParallel.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/multipleClientsParallel.ts -------------------------------------------------------------------------------- /src/examples/client/parallelToolCallsClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/parallelToolCallsClient.ts -------------------------------------------------------------------------------- /src/examples/client/simpleClientCredentials.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/simpleClientCredentials.ts -------------------------------------------------------------------------------- /src/examples/client/simpleOAuthClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/simpleOAuthClient.ts -------------------------------------------------------------------------------- /src/examples/client/simpleOAuthClientProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/simpleOAuthClientProvider.ts -------------------------------------------------------------------------------- /src/examples/client/simpleStreamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/simpleStreamableHttp.ts -------------------------------------------------------------------------------- /src/examples/client/simpleTaskInteractiveClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/simpleTaskInteractiveClient.ts -------------------------------------------------------------------------------- /src/examples/client/ssePollingClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/ssePollingClient.ts -------------------------------------------------------------------------------- /src/examples/client/streamableHttpWithSseFallbackClient.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/client/streamableHttpWithSseFallbackClient.ts -------------------------------------------------------------------------------- /src/examples/server/README-simpleTaskInteractive.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/README-simpleTaskInteractive.md -------------------------------------------------------------------------------- /src/examples/server/demoInMemoryOAuthProvider.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/demoInMemoryOAuthProvider.test.ts -------------------------------------------------------------------------------- /src/examples/server/demoInMemoryOAuthProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/demoInMemoryOAuthProvider.ts -------------------------------------------------------------------------------- /src/examples/server/elicitationFormExample.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/elicitationFormExample.ts -------------------------------------------------------------------------------- /src/examples/server/elicitationUrlExample.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/elicitationUrlExample.ts -------------------------------------------------------------------------------- /src/examples/server/jsonResponseStreamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/jsonResponseStreamableHttp.ts -------------------------------------------------------------------------------- /src/examples/server/mcpServerOutputSchema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/mcpServerOutputSchema.ts -------------------------------------------------------------------------------- /src/examples/server/simpleSseServer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/simpleSseServer.ts -------------------------------------------------------------------------------- /src/examples/server/simpleStatelessStreamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/simpleStatelessStreamableHttp.ts -------------------------------------------------------------------------------- /src/examples/server/simpleStreamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/simpleStreamableHttp.ts -------------------------------------------------------------------------------- /src/examples/server/simpleTaskInteractive.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/simpleTaskInteractive.ts -------------------------------------------------------------------------------- /src/examples/server/sseAndStreamableHttpCompatibleServer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/sseAndStreamableHttpCompatibleServer.ts -------------------------------------------------------------------------------- /src/examples/server/ssePollingExample.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/ssePollingExample.ts -------------------------------------------------------------------------------- /src/examples/server/standaloneSseWithGetStreamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/standaloneSseWithGetStreamableHttp.ts -------------------------------------------------------------------------------- /src/examples/server/toolWithSampleServer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/server/toolWithSampleServer.ts -------------------------------------------------------------------------------- /src/examples/shared/inMemoryEventStore.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/examples/shared/inMemoryEventStore.ts -------------------------------------------------------------------------------- /src/experimental/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/index.ts -------------------------------------------------------------------------------- /src/experimental/tasks/client.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/client.ts -------------------------------------------------------------------------------- /src/experimental/tasks/helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/helpers.ts -------------------------------------------------------------------------------- /src/experimental/tasks/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/index.ts -------------------------------------------------------------------------------- /src/experimental/tasks/interfaces.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/interfaces.ts -------------------------------------------------------------------------------- /src/experimental/tasks/mcp-server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/mcp-server.ts -------------------------------------------------------------------------------- /src/experimental/tasks/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/server.ts -------------------------------------------------------------------------------- /src/experimental/tasks/stores/in-memory.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/stores/in-memory.test.ts -------------------------------------------------------------------------------- /src/experimental/tasks/stores/in-memory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/stores/in-memory.ts -------------------------------------------------------------------------------- /src/experimental/tasks/task-listing.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/task-listing.test.ts -------------------------------------------------------------------------------- /src/experimental/tasks/task.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/task.test.ts -------------------------------------------------------------------------------- /src/experimental/tasks/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/experimental/tasks/types.ts -------------------------------------------------------------------------------- /src/inMemory.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/inMemory.test.ts -------------------------------------------------------------------------------- /src/inMemory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/inMemory.ts -------------------------------------------------------------------------------- /src/integration-tests/processCleanup.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/integration-tests/processCleanup.test.ts -------------------------------------------------------------------------------- /src/integration-tests/stateManagementStreamableHttp.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/integration-tests/stateManagementStreamableHttp.test.ts -------------------------------------------------------------------------------- /src/integration-tests/taskLifecycle.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/integration-tests/taskLifecycle.test.ts -------------------------------------------------------------------------------- /src/integration-tests/taskResumability.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/integration-tests/taskResumability.test.ts -------------------------------------------------------------------------------- /src/server/auth/clients.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/clients.ts -------------------------------------------------------------------------------- /src/server/auth/errors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/errors.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/authorize.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/authorize.test.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/authorize.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/authorize.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/metadata.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/metadata.test.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/metadata.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/metadata.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/register.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/register.test.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/register.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/register.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/revoke.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/revoke.test.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/revoke.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/revoke.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/token.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/token.test.ts -------------------------------------------------------------------------------- /src/server/auth/handlers/token.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/handlers/token.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/allowedMethods.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/allowedMethods.test.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/allowedMethods.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/allowedMethods.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/bearerAuth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/bearerAuth.test.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/bearerAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/bearerAuth.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/clientAuth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/clientAuth.test.ts -------------------------------------------------------------------------------- /src/server/auth/middleware/clientAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/middleware/clientAuth.ts -------------------------------------------------------------------------------- /src/server/auth/provider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/provider.ts -------------------------------------------------------------------------------- /src/server/auth/providers/proxyProvider.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/providers/proxyProvider.test.ts -------------------------------------------------------------------------------- /src/server/auth/providers/proxyProvider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/providers/proxyProvider.ts -------------------------------------------------------------------------------- /src/server/auth/router.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/router.test.ts -------------------------------------------------------------------------------- /src/server/auth/router.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/router.ts -------------------------------------------------------------------------------- /src/server/auth/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/auth/types.ts -------------------------------------------------------------------------------- /src/server/completable.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/completable.test.ts -------------------------------------------------------------------------------- /src/server/completable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/completable.ts -------------------------------------------------------------------------------- /src/server/elicitation.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/elicitation.test.ts -------------------------------------------------------------------------------- /src/server/express.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/express.ts -------------------------------------------------------------------------------- /src/server/index.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/index.test.ts -------------------------------------------------------------------------------- /src/server/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/index.ts -------------------------------------------------------------------------------- /src/server/mcp.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/mcp.test.ts -------------------------------------------------------------------------------- /src/server/mcp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/mcp.ts -------------------------------------------------------------------------------- /src/server/middleware/hostHeaderValidation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/middleware/hostHeaderValidation.ts -------------------------------------------------------------------------------- /src/server/sse.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/sse.test.ts -------------------------------------------------------------------------------- /src/server/sse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/sse.ts -------------------------------------------------------------------------------- /src/server/stdio.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/stdio.test.ts -------------------------------------------------------------------------------- /src/server/stdio.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/stdio.ts -------------------------------------------------------------------------------- /src/server/streamableHttp.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/streamableHttp.test.ts -------------------------------------------------------------------------------- /src/server/streamableHttp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/streamableHttp.ts -------------------------------------------------------------------------------- /src/server/title.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/title.test.ts -------------------------------------------------------------------------------- /src/server/zod-compat.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/zod-compat.ts -------------------------------------------------------------------------------- /src/server/zod-json-schema-compat.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/server/zod-json-schema-compat.ts -------------------------------------------------------------------------------- /src/shared/auth-utils.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/auth-utils.test.ts -------------------------------------------------------------------------------- /src/shared/auth-utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/auth-utils.ts -------------------------------------------------------------------------------- /src/shared/auth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/auth.test.ts -------------------------------------------------------------------------------- /src/shared/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/auth.ts -------------------------------------------------------------------------------- /src/shared/metadataUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/metadataUtils.ts -------------------------------------------------------------------------------- /src/shared/protocol-transport-handling.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/protocol-transport-handling.test.ts -------------------------------------------------------------------------------- /src/shared/protocol.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/protocol.test.ts -------------------------------------------------------------------------------- /src/shared/protocol.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/protocol.ts -------------------------------------------------------------------------------- /src/shared/responseMessage.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/responseMessage.ts -------------------------------------------------------------------------------- /src/shared/stdio.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/stdio.test.ts -------------------------------------------------------------------------------- /src/shared/stdio.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/stdio.ts -------------------------------------------------------------------------------- /src/shared/toolNameValidation.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/toolNameValidation.test.ts -------------------------------------------------------------------------------- /src/shared/toolNameValidation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/toolNameValidation.ts -------------------------------------------------------------------------------- /src/shared/transport.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/transport.ts -------------------------------------------------------------------------------- /src/shared/uriTemplate.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/uriTemplate.test.ts -------------------------------------------------------------------------------- /src/shared/uriTemplate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/shared/uriTemplate.ts -------------------------------------------------------------------------------- /src/spec.types.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/spec.types.test.ts -------------------------------------------------------------------------------- /src/spec.types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/spec.types.ts -------------------------------------------------------------------------------- /src/types.capabilities.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/types.capabilities.test.ts -------------------------------------------------------------------------------- /src/types.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/types.test.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/validation/ajv-provider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/validation/ajv-provider.ts -------------------------------------------------------------------------------- /src/validation/cfworker-provider.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/validation/cfworker-provider.ts -------------------------------------------------------------------------------- /src/validation/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/validation/index.ts -------------------------------------------------------------------------------- /src/validation/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/validation/types.ts -------------------------------------------------------------------------------- /src/validation/validation.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/src/validation/validation.test.ts -------------------------------------------------------------------------------- /tsconfig.cjs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/tsconfig.cjs.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tsconfig.prod.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/tsconfig.prod.json -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/vitest.config.ts -------------------------------------------------------------------------------- /vitest.setup.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/HEAD/vitest.setup.ts --------------------------------------------------------------------------------