Skip to main content
Glama

Sequential Thinking MCP Server

by LangGPT

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 step
  • nextThoughtNeeded (boolean): Whether another thought step is needed
  • thoughtNumber (integer): Current thought number
  • totalThoughts (integer): Estimated total thoughts needed
  • isRevision (boolean, optional): Whether this revises previous thinking
  • revisesThought (integer, optional): Which thought is being reconsidered
  • branchFromThought (integer, optional): Branching point thought number
  • branchId (string, optional): Branch identifier
  • needsMoreThoughts (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

Add this to your claude_desktop_config.json:

{ "mcpServers": { "sequential-thinking": { "command": "npx", "args": ["-y", "@langgpt/sequential-thinking-mcp"] } } }

Installation via Docker

{ "mcpServers": { "sequential-thinking": { "command": "docker", "args": [ "run", "--rm", "-i", "langgpt/sequential-thinking-mcp" ] } } }

After adding the configuration, restart Claude Desktop and try asking:

Please use the sequential thinking tool to analyze this complex problem step by step.

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:

{ "mcp": { "servers": { "sequential-thinking": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-sequential-thinking" ] } } } }

For Docker installation:

{ "mcp": { "servers": { "sequential-thinking": { "command": "docker", "args": [ "run", "--rm", "-i", "mcp/sequentialthinking" ] } } } }

Building

Docker:

docker build -t mcp/sequentialthinking -f src/sequentialthinking/Dockerfile .

Local Development and Configuration

Prerequisites

  • Node.js (version 18 or higher)
  • npm (usually installed with Node.js)

Local Build Steps

  1. Install dependencies
    npm install
  2. Build project
    npm run build
    This compiles TypeScript code to the dist/ directory.
  3. Development mode
    npm run watch
    This 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:

  1. Ensure project is built
    npm run build
  2. Locate Claude Desktop config file
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. 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!
  4. Restart Claude DesktopAfter saving the config file, restart the Claude Desktop application.
  5. Test the toolTest 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

  1. Update package.jsonModify 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" ] }
  2. Ensure all files are ready
    npm install npm run build

Publishing to NPM

  1. Login to NPM
    npm login
  2. Publish the package
    npm publish --access public
  3. Version management
    # Update version and republish npm version patch # 1.0.0 -> 1.0.1 npm publish

Publishing to Docker Hub

  1. Build Docker image
    docker build -t langgpt/sequential-thinking-mcp .
  2. Test the image
    docker run --rm -i langgpt/sequential-thinking-mcp
  3. Push 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

  1. Initialize repository
    git init git add . git commit -m "Initial commit: Sequential thinking MCP server"
  2. Push to GitHub
    git remote add origin https://github.com/langgpt/sequential-thinking-mcp.git git push -u origin main
  3. Create 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
{ "mcpServers": { "sequential-thinking": { "command": "npx", "args": ["-y", "@langgpt/sequential-thinking-mcp"] } } }
Docker Installation
{ "mcpServers": { "sequential-thinking": { "command": "docker", "args": [ "run", "--rm", "-i", "langgpt/sequential-thinking-mcp" ] } } }
GitHub Installation
{ "mcpServers": { "sequential-thinking": { "command": "npx", "args": [ "-y", "https://github.com/langgpt/sequential-thinking-mcp#main" ] } } }

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.

-
security - not tested
F
license - not found
-
quality - not tested

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.

  1. Features
    1. Tool
      1. sequential_thinking
    2. Usage
      1. Quick Start
        1. Installation via NPM (Recommended)
        2. Installation via Docker
        3. Usage with VS Code
      2. Building
        1. Local Development and Configuration
          1. Prerequisites
          2. Local Build Steps
          3. Local Source Configuration for Claude Desktop
          4. Tool Features
          5. Environment Variables
        2. Publishing
          1. Prerequisites
          2. Prepare for Publishing
          3. Publishing to NPM
          4. Publishing to Docker Hub
          5. Publishing to GitHub
          6. Usage After Publishing
        3. License

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A 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 -
            1
            11
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            An 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 -
            224
            Python
            MIT License
            • Apple
            • Linux
          • -
            security
            A
            license
            -
            quality
            An 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 -
            121
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A minimal MCP Server that provides Claude AI models with the 'think' tool capability, enabling better performance on complex reasoning tasks by allowing the model to pause during response generation for additional thinking steps.
            Last updated -
            753
            19
            TypeScript
            MIT License
            • Apple

          View all related MCP servers

          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/LangGPT/sequential-thinking-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server