# Durable Thinking [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/linxule/durable-thinking  
**GitHub Stars:** 2  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/durable-thinking

## Description
Self-hosted persistent sequential thinking with private history and MCP App visualization.

## Tools
Capabilities this server exposes over MCP:

- **sequentialthinking** — Persists one reasoning step. Omit `sequenceId` on the first call; carry the returned id through every continuation.
- **get_thought_history** — Returns 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_sequence** — Permanently deletes a sequence and its stored text. Requires `confirm: true`.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/linxule/durable-thinking), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
npx wrangler kv namespace create OAUTH_KV
```

2. Run:

```sh
npx wrangler secret put GITHUB_CLIENT_ID
```

3. Configure:

```sh
npx wrangler secret put ALLOWED_GITHUB_LOGIN
```

4. Install:

```sh
npm install
```

5. Sign in:

```sh
npm run secrets            # generates a local token
```

6. Start the server:

```sh
npm run dev
```

## Documentation

## What Durable Thinking does

Durable Thinking provides persistent sequential thinking over MCP. Each submitted thought is stored in a SQLite-backed Cloudflare Durable Object, so the sequence remains available after the Worker process exits. The service preserves the sequential-thinking model of adjustable totals, continuation, revision, and branching while moving application state out of process memory.

A new sequence returns an unguessable `sequenceId`. That identifier is required for later access: clients use it to continue writing, retrieve history, or delete the sequence. There is no sequence-listing tool, so possession of the identifier determines which sequence can be addressed.

The deployment is intended for one owner. Access is controlled through either a static bearer token or GitHub sign-in restricted to an allowlist of accounts. Each deployment has one private store.

## How it works

The Worker exposes MCP over `/mcp` and `/mcp-compat`. Requests are handled by a fresh MCP server instance, while sequence data lives in the `personal` Durable Object. The transport is stateless and does not use `Mcp-Session-Id` as a continuity or database key; clients must carry the `sequenceId` in tool arguments instead.

Only text supplied through the public `thought` argument is saved. The service does not receive a model's private or hidden reasoning. Thought history can be read in oldest-first pages. A returned `nextCursor` must be sent unchanged as the next `cursor`, and an optional `branchId` narrows results to one branch.

MCP Apps-capable hosts receive a UI resource at `ui://sequential-thinking/process.html`. Each tool call produces a card for its own thought. When the sequence ends, the final card can display the complete stored process, including revisions and branches. Other clients receive the ordinary text and structured tool results.

## Setup and configuration

Deployments require Node.js 22 or newer, a Cloudflare account with Workers and Durable Objects enabled, and an authenticated Wrangler installation. The repository supports a Cloudflare deploy button and manual deployment with `npm install`, `npm run verify`, and `npm run dev` for local development.

Required Worker secrets are:

- `MCP_API_TOKEN`, used as the static bearer credential.
- `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`, used for GitHub OAuth.
- `ALLOWED_GITHUB_LOGIN`, containing one or more comma-separated GitHub logins.

Create an OAuth KV namespace and place its identifier in `wrangler.jsonc`. GitHub OAuth requires an app homepage pointing to the Worker host and a callback at `/callback`. An empty or missing allowlist rejects authorization. Continuous deployment can use separate Cloudflare API and account credentials in GitHub Actions.

The deployment exposes `/healthz` in addition to the two MCP endpoints. It is a Cloudflare application rather than a local npm executable, so setup is based on deploying a Worker rather than installing a stdio package.

## Tools and capabilities

- `sequentialthinking` stores one thought and returns the sequence identifier, thought number, total, and stored-history length. Omit `sequenceId` for the first call, then reuse the returned value.
- Revisions use `isRevision` and `revisesThought`.
- Branches use `branchId` with `branchFromThought`, or `branchFromBranchId` for a branch within another branch. Thought numbering is scoped to each branch.
- `get_thought_history` returns full-text history with opaque cursor pagination and optional branch filtering. Branch metadata includes parent and fork-point information.
- `delete_thought_sequence` permanently removes a sequence and its stored text, and requires `confirm: true`.

## Limitations and notes

The service is single-user per deployment and has no tool for discovering sequence IDs. Clients must retain the identifier returned at sequence creation. A sequence can be reopened after a step marked `nextThoughtNeeded: false`, and reusing a thought number on one branch resolves later references to the newest occurrence.

The MCP App is available only to hosts that support MCP Apps. It is self-contained, with no external scripts, fonts, or network calls, and accesses history through the host's authenticated MCP connection. The service stores submitted thought text, not hidden model reasoning.

_Full upstream README: https://allmcps.com/mcp/durable-thinking/readme_

