Introduction to Claude Sequential Thinking MCP | How to Use Step-by-Step Reasoning
When dealing with complex problems where hypotheses shift mid-investigation, asking Claude a single question often leads to reduced accuracy. This is where the MCP server "Sequential Thinking" comes in — it provides a framework for breaking problems into steps, revising and branching your thinking along the way, and arriving at well-grounded conclusions. This article covers its role, how to integrate it with Claude Desktop and Claude Code, the arguments of the sequential_thinking tool, how it differs from Extended Thinking, and practical use cases.
Sequential Thinking MCP is one of the reference implementations in the Model Context Protocol server repository published by Anthropic. It gives Claude a tool to "save, revise, and branch step-by-step reasoning." The sequential_thinking tool takes arguments such as thought number, total thought count, and revision flags, allowing Claude to build up its reasoning across multiple turns.
Getting started is easy with npx or Docker. Simply add a mcpServers entry to Claude Desktop's claude_desktop_config.json — no additional API keys or permissions required. Claude Code also connects via the same MCP specification, and you can invoke step-by-step reasoning from the CLI by loading it via --mcp-config.
While Extended Thinking extends the model's internal thinking tokens, Sequential Thinking MCP structures reasoning steps as an external tool. It is well-suited for problems where underlying assumptions may change mid-process — such as database migration planning, hard-to-reproduce bug investigations, and architecture comparisons.
目次 (10)
- What Is Sequential Thinking MCP?
- Why Step-by-Step Reasoning Matters — How It Differs from Single-Turn Answers
- Installation — npx and Docker
- Configuration Example for Claude Desktop
- Using It from Claude Code via CLI
- Understanding the Arguments of the sequential_thinking Tool
- A Practical Example — Diagnosing a Production Incident
- Differences from Extended Thinking — When to Use Which
- Caveats — Remember It Is Not a Silver Bullet
- Summary
What Is Sequential Thinking MCP?
Sequential Thinking MCP is one of the reference implementations published in the official Model Context Protocol (MCP) repository maintained by Anthropic. It is described there as "an MCP server that provides a structured thinking process for dynamic and reflective problem-solving." By connecting to an MCP-compatible host like Claude, it provides a tool called sequential_thinking that allows reasoning to be invoked one step at a time (see: github.com/modelcontextprotocol/servers).
"Step-by-step reasoning" here does not simply mean producing longer outputs. It is a framework for dividing a problem into manageable pieces, revising earlier thoughts as understanding deepens, branching into alternative paths, and dynamically adjusting the number of reasoning steps needed — giving Claude a flexibility that mirrors human problem-solving. Both the generation of a final hypothesis and the thinking required to verify it are handled within the same MCP tool.
In essence, Sequential Thinking MCP is like giving Claude a "notebook for thinking." It shines in iterative tasks such as design decisions, investigations, and troubleshooting, where a single one-shot question would not suffice.
Why Step-by-Step Reasoning Matters — How It Differs from Single-Turn Answers
When you ask Claude something like "What's causing this bug?" directly, it returns a conclusion in one shot based on the information provided. This is sufficient in many situations, but accuracy tends to drop in cases like the following:
- Information is fragmented and hypotheses change during investigation
- Incorrect assumptions are common and answers need to be revised
- Multiple options need to be evaluated in parallel and compared
- Logs and execution results are only available incrementally
Sequential Thinking MCP addresses these scenarios by preserving "intermediate reasoning" as structured JSON, allowing Claude to reference that progress in subsequent thoughts and update its conclusions accordingly. The result is stronger handling of problems where the initial assumption may be overturned midway — such as database migration plans, bugs that only appear in production, and architecture selection.
Installation — npx and Docker
Sequential Thinking MCP is distributed as the npm package @modelcontextprotocol/server-sequential-thinking. If Node.js is installed, you can launch it immediately with npx. An official Docker image is also available for containerized environments.
- Install Node.js 18 or later, or Docker
- Run
npx -y @modelcontextprotocol/server-sequential-thinkingto confirm it starts - Optionally,
docker pullthe Docker versionmcp/sequentialthinking - Open the MCP configuration file for your host (Claude Desktop / Claude Code)
- Register this server under the
mcpServersentry
While npx is fast, it may get stuck downloading in corporate environments with strict network restrictions. In that case, use the Docker version and mirror it to an internal registry for safety.
Configuration Example for Claude Desktop
Claude Desktop reads claude_desktop_config.json from under your home directory. The default path on macOS is ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it is %APPDATA%/Claude/claude_desktop_config.json. Here is an example of registering Sequential Thinking MCP using npx:
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
}
}
}
After saving the configuration and restarting Claude Desktop, sequential_thinking will appear in the MCP tool list in the chat input area. From there, simply make a request like "Please think through this migration plan step by step," and Claude will call the tool in multiple stages as needed.
Using It from Claude Code via CLI
The MCP specification works exactly the same in Claude Code. A convenient setup is to place mcp.json at the project root and load it with --mcp-config when launching Claude Code. If you need to embed step-by-step reasoning in a script running in CI, using the Docker version eliminates path dependencies and keeps things stable.
{
"mcpServers": {
"sequential-thinking": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp/sequentialthinking"
]
}
}
}
A practical approach is to use npx when a human is interacting locally, and Docker when embedding it in automation.
Understanding the Arguments of the sequential_thinking Tool
The official repository README describes the main arguments accepted by the sequential_thinking tool as follows (see: github.com/modelcontextprotocol/servers/sequentialthinking/README):
thought: The body of the reasoning to be expressed in this stepnextThoughtNeeded: Boolean indicating whether more thinking should continuethoughtNumber: The index of the current thoughttotalThoughts: The expected total number of thoughts (can increase or decrease mid-process)isRevision: Whether this is a revision of a previous thoughtrevisesThought: The index of the thought being revisedbranchFromThought/branchId: Which thought to branch from and the branch identifierneedsMoreThoughts: A flag indicating that additional thinking is needed
Using these fields, Claude can take actions like "I planned 3 thoughts, but after the 3rd I reconsidered, so I'll revise the 2nd" or "I'll try branch A and branch B down separate paths." Importantly, totalThoughts is not a fixed value — it can be rewritten during reasoning. Even if you declare 5 steps at the start, you can extend to 7 steps on the fly if needed.
A Practical Example — Diagnosing a Production Incident
For example, if you bring "a timeout issue that only occurs in production" to Claude with Sequential Thinking MCP enabled, the flow might look like this:
- Step 1: Organize the observed symptoms
- Step 2: List the differences between staging and production
- Step 3: Form Hypothesis A (network routing)
- Step 4: Form Hypothesis B (connection pool exhaustion) — branching
- Step 5: Determine what logs to collect and produce a verification procedure
- Step 6: Based on the collected logs, retract Hypothesis A and shift toward Hypothesis B — revision
- Step 7: Present the conclusion and measures to prevent recurrence
In this way, revision happening mid-process is an expected part of the procedure. The core mental model of Sequential Thinking is letting Claude take notes and make judgments along the way, rather than rushing to a conclusion in the first response.
Differences from Extended Thinking — When to Use Which
Anthropic also offers Extended Thinking as a built-in long-reasoning feature in Claude itself. Models like Opus 4.8, Opus 4.7, and Sonnet 4.6 can extend internal reasoning up to 128,000 tokens (limits vary by model) (see: docs.anthropic.com/en/docs/build-with-claude/extended-thinking). This is a feature that increases the volume of thinking inside the model — think of it as thinking deeply within a single API call.
Sequential Thinking MCP, on the other hand, constructs step-by-step reasoning as an external tool. It spans multiple Claude turns, the reasoning steps are observable as JSON, and it lends itself well to host-side logging and UI display. The two are not competing options — the right answer is to use each according to the task.
- A single, deep round of thinking is sufficient → Extended Thinking
- You want to preserve intermediate reasoning and handle branching or revisions → Sequential Thinking MCP
- Users or other tools need to intervene in the reasoning process → Sequential Thinking MCP
The practical solution is to have both set up in Claude Code and Claude Desktop, and call whichever suits the nature of the problem.
Caveats — Remember It Is Not a Silver Bullet
As convenient as it is, keeping Sequential Thinking MCP always on means even simple, single-turn questions will trigger step splitting, making responses verbose. It is better to disable it for straightforward fact-checking or routine tasks, and invoke it explicitly for complex decision-making.
From a security standpoint, this server does not call external APIs, so the risk of leaking sensitive information is low. However, reasoning logs may contain organization-specific context. It is a good idea to review this alongside the host's log retention policies and Claude Desktop's conversation history settings (see: modelcontextprotocol.io).
Summary
Sequential Thinking MCP is a small but powerful tool that gives Claude a "sequence for thinking," and it makes a significant difference on complex problems. It can be set up with npx or Docker and added to mcpServers in Claude Desktop or Claude Code with virtually no additional cost. It is easy to confuse with Extended Thinking, but the depth of internal thinking and the structuring of external steps are separate dimensions of functionality that can be used together depending on the situation. It is worth keeping in mind as one of the first MCPs to add when you want higher accuracy in complex investigations or design decisions.