sequential-thinking-mcp

Crates.iosequential-thinking-mcp
lib.rssequential-thinking-mcp
version0.0.1
created_at2026-01-23 03:29:02.651115+00
updated_at2026-01-23 03:29:02.651115+00
descriptionA Model Context Protocol (MCP) server for sequential thinking and problem-solving
homepage
repositoryhttps://gitee.com/awol2010ex/server-sequential-thinking-mcp-rust
max_upload_size
id2063330
size85,426
(awol2005ex)

documentation

README

Sequential Thinking MCP Server

A Model Context Protocol (MCP) server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.

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
  • Session management for organizing thinking processes
  • Comprehensive logging with configurable levels

Installation

Using Cargo

cargo install sequential-thinking-mcp

From Source

git clone https://gitee.com/awol2010ex/server-sequential-thinking-mcp-rust.git
cd server-sequential-thinking-mcp-rust
cargo build --release

Configuration

Trae IDE (Recommended)

Add this configuration to your Trae IDE MCP settings:

Method 1: User Configuration

  1. Open Trae IDE
  2. Go to Settings → MCP
  3. Add the following server configuration:
{
  "sequential-thinking": {
    "command": "cargo",
    "args": ["run", "--release", "--bin", "sequential-thinking-mcp"],
    "cwd": "E:/workspace_rust/server-sequential-thinking-mcp-rust"
  }
}

Method 2: Workspace Configuration

Create .trae/mcp.json in your workspace root:

{
  "servers": {
    "sequential-thinking": {
      "command": "cargo",
      "args": ["run", "--release", "--bin", "sequential-thinking-mcp"],
      "cwd": "E:/workspace_rust/server-sequential-thinking-mcp-rust"
    }
  }
}

Method 3: Direct Binary Usage

If you've built the release binary:

{
  "sequential-thinking": {
    "command": "E:/workspace_rust/server-sequential-thinking-mcp-rust/target/release/sequential-thinking-mcp"
  }
}

VS Code

Add this to your user or workspace mcp.json:

{
  "servers": {
    "sequential-thinking": {
      "command": "cargo",
      "args": ["run", "--release", "--bin", "sequential-thinking-mcp"]
    }
  }
}

Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "sequential-thinking": {
      "command": "cargo",
      "args": ["run", "--release", "--bin", "sequential-thinking-mcp"]
    }
  }
}

Docker

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

Environment Variables

  • DISABLE_THOUGHT_LOGGING: Set to true to disable logging of thought information
  • RUST_LOG: Configure logging level (e.g., RUST_LOG=sequential_thinking_mcp=info,debug)

Quick Start

1. Create a Thinking Session

{
  "method": "tools/call",
  "params": {
    "name": "create_session",
    "arguments": {
      "title": "Solving Complex Algorithm Problem"
    }
  }
}

2. Start Sequential Thinking

{
  "method": "tools/call", 
  "params": {
    "name": "sequential_thinking",
    "arguments": {
      "thought": "First, I need to understand the problem requirements and constraints",
      "thoughtNumber": 1,
      "totalThoughts": 5,
      "nextThoughtNeeded": true
    }
  }
}

3. Set Solution Hypothesis

{
  "method": "tools/call",
  "params": {
    "name": "set_solution_hypothesis",
    "arguments": {
      "hypothesis": "By breaking down the problem into smaller subproblems and using dynamic programming, we can achieve optimal solution"
    }
  }
}

4. Verify Hypothesis

{
  "method": "tools/call",
  "params": {
    "name": "verify_hypothesis",
    "arguments": {
      "verification": "The hypothesis is valid as dynamic programming can handle overlapping subproblems efficiently"
    }
  }
}

Available Tools

sequential_thinking

Facilitates a detailed, step-by-step thinking process for problem-solving and analysis.

Parameters:

  • 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
  • sessionId (string, optional): Session ID

create_session

Create a new thinking session.

Parameters:

  • title (string, optional): Session title

get_session_info

Get information about a thinking session.

Parameters:

  • sessionId (string, optional): Session ID

get_thoughts

Get all thoughts from a session.

Parameters:

  • sessionId (string, optional): Session ID

set_solution_hypothesis

Set a solution hypothesis for the thinking process.

Parameters:

  • hypothesis (string): The solution hypothesis
  • sessionId (string, optional): Session ID

verify_hypothesis

Verify a solution hypothesis.

Parameters:

  • verification (string): The verification result
  • sessionId (string, optional): Session ID

complete_session

Complete a thinking session.

Parameters:

  • sessionId (string, optional): Session ID

list_sessions

List all thinking sessions.

Parameters:

  • None

Development

Building from Source

# Clone the repository
git clone <repository-url>
cd server-sequential-thinking-mcp-rust

# Build the project
cargo build --release

# Run tests
cargo test

# Run the server
cargo run --release --bin sequential-thinking-mcp

Project Structure

src/
├── core.rs          # Core business logic (sessions, thoughts)
├── handlers.rs      # MCP request handlers
├── lib.rs           # Library exports
└── main.rs          # Application entry point

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Authors

  • Sequential Thinking MCP
  • awol2005ex
Commit count: 0

cargo fmt