Repository navigation
DX-3022: docs: MCP Tasks and MCP Events (@upstash/mcp-toolkit) under AgentKit and the QStash TS SDK - #901
Merged
Conversation
One page, redis/sdks/agentkit/mcp-tasks, for @upstash/mcp-tasks: durable long-running MCP tools on Redis and QStash/Workflow. It sits next to the other AgentKit packages in both AgentKit groups. The QStash TS SDK sidebar gets a stub at qstash/sdks/ts/mcp-tasks that redirects to it (same pattern as redis/search/command-reference). llms.txt and llms-full.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nt2iNfw9zcDS5T2bBgquUd
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Contributor
|
Docs7 for upstash.com
Commit |
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 7, 2026 12:24
Destroyed
The package is now @upstash/mcp-toolkit. The MCP Tasks page uses the /tasks imports and gains onSettle plus a "push instead of poll" section. New page redis/sdks/agentkit/mcp-events for /events, in both AgentKit groups, with a QStash TS SDK stub that redirects to it. llms regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nt2iNfw9zcDS5T2bBgquUd
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 7, 2026 13:39
Destroyed
…, Deploy Watch example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWZjexwCU7VKGGrJ3oxrKK
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 09:37
Destroyed
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 10:40
Destroyed
- tasks.define/register, required principal and signing keys in every snippet
- events: secretKey shown, every emit names owner or owners, a {} subscription
only hears about its own user, one generic -32015 for failed verification,
stricter callback checks, 489 non-retryable for bad deliveries, redirects dropped
- tasks: QStash work is bound by the function limit; Workflow needs the type
argument, steps and a longer ttlMs; task_status prepends a status line; data at
rest note; a coherent task.finished example, untested with ChatGPT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWZjexwCU7VKGGrJ3oxrKK
CahidArda
force-pushed
the
dx-3022-mcp-tasks-docs
branch
from
October 8, 2026 11:44
8a4912b to
6476cb4
Compare
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 11:46
Destroyed
- the Users section explains what auth (AuthInfo) is and that the MCP route
populates it via handler.fetch(request, { authInfo }) after verifying the token
- principal receives { auth, request } and may be async; request is for
cookie/session apps and is unverified
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWZjexwCU7VKGGrJ3oxrKK
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 12:02
Destroyed
…ped args
- emit needs no recipients; authorize is required and re-checked before each delivery
- principal may return { id, context } for the delivery-time check; the token is
never stored
- personal events require `to`; args is required when the payload lacks an input field
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWZjexwCU7VKGGrJ3oxrKK
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 12:21
Destroyed
…mpotencyKey - Upstash backends import from @upstash/mcp-toolkit/upstash; one npm install - principal returns an id and throws when it can't; no `as string | undefined` - idempotencyKey section removed - Workflow: no type argument (inferred), a complete example task Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5x4btgiRE3FKdpUW527Wu
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 13:08
Destroyed
- events: emit(payload, { eventId? }) only; every input field is a payload
field; authorize gets the event's values at delivery; drop to/personal/
match/explicit args, principal context, task.finished, timeoutMs/defaults
and QStashDelivery retries/headers options.
- tasks: drop onSettle/taskFinishedEvent, toolNames, queuedMessage, per-tool
ttlMs/pollIntervalMs and ttlMs: null.
- principal defined once in lib/auth.ts with the SDK's AuthInfo; the MCP
route types authInfo as AuthInfo.
- New custom backend interfaces, Workflow signatures bound to the URL,
MCP_EVENTS_SECRET_KEY >= 32 bytes, every IP literal refused.
- Minimal snippets, details in Accordions, as in the package README.
Claude-Session: https://claude.ai/code/session_012geGTRLRnPqYtaASmBdhE1
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 14:35
Destroyed
Follows upstash/agentkit#38, where the default task TTL went from 5 minutes to 1 day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bv5rWc6Uy6uqCwwDpMN1HJ
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 15:18
Destroyed
…nput-schema routing - MCP Tasks: 'Check what the arguments point at' section (authorize on tasks.define, task.principal in the handler); migrate_workspace example uses both; options and custom-backend notes - MCP Events: maxSubscriptions (8 per subscriber) and the subscription_limit reason; routing values parsed with the input schema; eventId dedup now via webhook-id; by:<subscriber> key; SubscriptionStore interface Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gtucop3k8CNVLjgvoDTC8n
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 21:17
Destroyed
lib/auth.ts now holds verifyToken (builds AuthInfo, wired with withMcpAuth) next to principal; the MCP route uses mcp-handler's createMcpHandler + withMcpAuth, as upstash-mcp-server does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gtucop3k8CNVLjgvoDTC8n
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 21:29
Destroyed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gtucop3k8CNVLjgvoDTC8n
context7
Bot
temporarily deployed
to
Docs7 Preview: dx-3022-mcp-tasks-docs
October 8, 2026 21:56
Destroyed
CahidArda
marked this pull request as ready for review
October 8, 2026 22:03
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs for
@upstash/mcp-toolkit(upstash/agentkit#38):/tasks(durable long-running MCP tools) and/events(MCP Events with webhook delivery), with the Upstash backends in/upstash.redis/sdks/agentkit/mcp-tasks(new): long-running tools. A tool answers with a task id at once, the work runs on QStash or Upstash Workflow, the record lives in Redis, and the model pollstask_status. Covers a four-file quickstart (principal,tasks.define/tasks.register, the MCP route, the execute route), what the model sees, cancellation, users andprincipal,WorkflowDispatcherand its handler rules, retries and failures, who can see what, what is stored in Redis, options, custom backends, and why plain tools instead of the protocol's Tasks extension.redis/sdks/agentkit/mcp-events(new): MCP Events for your server. A quickstart (principal, the event layer, the server, the MCP route, the delivery route) with typedevents.define(...)andemit, the wire format, matching and the requiredauthorize(at subscribe and before every delivery), users and subscriptions, security checks (callback verification, URL rules, encrypted secrets), host responses, what is stored in Redis, options, and custom backends and receivers.qstash/sdks/ts/mcp-tasks,qstash/sdks/ts/mcp-events) that redirects to the page, the same pattern asredis/search/command-reference.llms.txtandllms-full.txtare regenerated.Updated to the API after upstash/agentkit#60:
tasks.define+tasks.register, a single@upstash/mcp-toolkit/upstashbackend entry point, requiredprincipalandauthorize, noidempotencyKeyand noonSettle/task.finishedbridge.Draft until upstash/agentkit#38 merges and the package is published. The pages link to the demo on agentkit
main. Blog post: upstash/upstash-web#682.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bv5rWc6Uy6uqCwwDpMN1HJ