- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Port SEP-2663 content * Commit package-lock.json * Add TODOs to import new types from SDK * Copy InputRequests/InputResponses types from main repo * Specify error for servers that require tasks * Allow servers to require tasks * Move "existing code" note to separate section * Update 2663-tasks-extension.md Co-authored-by: Caitie McCaffrey <caitiem20@github.com> * Update 2663-tasks-extension.md Co-authored-by: Caitie McCaffrey <caitiem20@github.com> * Task Update Requests * Link to MRTR spec for inputRequests * Add auth check requirement * Rename notifications/tasks/status * Move detailed task types into task status section * Add back explicit polling response requirements * Disallow progress/logging notifications for now * Add spec language for client behavior on inputRequests * Mark Accepted * Mark Final * regenerate schema * Fix check mode in generate-schemas.ts Check mode previously compared the gitignored intermediate schema/draft/generated/schema.ts against fresh output, then wrote a temp file under that same directory to dynamic-import for JSON Schema generation. On fresh checkouts (every CI run, since schema/**/generated/ is gitignored) the directory does not exist, so the temp-file write crashed with ENOENT before reporting any real result. Local runs hid the bug because once a developer runs the generator the directory sticks around. Drop the comparison against the gitignored intermediate (it cannot be stale on CI by definition) and check only the committed schema.json. The Zod schemas file is now written unconditionally so the dynamic import resolves. --------- Co-authored-by: Caitie McCaffrey <caitiem20@github.com> |
||
| .github/workflows | ||
| docs | ||
| schema/draft | ||
| scripts | ||
| seps | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| MAINTAINERS.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| SECURITY.md | ||
| tsconfig.json | ||
MCP Tasks Extension (Experimental)
This repository is under development and is working towards implementing the changes described in SEP-2663. For the latest status and discussion, see the pull request.
⚠️ Experimental Extension — This repository contains an experimental extension to the Model Context Protocol. It is not an official extension and may change significantly or be discontinued. See the Extensions specification for details on the experimental extension process.
Overview
This extension defines the Tasks primitive for the Model Context Protocol (MCP). Tasks are durable state machines that carry information about the underlying execution state of a request, enabling requestor polling and deferred result retrieval. Each task is uniquely identifiable by a receiver-generated task ID.
Tasks are useful for:
- Representing expensive computations and batch processing requests
- Integrating seamlessly with external job/workflow APIs
- Enabling call-now, fetch-later execution patterns
Extension Identifier: io.modelcontextprotocol/tasks
Development
Schema Generation
The JSON Schema is auto-generated from the TypeScript type definitions using ts-to-zod and Zod's toJSONSchema(). Do not hand-edit schema.json or generated/schema.ts.
# Generate Zod schemas and JSON Schema from schema.ts
npm run generate:schemas
# Verify TypeScript compiles and generated files are up to date
npm run check:schema
Governance
This repository follows the Model Context Protocol Governance process. See MAINTAINERS.md for the list of maintainers specific to this repository.
Policies
This repository follows the Model Context Protocol project policies:
License
This project is licensed under the Apache License 2.0. See LICENSE for details.