Skip to content

Commit fa6bad1

Browse files
committed
feat: simplify interfaces and add docs
1 parent 0c239c0 commit fa6bad1

19 files changed

Lines changed: 1217 additions & 302 deletions

.vitepress/config.mts

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,61 @@ export default withMermaid(
1212
outline: [2, 3],
1313

1414
nav: [
15+
{ text: "SDK", link: "/typescript/" },
1516
{ text: "SEPs", link: "/seps/2663-tasks-extension" },
1617
{ text: "Specification", link: "/specification/2026-07-28/tasks" },
1718
],
1819

1920
sidebar: {
20-
"specification/": [
21+
"/typescript/": [
22+
{
23+
text: "Introduction",
24+
items: [
25+
{ text: "Getting started", link: "/typescript/" },
26+
{
27+
text: "Call your first tool",
28+
link: "/typescript/getting-started",
29+
},
30+
{
31+
text: "Migrate from the base SDK",
32+
link: "/typescript/migrating-from-the-sdk",
33+
},
34+
],
35+
},
36+
{
37+
text: "Clients",
38+
items: [
39+
{
40+
text: "Observe and control execution",
41+
link: "/typescript/client/execution",
42+
},
43+
{
44+
text: "Handle input and recover tasks",
45+
link: "/typescript/client/input-and-recovery",
46+
},
47+
{
48+
text: "[2025-11-25] Receive sampling and elicitation requests",
49+
link: "/typescript/receiver",
50+
},
51+
],
52+
},
53+
{
54+
text: "Advanced",
55+
items: [
56+
{
57+
text: "Integrate adapters and schemas",
58+
link: "/typescript/adapters-and-schemas",
59+
},
60+
],
61+
},
62+
{
63+
text: "Help",
64+
items: [
65+
{ text: "Troubleshooting", link: "/typescript/troubleshooting" },
66+
],
67+
},
68+
],
69+
"/specification/": [
2170
{
2271
text: "Specification",
2372
items: [
@@ -29,7 +78,7 @@ export default withMermaid(
2978
],
3079
},
3180
],
32-
"seps/": [
81+
"/seps/": [
3382
{
3483
text: "SEPs",
3584
items: [

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
# MCP Tasks Extension
2-
This repository contains the official [Model Context Protocol](https://modelcontextprotocol.io) Tasks extension (`io.modelcontextprotocol/tasks`), based on [SEP-2663](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2663).
32

4-
## Overview
3+
This repository contains the official [Model Context Protocol](https://modelcontextprotocol.io) Tasks extension (`io.modelcontextprotocol/tasks`), based on [SEP-2663](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2663).
54

6-
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**.
5+
## Why Tasks?
76

8-
Tasks are useful for:
7+
Some MCP requests finish quickly. Others run for minutes, wait for human input, or need to survive a disconnected client. The Tasks extension lets a receiver return a durable task handle so the requester can follow progress and retrieve the result later.
98

10-
- Representing expensive computations and batch processing requests
11-
- Integrating seamlessly with external job/workflow APIs
12-
- Enabling call-now, fetch-later execution patterns
9+
Use Tasks for long computations, approval workflows, external job systems, and call-now/fetch-later APIs.
1310

1411
**Extension Identifier:** `io.modelcontextprotocol/tasks`
1512

13+
## Use it from TypeScript
14+
15+
The `@modelcontextprotocol/ext-tasks` package provides generation-agnostic requester lifecycle APIs and 2025-11-25 Tasks receiver support. Start with the [TypeScript package guide](https://modelcontextprotocol.github.io/ext-tasks/typescript/) or [call your first task-enabled tool](https://modelcontextprotocol.github.io/ext-tasks/typescript/getting-started.html).
16+
1617
## Schemas
1718

18-
| Version | Status | TypeScript | JSON Schema |
19-
| --- | --- | --- | --- |
20-
| `2026-07-28` | Stable | [`schema.ts`](schema/2026-07-28/schema.ts) | [`schema.json`](schema/2026-07-28/schema.json) |
21-
| `draft` | Development | [`schema.ts`](schema/draft/schema.ts) | [`schema.json`](schema/draft/schema.json) |
19+
| Version | Status | TypeScript | JSON Schema |
20+
| ------------ | ----------- | ------------------------------------------ | ---------------------------------------------- |
21+
| `2026-07-28` | Stable | [`schema.ts`](schema/2026-07-28/schema.ts) | [`schema.json`](schema/2026-07-28/schema.json) |
22+
| `draft` | Development | [`schema.ts`](schema/draft/schema.ts) | [`schema.json`](schema/draft/schema.json) |
2223

2324
Released schema directories are immutable snapshots with version-specific JSON Schema identifiers. Development and schema generation target `schema/draft/` only. To create a release snapshot from the current draft:
2425

@@ -30,8 +31,7 @@ npm run snapshot:schema -- YYYY-MM-DD
3031

3132
### SDK Package
3233

33-
The redistributable TypeScript package lives in `packages/ext-tasks`. It is an
34-
npm workspace that publishes as `@modelcontextprotocol/ext-tasks`.
34+
The redistributable package lives in `packages/ext-tasks` and publishes as `@modelcontextprotocol/ext-tasks`.
3535

3636
```bash
3737
# Run schema, package, and packed-consumer checks
@@ -44,8 +44,7 @@ npm run test:watch
4444
npm run pack:package
4545
```
4646

47-
The package intentionally has no root export. Consumers import `/core`,
48-
`/core/v1`, `/core/v2`, or `/client`.
47+
The package intentionally has no root export. Consumers import `/client`, `/receiver`, `/core`, `/core/v1`, or `/core/v2`; the guide explains which entry point owns each workflow.
4948

5049
### Schema Generation
5150

0 commit comments

Comments
 (0)