npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

server-sequential-thinking

v0.1.1-alpha.2

Published

MCP server for sequential thinking and problem solving

Readme

Sequential Thinking Server

A Model Context Protocol (MCP) server that provides a tool for dynamic and reflective problem-solving through sequential thoughts and chain of thought reasoning.

Overview

The Sequential Thinking server helps analyze problems through a flexible thinking process that can adapt and evolve. Each thought can build on, question, or revise previous insights as understanding deepens.

Setup

This server requires an API key from OpenRouter to function.

  1. Create a .env file in the root directory of this project (where the main package.json for the servers repository resides).

  2. Add your OpenRouter API key to the .env file like this:

    OPENROUTER_API_KEY=your_openrouter_api_key_here
    OPENAI_API_KEY=your_openai_api_key_here
    • OPENROUTER_API_KEY: Used for accessing Gemini and Claude models via OpenRouter for the core reasoning steps.
    • OPENAI_API_KEY: Used for generating text embeddings (via text-embedding-3-small) if the embeddings feature is utilized. If not provided, a basic fallback embedding method will be used.

Features

  • Sequential Thinking: Break down complex problems into manageable steps
  • Flexible Thought Process: Adjust the number of thoughts as needed, revise previous thoughts, and branch into new paths
  • Chain of Thought Reasoning: Explicitly mark thoughts as part of a Chain of Thought sequence
  • Hypothesis Generation: Create and test hypotheses as part of the reasoning process
  • Verification: Verify hypotheses through structured reasoning
  • Persistence: Save and load thought processes between sessions
  • Multiple Hypotheses: Support for multiple competing hypotheses with unique identifiers
  • Confidence Levels: Assign confidence levels (0-100) to hypotheses
  • Branch Merging: Merge different branches of thought at specific points
  • Chain of Thought Validation: Automatic validation of Chain of Thought reasoning
  • IDE Context Awareness: Can optionally receive file structure and open file information from the IDE to inform reasoning.
  • Two-Stage Analysis: Utilizes Gemini for initial context-aware analysis and pre-reasoning, followed by Claude for final response refinement.

When to Use

  • 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
  • Problems that require a multi-step solution
  • Tasks that need to maintain context over multiple steps
  • Situations where irrelevant information needs to be filtered out
  • When explicit chain of thought reasoning would be beneficial

Usage

Regular Sequential Thinking

{
  "thought": "This is a regular sequential thought that breaks down a problem.",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true
}

Chain of Thought Reasoning

{
  "thought": "This is a Chain of Thought reasoning step that explicitly follows a structured reasoning process.",
  "thoughtNumber": 2,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "isChainOfThought": true,
  "chainOfThoughtStep": 1,
  "totalChainOfThoughtSteps": 3
}

Hypothesis Generation

{
  "thought": "Based on the previous reasoning, I hypothesize that the solution is X because of Y and Z.",
  "thoughtNumber": 3,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "isChainOfThought": true,
  "isHypothesis": true,
  "chainOfThoughtStep": 2,
  "totalChainOfThoughtSteps": 3
}

Hypothesis Verification

{
  "thought": "To verify my hypothesis, I'll check if conditions A, B, and C are met. A is true because... B is true because... C is true because... Therefore, my hypothesis is correct.",
  "thoughtNumber": 4,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "isChainOfThought": true,
  "isVerification": true,
  "chainOfThoughtStep": 3,
  "totalChainOfThoughtSteps": 3
}

Conclusion

{
  "thought": "After going through the Chain of Thought reasoning process, I can confidently conclude that the answer is X.",
  "thoughtNumber": 5,
  "totalThoughts": 5,
  "nextThoughtNeeded": false
}

Parameters

| Parameter | Type | Description | |-----------|------|-------------| | thought | string | Your current thinking step | | nextThoughtNeeded | boolean | Whether another thought step is needed | | thoughtNumber | integer | Current thought number | | totalThoughts | integer | Estimated total thoughts needed | | isRevision | boolean | Whether this revises previous thinking | | revisesThought | integer | Which thought is being reconsidered | | branchFromThought | integer | Branching point thought number | | branchId | string | Branch identifier | | needsMoreThoughts | boolean | If more thoughts are needed | | isChainOfThought | boolean | Whether this thought is part of a Chain of Thought sequence | | isHypothesis | boolean | Whether this thought is a hypothesis in the Chain of Thought | | isVerification | boolean | Whether this thought is verifying a hypothesis in the Chain of Thought | | chainOfThoughtStep | integer | The step number in the Chain of Thought sequence | | totalChainOfThoughtSteps | integer | The total number of steps in the Chain of Thought sequence | | confidenceLevel | number | Confidence level for a hypothesis (0-100) | | hypothesisId | string | Identifier for a specific hypothesis when working with multiple hypotheses | | mergeBranchId | string | ID of a branch to merge with the current branch | | mergeBranchPoint | integer | Thought number where branches should be merged | | validationStatus | string | Validation status of a Chain of Thought step ('valid', 'invalid', or 'uncertain') | | validationReason | string | Reason for the validation status | | dynamicContextWindowSize | integer | Optional dynamic context window size for analysis | | fileStructure | string | Optional JSON string representing the file structure of the relevant project directory. | | openFiles | array | Optional array of strings listing the paths of currently open files in the IDE. |

License

MIT