Skip to main content

Sequential Thinking MCP

Project description

Sequential Thinking MCP

uv Python PyPI Actions status License: MIT Ask DeepWiki

This repository provides an MCP (Model Context Protocol) server that enables an AI agent to perform advanced meta-cognition and dynamic, reflective problem-solving.

This version of Sequential Thinking is quite different than the original one, as it only forces the agent to virtually log its thoughts and plans, without actually doing anything, except prompting itself. I found it to be sufficient enough for any kind of LLMs.

Sequential Thinking MCP

Table of Contents

Features

  • Advanced Meta-Cognition: Provides a think tool for dynamic and reflective problem-solving through thought logging.
  • Agentic Workflow Orchestration: Guides AI agents through complex tasks by breaking them into precise, manageable, and traceable steps.
  • Iterative Refinement: Assesses the success of each step and self-corrects if necessary, adapting to new information or errors.
  • Proactive Planning: Utilizes left_to_be_done for explicit future state management and task estimation.
  • Tool Recommendation: Suggests specific tools via tool_recommendation to execute planned actions or gather necessary information.

Setup

Prerequisites

  • Python 3.10+
  • uv (for local development)

Installation

Choose one of the following installation methods.

Install from PyPI (Recommended)

This method is best for using the package as a library or running the server without modifying the code.

  1. Install the package from PyPI:
pip install sequential-thinking-mcp
  1. Run the MCP server (default: stdio):
python -m sequential_thinking

For Local Development

This method is for contributors who want to modify the source code. Using uv:

  1. Clone the repository:
git clone https://github.com/philogicae/sequential-thinking-mcp.git
cd sequential-thinking-mcp
  1. Install dependencies using uv:
uv sync --locked
  1. Run the MCP server (default: stdio):
uv run -m sequential_thinking

For Docker

  1. Clone the repository (if you haven't already):
git clone https://github.com/philogicae/sequential-thinking-mcp.git
cd sequential-thinking-mcp
  1. Build and run the container using Docker Compose (default port: 8000):
docker compose up --build -d
  1. Access container logs:
docker logs sequential-thinking-mcp -f

Usage

As MCP Server

from sequential_thinking import mcp

mcp.run(transport="sse")

Via MCP Clients

Usable with any MCP-compatible client. Available tools:

  • think: Log a thought, plan next steps, and recommend tools.

Example with Windsurf

Configuration:

{
  "mcpServers": {
    ...
    # with stdio (only requires uv)
    "sequential-thinking-mcp": {
      "command": "uvx",
      "args": [ "sequential-thinking-mcp" ]
    },
    # with docker (only requires docker)
    "sequential-thinking-mcp": {
      "command": "docker",
      "args": [ "run", "-i", "-p", "8000:8000", "philogicae/sequential-thinking-mcp:latest", "sequential-thinking-mcp" ]
    },
    # with sse transport (requires installation)
    "sequential-thinking-mcp": {
      "serverUrl": "http://127.0.0.1:8000/sse"
    },
    # with streamable-http transport (requires installation)
    "sequential-thinking-mcp": {
      "serverUrl": "http://127.0.0.1:8000/mcp" # not yet supported by every client
    },
    ...
  }
}

Changelog

See CHANGELOG.md for a history of changes to this project.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sequential_thinking_mcp-0.10.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sequential_thinking_mcp-0.10.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file sequential_thinking_mcp-0.10.0.tar.gz.

File metadata

  • Download URL: sequential_thinking_mcp-0.10.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sequential_thinking_mcp-0.10.0.tar.gz
Algorithm Hash digest
SHA256 435cb1826acd69abdd0438c2e2832838d51f6684244cc04a00222a305e144667
MD5 2bc3554906876c28f127728fc1d52fa4
BLAKE2b-256 c6ca2872615e51f4cb98db2217a4416118f563b8c95145e14223f6cf4ee77566

See more details on using hashes here.

Provenance

The following attestation bundles were made for sequential_thinking_mcp-0.10.0.tar.gz:

Publisher: python-package-ci.yml on philogicae/sequential-thinking-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sequential_thinking_mcp-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sequential_thinking_mcp-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f44e19b2ca87e747e4f26f6675798722c1289c2a46eaf03b3a66ccfe938d527f
MD5 13bdf3ec22b7759fcee231451d64a6ac
BLAKE2b-256 22faa0930486a2d622299c6b6d167fda057ed813c34cab302a32622a03b00575

See more details on using hashes here.

Provenance

The following attestation bundles were made for sequential_thinking_mcp-0.10.0-py3-none-any.whl:

Publisher: python-package-ci.yml on philogicae/sequential-thinking-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page