Sequential Thinking MCP Server is an implementation in the Model Context Protocol reference server collection, providing a tool named sequentialthinking for dynamic, reflective problem solving through a structured thinking process. It is published as the npm package @modelcontextprotocol/server-sequential-thinking.
Purpose and main capabilities The tool is aimed at tasks requiring step-by-step reasoning, and its main capabilities include: breaking complex problems down into manageable steps; revising and refining thoughts as understanding deepens; branching into alternative reasoning paths; dynamically adjusting the total number of thoughts; and generating and verifying solution hypotheses. It is suitable for complex problem decomposition, planning and design that leaves room for revision, analysis that may require a change of direction, problems whose initial scope is unclear, tasks that need to maintain context across multiple steps, and scenarios that require filtering out irrelevant information.
Tool parameters The tool accepts the following parameters: thought (string, the current thinking step), nextThoughtNeeded (boolean, whether the next thinking step is needed), thoughtNumber (integer, the current thought number), totalThoughts (integer, the estimated total number of thoughts needed); optional parameters include isRevision (whether to revise a previous thought), revisesThought (which thought is being reconsidered), branchFromThought (the thought number of the branch point), branchId (branch identifier), needsMoreThoughts (whether more thoughts are needed).
Usage In practice, sequentialthinking is usually not called manually and directly; instead, the server is connected to an MCP-capable host, and the model is asked to think through the problem step by step, and the host may decide to call the tool one or more times during the process. The server serves both protocol eras on stdio: 2026-07-28 clients (server/discover, no handshake) and 2025-era clients (initialize). Thinking history is retained for the duration of the client connection.
Installation and configuration Running via npx or from source requires Node.js 24 or higher. For Claude Desktop, configuration can be added in claude_desktop_config.json; on Windows, use cmd /c Start npx. Set the environment variable DISABLE_THOUGHT_LOGGING to true to disable thought information logging. VS Code supports a quick install button, and can also be configured manually via user-level MCP configuration or the workspace .vscode/mcp.json, supporting both NPX and Docker installation. Codex CLI also has a corresponding way to run it.
Logging and memory limits Each thought is logged to stderr in a box form, one per line, with the box at most 100 characters wide; overly long lines are wrapped, and at most 1000 lines of text (including headers and thoughts) are drawn; beyond that, a single line states how many lines were omitted. Newlines in branch IDs are displayed as \r or \n in headers, and overly long headers are truncated with a note of how many characters were omitted. Only the log is shortened; the full thoughts are retained in the server history, and tool results are unchanged. To limit memory, the server retains at most MAX_THOUGHT_HISTORY thoughts per connection (a positive integer, default 1000); when the limit is exceeded, the oldest thoughts and their branches are discarded, thoughtHistoryLength in the results stops at the limit, and branches whose thoughts have all been discarded are no longer listed in branches.
Streamable HTTP mode The server communicates via stdio by default; when using --transport streamable-http it runs as a standalone HTTP service, providing a single MCP endpoint /mcp, serving any number of clients of either protocol era. It listens on 127.0.0.1:3001 by default, which can be changed with HOST and PORT; HOST=0.0.0.0 exposes it to all reachable machines, so set it with caution. Requests from non-localhost browser pages return 403, and the endpoint does not send CORS headers, so it serves non-browser-page clients. In HTTP mode each request is handled by a new server instance, 2025-era clients have no session (GET and DELETE on /mcp return 405), and the server cannot send requests or notifications between their requests. Therefore, thought history and branches that belong to a single connection under stdio belong to the server process under HTTP and are shared by all clients; when history isolation is needed, run one process per client.
Verification After installation, restart or reload the host to reconnect to the server, and confirm that the sequentialthinking tool appears in the host's MCP tool list or inspector, ask the host to solve a non-trivial problem in a step-by-step manner, and verify that the host calls the tool multiple times rather than answering all at once. If the host or inspector shows tool activity, you should see repeated calls to sequentialthinking with fields such as nextThoughtNeeded; when the reasoning changes direction, revision or branch fields such as isRevision, revisesThought, branchFromThought, or branchId may also appear.
License This MCP server is licensed under the MIT License and may be freely used, modified, and distributed, subject to the terms of the MIT License.