Sequential Thinking MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sequential Thinking MCP Serverplan a supply chain for a new smartwatch"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Model Context Protocol (MCP) Servers: Sequential Thinking with bonus Leave Management server.
This project implements two Model Context Protocol (MCP) servers using the FastMCP framework:
Sequential Thinking: A tool for structured problem-solving, ideal for tasks like supply chain management planning.
Leave Manager: An AI tool for HR to manage employee leave tasks, interacting with a mock leave database.
The servers are launched concurrently using a main.py script and can be queried via Claude Desktop, which integrates with the MCP servers for sending API requests using the Model Context Protocol.
Project Structure
directory/
├── main.py # Launches both MCP servers
├── leave_manager.py # Leave Manager MCP server
├── sequential.py # Sequential Thinking MCP serverRelated MCP server: MCP Think Tool Server
Features
Sequential Thinking MCP Server
Purpose: Facilitates structured, step-by-step problem-solving using the Model Context Protocol, ideal for planning complex tasks like supply chain management.
Tool:
sequential_thinkingBreaks down problems into sequential thoughts.
Supports revising thoughts, branching for alternative strategies, and dynamically adjusting the number of steps.
Maintains context via a
sessionId.
Use Case: Plan supply chains, projects, or any task requiring iterative reasoning.
Port: Runs on
http://localhost:8001.
Leave Manager MCP Server
Purpose: Assists HR with employee leave management using the Model Context Protocol.
Tools:
get_leave_balance: Check an employee’s remaining leave days.apply_leave: Apply for leave on specific dates.get_leave_history: View an employee’s leave history.
Resource:
greeting://{name}for personalized greetings.Port: Runs on
http://localhost:8000.
Main Launcher
main.py: Uses
multiprocessingto run both servers concurrently on their respective ports.
Prerequisites
Python: Version 3.8 or higher.
Claude Desktop: For sending MCP queries to the servers.
uv: Package manager for installing dependencies.
Operating System: Tested on Linux (e.g., Ubuntu).
Setup Steps
Follow these steps to set up the project:
Install Claude Desktop:
Download and install Claude Desktop from the official source.
Ensure it’s configured to send API queries (e.g., via a query input field).
Install uv:
pip install uvCreate Project Directory:
uv init my-first-mcp-server cd my-first-mcp-serverAdd MCP CLI:
uv add "mcp[cli]"Add Server Code:
Place the following files in
my-first-mcp-server/:main.py: Launcher for both servers.leave_manager.py: Leave Manager server code.sequential.py: Sequential Thinking server code.
Ensure the code matches the provided implementations (see project repository or documentation).
Run the Servers:
Instead of
uv run mcp install main.py(which may fail due to multiple servers), run:uv run python main.py
Restart Claude Desktop (if needed):
Kill any running Claude Desktop instances via Task Manager (Windows) or
killall(Linux).Restart Claude Desktop to ensure it recognizes the running servers.
Usage
Running the Servers
Start both servers using:
cd ~/my-first-mcp-server
uv run python main.pyThis launches:
Leave Manager on
http://localhost:8000.Sequential Thinking on
http://localhost:8001.
Note: Keep the terminal open to maintain server uptime.
Interacting via Claude Desktop
Use Claude Desktop’s query input field to send JSON queries to the servers via the Model Context Protocol. Below are examples for both servers, with a focus on supply chain management using the Sequential Thinking server.
Sequential Thinking MCP Server
Endpoint:
http://localhost:8001/tool/sequential_thinkingPurpose: Plan a supply chain by breaking it into steps, revising plans, or exploring alternatives using MCP.
Input: Paste JSON queries into Claude Desktop’s query field and submit.
Example: Plan a Supply Chain for a Smartwatch
Define Objective:
{ "thought": "Define objective: Plan a cost-efficient supply chain for a new smartwatch, ensuring global delivery within 5 months.", "nextThoughtNeeded": true, "thoughtNumber": 1, "totalThoughts": 8 }Submit in Claude Desktop (e.g., paste into the query field and click “Send”).
Copy the
sessionId(e.g.,123e4567-...) from the response.
Select Suppliers:
{ "sessionId": "<sessionId>", "thought": "Select suppliers: Source microchips from Supplier X (Taiwan), displays from Supplier Y (South Korea), batteries from Supplier Z (China).", "nextThoughtNeeded": true, "thoughtNumber": 2, "totalThoughts": 8 }Replace
<sessionId>with the ID from Step 1.
Plan Manufacturing:
{ "sessionId": "<sessionId>", "thought": "Plan manufacturing: Assemble smartwatches in Factory A (Vietnam) for low labor costs and supplier proximity.", "nextThoughtNeeded": true, "thoughtNumber": 3, "totalThoughts": 8 }Revise Supplier:
{ "sessionId": "<sessionId>", "thought": "Revised: Switch battery supplier to Supplier W (Japan) for better quality, despite 10% higher cost.", "nextThoughtNeeded": true, "thoughtNumber": 2, "totalThoughts": 8, "isRevision": true, "revisesThought": 2 }Explore Alternative Logistics (Branch):
{ "sessionId": "<sessionId>", "thought": "Alternative: Use air freight for distribution to Europe to ensure 7-day delivery.", "nextThoughtNeeded": true, "thoughtNumber": 4, "totalThoughts": 8, "branchFromThought": 3, "branchId": "air_freight" }Plan Inventory:
{ "sessionId": "<sessionId>", "thought": "Plan inventory: Maintain 20,000 units in regional warehouses (USA, Europe, Asia) with just-in-time delivery.", "nextThoughtNeeded": true, "thoughtNumber": 5, "totalThoughts": 8 }Mitigate Risks:
{ "sessionId": "<sessionId>", "thought": "Mitigate risks: Dual-source microchips and maintain 15% buffer inventory for supply disruptions.", "nextThoughtNeeded": true, "thoughtNumber": 6, "totalThoughts": 10, "needsMoreThoughts": true }Set Timeline:
{ "sessionId": "<sessionId>", "thought": "Set timeline: Supplier contracts by Month 1, manufacturing by Month 3, distribution by Month 4.", "nextThoughtNeeded": false, "thoughtNumber": 7, "totalThoughts": 10 }
Tips:
Session ID: Save the
sessionIdafter the first query for use in subsequent queries.Claude Desktop Format: If required, prepend the JSON with:
POST http://localhost:8001/tool/sequential_thinkingExample:
POST http://localhost:8001/tool/sequential_thinking { "thought": "Define objective: Plan a cost-efficient supply chain for a new smartwatch, ensuring global delivery within 5 months.", "nextThoughtNeeded": true, "thoughtNumber": 1, "totalThoughts": 8 }Customization: Modify
thoughtcontent for other supply chains (e.g., food, pharmaceuticals). Example for food:{ "thought": "Define objective: Plan a cold-chain supply chain for fresh produce, ensuring delivery within 48 hours.", "nextThoughtNeeded": true, "thoughtNumber": 1, "totalThoughts": 8 }
Leave Manager MCP Server
Endpoint:
http://localhost:8000Purpose: Manage employee leaves via a mock database (
employee_leaves.json) using MCP.Example Queries:
Check leave balance:
{ "employee_id": "E001" }Send to
http://localhost:8000/tool/get_leave_balance.Apply for leave:
{ "employee_id": "E001", "leave_dates": ["2025-06-01", "2025-06-02"] }Send to
http://localhost:8000/tool/apply_leave.Get leave history:
{ "employee_id": "E001" }Send to
http://localhost:8000/tool/get_leave_history.
Extending the Project
Persistence for Sequential Thinking: Add JSON or database storage to save supply chain plans, similar to
employee_leaves.json.Claude Desktop Automation: Create a script to manage
sessionIdand streamline query input.Visualization: Generate supply chain flowcharts or timelines from Sequential Thinking data.
Metrics: Enhance
sequential_thinkingto calculate costs or lead times from thoughts.
Available Tools
1 toolsequential_thinkingC
Facilitates a step-by-step thinking process for problem-solving with self-reflection.
Args:
thought: The current thinking step
nextThoughtNeeded: Whether another thought step is needed
thoughtNumber: Current thought number
totalThoughts: Estimated total thoughts needed
sessionId: Unique identifier for the thinking session
isRevision: Whether this revises a previous thought
revisesThought: Which thought number is being revised
branchFromThought: Thought number to branch from
branchId: Identifier for the branch
needsMoreThoughts: If more thoughts are needed beyond totalThoughts
reflectionNeeded: Whether to perform self-reflection on the thought
reflectionStrategy: Type of reflection (e.g., error_analysis)
performanceFeedback: Feedback on thought effectiveness (e.g., correct/incorrect)
Returns:
A summary of the current thinking state or an error message
| Name | Required | Description | Default |
|---|---|---|---|
| thought | Yes | ||
| nextThoughtNeeded | Yes | ||
| thoughtNumber | Yes | ||
| totalThoughts | Yes | ||
| sessionId | No | ||
| isRevision | No | ||
| revisesThought | No | ||
| branchFromThought | No | ||
| branchId | No | ||
| needsMoreThoughts | No | ||
| reflectionNeeded | No | ||
| reflectionStrategy | No | ||
| performanceFeedback | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It mentions return values (summary or error) but does not disclose behaviors like side effects, requirements, or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is verbose due to listing all parameters in docstring style. The first sentence is concise, but the overall length could be reduced while maintaining clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (13 parameters, no output schema, no annotations), the description includes parameter semantics but lacks usage guidance and behavioral context, leaving gaps for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description provides brief explanations for all 13 parameters, adding basic meaning. However, the explanations are shallow (e.g., 'thought: The current thinking step') and do not deeply clarify usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool facilitates step-by-step thinking with self-reflection, which is specific and actionable. However, it does not differentiate from potential sibling tools as none were provided.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. The description implies usage for reasoning but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no risk of ambiguity or confusion between tools.
With a single tool, naming consistency is trivially maintained; the name 'sequential_thinking' is clear and descriptive.
Having only one tool for a complex process like sequential thinking is minimal. While the tool is parameter-rich, it bundles multiple concerns (revision, branching, reflection) into a single action, which could be split into separate tools for better modularity.
The single tool covers a wide range of operations (thought addition, revision, branching, reflection) via its parameters, making it functionally complete for its domain. However, the lack of separate tools for distinct operations could lead to confusion about which parameters to set.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Stateless agentic tools over MCP: concept extraction, long-context, knowledge graph, planning.
Turns vague automation requests into tool stacks, prompts, QA checks, and human boundaries.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Related MCP Servers
- AlicenseAqualityDmaintenanceFacilitates interactive software development planning by managing tasks, tracking progress, and creating detailed implementation plans through the Model Context Protocol.620396MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides Claude with a dedicated space for structured thinking during complex problem-solving tasks, helping improve its reasoning capabilities.14116MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol implementation that enables LLMs to execute complex, multi-step workflows combining tool usage with cognitive reasoning, providing structured, reusable paths through tasks with advanced control flow.92928MIT
- AlicenseAqualityDmaintenanceA structured problem-solving MCP server that breaks down complex tasks into sequential steps, supports iterative refinement and branching, and helps maintain context and explore alternative reasoning paths.11542MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/younis-ali/sequential-thinking-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server