Sequential Thinking MCP Server - LangGPT Demo
Note: This is a demonstration version by LangGPT, based on the original Sequential Thinking MCP Server from Anthropic's Model Context Protocol. This demo showcases how to extend and publish MCP servers for the Claude ecosystem.
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process. This server enables Claude to break down complex problems into manageable, trackable steps with support for revision and branching.
Features
Break down complex problems into manageable steps
Revise and refine thoughts as understanding deepens
Branch into alternative paths of reasoning
Adjust the total number of thoughts dynamically
Generate and verify solution hypotheses
Tool
sequential_thinking
Facilitates a detailed, step-by-step thinking process for problem-solving and analysis.
Inputs:
thought
(string): The current thinking stepnextThoughtNeeded
(boolean): Whether another thought step is neededthoughtNumber
(integer): Current thought numbertotalThoughts
(integer): Estimated total thoughts neededisRevision
(boolean, optional): Whether this revises previous thinkingrevisesThought
(integer, optional): Which thought is being reconsideredbranchFromThought
(integer, optional): Branching point thought numberbranchId
(string, optional): Branch identifierneedsMoreThoughts
(boolean, optional): If more thoughts are needed
Usage
The Sequential Thinking tool is designed for:
Breaking down complex problems into steps
Planning and design with room for revision
Analysis that might need course correction
Problems where the full scope might not be clear initially
Tasks that need to maintain context over multiple steps
Situations where irrelevant information needs to be filtered out
Quick Start
Installation via NPM (Recommended)
Add this to your claude_desktop_config.json
:
Installation via Docker
After adding the configuration, restart Claude Desktop and try asking:
Usage with VS Code
For quick installation, click one of the installation buttons below...
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open Settings (JSON)
.
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
Note that the
mcp
key is not needed in the.vscode/mcp.json
file.
For NPX installation:
For Docker installation:
Building
Docker:
Local Development and Configuration
Prerequisites
Node.js (version 18 or higher)
npm (usually installed with Node.js)
Local Build Steps
Install dependencies
npm installBuild project
npm run buildThis compiles TypeScript code to the
dist/
directory.Development mode
npm run watchThis starts watch mode for automatic recompilation.
Local Source Configuration for Claude Desktop
If you want to use this MCP server from local source code, follow these steps:
Ensure project is built
npm run buildLocate Claude Desktop config file
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add local configuration
{ "mcpServers": { "sequential-thinking": { "command": "node", "args": ["/your/absolute/path/to/project/dist/index.js"], "env": { "DISABLE_THOUGHT_LOGGING": "false" } } } }Important: Replace
/your/absolute/path/to/project/dist/index.js
with your actual project path!Restart Claude Desktop
After saving the config file, restart the Claude Desktop application.
Test the tool
Test in Claude with something like:
Please use the sequential thinking tool to analyze a complex problem
Tool Features
This sequential thinking tool enables Claude to:
Break down complex problems into manageable steps
Revise and refine thoughts as understanding deepens
Branch into alternative paths of reasoning
Adjust the total number of thoughts dynamically
Generate and verify solution hypotheses
Environment Variables
DISABLE_THOUGHT_LOGGING=true
- Disable console output of thinking process
Publishing
This section provides guidance for developers who want to publish their own version of this MCP server.
Prerequisites
Node.js (version 18 or higher)
npm account for NPM publishing
Docker Hub account for Docker publishing (optional)
GitHub account for source code hosting
Prepare for Publishing
Update package.json
Modify the package configuration for your own project:
{ "name": "@langgpt/sequential-thinking-mcp", "version": "1.0.0", "description": "MCP server for sequential thinking and problem solving", "author": "LangGPT <contact@langgpt.dev>", "homepage": "https://github.com/langgpt/sequential-thinking-mcp", "bugs": "https://github.com/langgpt/sequential-thinking-mcp/issues", "repository": { "type": "git", "url": "git+https://github.com/langgpt/sequential-thinking-mcp.git" }, "keywords": [ "mcp", "model-context-protocol", "claude", "thinking", "ai-tools" ] }Ensure all files are ready
npm install npm run build
Publishing to NPM
Login to NPM
npm loginPublish the package
npm publish --access publicVersion management
# Update version and republish npm version patch # 1.0.0 -> 1.0.1 npm publish
Publishing to Docker Hub
Build Docker image
docker build -t langgpt/sequential-thinking-mcp .Test the image
docker run --rm -i langgpt/sequential-thinking-mcpPush to Docker Hub
docker login docker push langgpt/sequential-thinking-mcp # Also push with version tag docker tag langgpt/sequential-thinking-mcp langgpt/sequential-thinking-mcp:1.0.0 docker push langgpt/sequential-thinking-mcp:1.0.0
Publishing to GitHub
Initialize repository
git init git add . git commit -m "Initial commit: Sequential thinking MCP server"Push to GitHub
git remote add origin https://github.com/langgpt/sequential-thinking-mcp.git git push -u origin mainCreate GitHub Release
Go to your repository on GitHub
Click "Releases" → "Create a new release"
Add tag (e.g., v1.0.0) and release notes
Usage After Publishing
Once published, users can install and use your MCP server in the following ways:
NPM Installation
Docker Installation
GitHub Installation
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Tools
An MCP server that enables Claude to break down complex problems into manageable steps with support for revision and branching, facilitating dynamic and reflective problem-solving through a structured thinking process.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that intelligently chunks large documents for Claude, enabling efficient context-aware processing and summary generation for enhanced document comprehension.
- AsecurityAlicenseAqualityA systematic reasoning MCP server for Claude Desktop, featuring Beam Search and Monte Carlo Tree Search to facilitate complex problem-solving and decision-making processes.Last updated -112MIT License
- AsecurityAlicenseAqualityAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.Last updated -15264MIT License
- -securityAlicense-qualityAn MCP server that implements the 'think' tool, providing Claude with a dedicated space for structured thinking during complex problem-solving tasks to improve reasoning capabilities.Last updated -130MIT License