Self-hosted persistent sequential thinking with private history and MCP App visualization.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Persistent sequential thinking for MCP clients, on Cloudflare Workers.
The canonical Sequential Thinking server keeps thoughts in process memory and forgets them when the process exits. This one gives them somewhere durable to live β the same reasoning model (adjustable totals, continuation, revision, branching), just persisted instead of discarded. Every step is written to a SQLite-backed Cloudflare Durable Object, addressable later by an unguessable id, and β for clients that support MCP Apps β rendered as a card of its own.
It's a single-user deployment: one GitHub account allowed through the sign-in gate, one bearer token for header-capable clients, one private store, and a deploy-button template for standing up your own copy.
A normal sequentialthinking call stays readable in any client:
The structured result stays deliberately small β the thought itself isn't repeated in it:
MCP Apps-capable hosts get the same thought delivered separately, to a UI resource: ui://sequential-thinking/process.html. Hosts render one card per tool call, so the App leans into that instead of fighting it β each card shows only its own thought, no polling, no state shared with other cards, and the chat transcript itself becomes the timeline. When the sequence finishes (nextThoughtNeeded: false), that last card loads the full stored history and renders the entire process at once: every thought in order, branches and revisions marked, earlier steps collapsed and expandable.
The App is one self-contained HTML document β no external scripts, fonts, or network calls. It reaches history only through the host's authenticated MCP connection. Clients without MCP Apps support just get the plain text result.
Thoughts aren't retransmitted on every write, either β only the current one. The model reloads earlier ones on purpose, with get_thought_history.
There's no tool to list sequences, and none is coming. The sequenceId handed back from the first call is the only way in β long enough to be unguessable, and the sole credential its history checks. Hold the id, read the sequence; don't have it, and it doesn't exist for you.
That's what lets one deployment serve many clients and sessions at once without any of them seeing each other's reasoning: authentication gets you in the door, the sequence id gets you into a room.
sequentialthinkingPersists one reasoning step. Omit sequenceId on the first call; carry the returned id through every continuation.
Branch by pairing branchId with branchFromThought (forking from the main path) or adding branchFromBranchId (forking from inside another branch), then keep passing that branchId on later steps. Revise with isRevision: true and revisesThought.
Thought numbers are scoped to the branch writing them, so two branches can each have their own thought 3 β a reference resolves against the branch being written, then its ancestors back to each fork point, nearest scope wins.
Two edge cases are accepted and flagged in the result rather than treated as errors: continuing a sequence after a thought said nextThoughtNeeded: false just reopens it, and reusing a thought number on the same branch resolves later references to its newest occurrence.
get_thought_historyReturns full-text history, oldest-first and paginated β pass nextCursor back as cursor to continue (cursor values are opaque; don't compute them). Pass branchId to restrict the page to one branch; sequence.branches lists every branch with its parent and fork point.
delete_thought_sequencePermanently deletes a sequence and its stored text. Requires confirm: true.
The MCP transport is stateless β no Mcp-Session-Id is used as a database key or continuity mechanism. All application state lives in the Durable Object instead, keyed by the sequenceId passed explicitly in tool arguments.
Only text submitted through the public thought argument is ever stored; the server has no access to a model's private or hidden reasoning.
Deployment requires three secrets: MCP_API_TOKEN (the static bearer β generate at least 32 random bytes), plus GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET from the OAuth app described under GitHub sign-in below.
You'll also need your own OAuth KV namespace β npx wrangler kv namespace create OAUTH_KV, then put its id in wrangler.jsonc (namespace ids aren't secrets).
You'll get three endpoints:
Browser-based clients authenticate by signing in to GitHub; access is granted only to allowlisted accounts.
https://<worker-host>, callback URL https://<worker-host>/callback.npx wrangler secret put GITHUB_CLIENT_ID, then GITHUB_CLIENT_SECRET.npx wrangler secret put ALLOWED_GITHUB_LOGIN β one or more comma-separated GitHub logins, matched case-insensitively. Empty or missing fails closed: nobody can complete authorization. It's a secret rather than a wrangler.jsonc var so continuous deploys never overwrite it.The sign-in flow reads only your GitHub identity, checks it against the allowlist, and discards the GitHub token. Authorization is keyed to the immutable account id, not the renameable login.
GitHub Actions runs npm run verify on every pull request and every push to main; a verified push to main deploys the Worker with Wrangler. Deploys never overlap, and the deploy job skips gracefully when its credentials are absent β as in a fork.
Set these under Settings β Secrets and variables β Actions:
CLOUDFLARE_API_TOKEN β Workers Scripts: Edit permission;CLOUDFLARE_ACCOUNT_ID β the account that owns the Worker.These authorize deployment and are separate from the runtime secrets above.
GitHub Releases publish Durable Thinking metadata to the official MCP Registry through .github/workflows/publish-mcp.yml. The job uses GitHub OIDC, so it needs id-token: write but no long-lived Registry credential. server.json advertises a required worker_host variable and the complete https://{worker_host}/mcp-compat URL, reflecting the project's deploy-your-own model rather than directing strangers to one private deployment.
This repository is deliberately not published to npm. Its package.json describes a Cloudflare application and has no bin or local stdio transport; an npm artifact would not give clients an installable MCP server. If a supported local runtime is added later, npm Trusted Publishing can be introduced then, with a real executable, package ownership metadata, and provenance.
Smithery URL publication is also separate from the release workflow. Smithery expects one concrete upstream URL, while each Durable Thinking owner deploys a private Worker with a GitHub allowlist. Add Smithery only if the service gains a multi-user hosted access model or Smithery supports the deploy-your-own URL template directly.
Requirements: Node.js 22+, a Cloudflare account with Workers and Durable Objects enabled, Wrangler authenticated.
Copy the result into an uncommitted .dev.vars (see .dev.vars.example for the GitHub fields):
When ready to ship:
wrangler.jsonc declares the Durable Object and KV bindings. Optional Worker variables, set via Cloudflare or a local .dev.vars:
| Variable | Default | Purpose |
|---|---|---|
THOUGHT_RETENTION_DAYS | 0 | 0 retains sequences until explicit deletion; a positive value enables sliding expiration. |
ALLOWED_HOSTNAMES | automatic | Optional comma-separated host allowlist, for custom domains. |
ALLOWED_ORIGIN_HOSTNAMES | supported web clients and same-host | Optional comma-separated browser-Origin hostname allowlist; setting it replaces the default Claude and ChatGPT web origins. |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/durable-thinking)<a href="https://allmcps.com/mcp/durable-thinking"><img src="https://allmcps.com/api/badge/durable-thinking?style=directory" alt="Durable Thinking on AllMCPs" /></a>