$git clone https://github.com/spences10/mcp-sequentialthinking-toolsA lightweight MCP server for recording sequential reasoning steps. It is a scratchpad with history, branching, revision metadata, and optional validation for model-authored tool plans.
| 1 | # mcp-sequentialthinking-tools |
| 2 | |
| 3 | [](https://viteplus.dev) |
| 4 | [](https://vitest.dev) |
| 5 | |
| 6 | A lightweight MCP server for recording sequential reasoning steps. It |
| 7 | is a scratchpad with history, branching, revision metadata, and |
| 8 | optional validation for model-authored tool plans. |
| 9 | |
| 10 | It does **not** discover your other MCP tools and it does **not** |
| 11 | choose tools for the model. If you pass `available_tools` and |
| 12 | `recommended_tools`, the server validates that the recommended names |
| 13 | exist and stores the step. |
| 14 | |
| 15 | <a href="https://glama.ai/mcp/servers/zl990kfusy"> |
| 16 | <img width="380" height="200" src="https://glama.ai/mcp/servers/zl990kfusy/badge" /> |
| 17 | </a> |
| 18 | |
| 19 | ## Why use it? |
| 20 | |
| 21 | Use this when a task benefits from explicit, inspectable reasoning: |
| 22 | |
| 23 | - breaking a messy problem into steps; |
| 24 | - revising or branching a plan; |
| 25 | - keeping a small reasoning history by session; |
| 26 | - validating tool-plan names against a supplied tool list; |
| 27 | - clearing or inspecting reasoning history during a long agent run. |
| 28 | |
| 29 | Do not use it for trivial requests. It adds overhead. |
| 30 | |
| 31 | ## Tools |
| 32 | |
| 33 | ### `sequentialthinking_tools` |
| 34 | |
| 35 | Records one thought. |
| 36 | |
| 37 | Required parameters: |
| 38 | |
| 39 | - `thought` — current reasoning step |
| 40 | - `thought_number` — current step number |
| 41 | - `total_thoughts` — current estimate; automatically raised if lower |
| 42 | than `thought_number` |
| 43 | - `next_thought_needed` — whether another thought is needed |
| 44 | |
| 45 | Optional parameters: |
| 46 | |
| 47 | - `session_id` — history bucket; defaults to `default` |
| 48 | - `is_revision`, `revises_thought` |
| 49 | - `branch_from_thought`, `branch_id` |
| 50 | - `needs_more_thoughts` |
| 51 | - `available_tools` — array of tool names or `{ name, description }` |
| 52 | objects |
| 53 | - `recommended_tools` — model-authored recommendations to |
| 54 | validate/store |
| 55 | - `remaining_steps` — short list of upcoming steps |
| 56 | |
| 57 | Example: |
| 58 | |
| 59 | ```json |
| 60 | { |
| 61 | "session_id": "svelte-debug", |
| 62 | "thought": "First inspect the route files, then run the failing check.", |
| 63 | "thought_number": 1, |
| 64 | "total_thoughts": 3, |
| 65 | "next_thought_needed": true, |
| 66 | "available_tools": ["read", "bash"], |
| 67 | "recommended_tools": [ |
| 68 | { |
| 69 | "tool_name": "read", |
| 70 | "confidence": 0.9, |
| 71 | "rationale": "Need to inspect the relevant files before editing.", |
| 72 | "priority": 1 |
| 73 | } |
| 74 | ] |
| 75 | } |
| 76 | ``` |
| 77 | |
| 78 | If `recommended_tools` contains a name not present in |
| 79 | `available_tools`, the call returns `isError: true` and does not store |
| 80 | the thought. |
| 81 | |
| 82 | ## Security posture |
| 83 | |
| 84 | The server treats thought text, tool descriptions, rationales, and |
| 85 | remaining-step text as untrusted input. Prompt-injection-like text is |
| 86 | scanned and redacted before it is stored or returned in history. Calls |
| 87 | with redactions include `security_warnings` showing which fields |
| 88 | matched. |
| 89 | |
| 90 | This is defensive filtering, not a guarantee that arbitrary |
| 91 | adversarial text is safe. Do not put secrets in thoughts or tool |
| 92 | descriptions. |
| 93 | |
| 94 | ### `get_thinking_history` |
| 95 | |
| 96 | Returns stored thoughts for a session. |
| 97 | |
| 98 | Parameters: |
| 99 | |
| 100 | - `session_id` — defaults to `default` |
| 101 | - `branch_id` — optional branch filter |
| 102 | - `limit` — max records to return; default `50`, max `500` |
| 103 | |
| 104 | ### `clear_thinking_history` |
| 105 | |
| 106 | Clears one session or every session. |
| 107 | |
| 108 | Parameters: |
| 109 | |
| 110 | - `session_id` — defaults to `default` |
| 111 | - `all_sessions` — clear all history buckets |
| 112 | |
| 113 | ## Prompt |
| 114 | |
| 115 | ### `sequential-thinking-guidance` |
| 116 | |
| 117 | A short prompt that tells the model how to use this server honestly: |
| 118 | as a scratchpad and validator, not as an external reasoning engine. |
| 119 | |
| 120 | ## Configuration |
| 121 | |
| 122 | ### Claude Desktop / compatible MCP clients |
| 123 | |
| 124 | ```json |
| 125 | { |
| 126 | "mcpServers": { |
| 127 | "mcp-sequentialthinking-tools": { |
| 128 | "command": "npx", |
| 129 | "args": ["-y", "mcp-sequentialthinking-tools"], |
| 130 | "env": { |
| 131 | "MAX_HISTORY_SIZE": "1000" |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | ``` |
| 137 | |
| 138 | `MAX_HISTORY_SIZE` is per session and defaults to `1000`. |
| 139 | |
| 140 | The server uses `tmcp` and includes a small stdio transport that |
| 141 | accepts both standard `Content-Length` framed MCP messages and |
| 142 | newline-delimited JSON used by older `tmcp` tooling. |
| 143 | |
| 144 | ## Dev |