@wemake.cx/sequential-thinking 0.2.1 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,137 +1,171 @@
1
1
  # Sequential Thinking MCP Server
2
2
 
3
- An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured
4
- thinking process.
3
+ A Model Context Protocol server that provides structured sequential thinking capabilities for complex reasoning tasks,
4
+ enabling systematic problem breakdown and iterative refinement.
5
5
 
6
- ## Features
6
+ ## Overview and Purpose
7
7
 
8
- - Break down complex problems into manageable steps
9
- - Revise and refine thoughts as understanding deepens
10
- - Branch into alternative paths of reasoning
11
- - Adjust the total number of thoughts dynamically
12
- - Generate and verify solution hypotheses
8
+ The Sequential Thinking server addresses limitations in language models' ability to maintain coherent reasoning chains
9
+ across complex, multi-step problems. It provides a framework for systematic thought progression, ensuring logical
10
+ consistency and context preservation throughout extended reasoning processes.
13
11
 
14
- ## Tool
12
+ ### Core Concepts
15
13
 
16
- ### sequential_thinking
14
+ #### Sequential Reasoning Framework
17
15
 
18
- Facilitates a detailed, step-by-step thinking process for problem-solving and analysis.
16
+ - **Step-by-step progression**: Systematic breakdown of complex problems into manageable sequential steps
17
+ - **Logical dependencies**: Clear relationships between reasoning steps and conclusions
18
+ - **Context preservation**: Maintaining coherent context throughout multi-step processes
19
+ - **Iterative refinement**: Support for revising and improving reasoning chains based on new insights
19
20
 
20
- **Inputs:**
21
+ #### Reasoning Approaches
21
22
 
22
- - `thought` (string): The current thinking step
23
- - `nextThoughtNeeded` (boolean): Whether another thought step is needed
24
- - `thoughtNumber` (integer): Current thought number
25
- - `totalThoughts` (integer): Estimated total thoughts needed
26
- - `isRevision` (boolean, optional): Whether this revises previous thinking
27
- - `revisesThought` (integer, optional): Which thought is being reconsidered
28
- - `branchFromThought` (integer, optional): Branching point thought number
29
- - `branchId` (string, optional): Branch identifier
30
- - `needsMoreThoughts` (boolean, optional): If more thoughts are needed
23
+ - **Analytical**: Systematic, logical analysis with clear cause-and-effect relationships
24
+ - **Creative**: Exploratory thinking with divergent and convergent phases
25
+ - **Diagnostic**: Problem identification and solution development through systematic elimination
26
+ - **Strategic**: Long-term planning with sequential decision points and contingencies
31
27
 
32
- ## Usage
28
+ #### Thought Validation
33
29
 
34
- The Sequential Thinking tool is designed for:
30
+ - **Consistency checking**: Ensuring logical coherence across reasoning chains
31
+ - **Assumption tracking**: Identifying and validating underlying assumptions
32
+ - **Evidence evaluation**: Assessing the strength of supporting evidence for each step
33
+ - **Alternative consideration**: Exploring alternative reasoning paths and conclusions
35
34
 
36
- - Breaking down complex problems into steps
37
- - Planning and design with room for revision
38
- - Analysis that might need course correction
39
- - Problems where the full scope might not be clear initially
40
- - Tasks that need to maintain context over multiple steps
41
- - Situations where irrelevant information needs to be filtered out
35
+ ## Capabilities
42
36
 
43
- ## Configuration
37
+ ### Tools
44
38
 
45
- ### Usage with Claude Desktop
39
+ #### `sequential_thinking`
46
40
 
47
- Add this to your `claude_desktop_config.json`:
41
+ Structured sequential thinking tool for complex reasoning tasks.
48
42
 
49
- #### bunx
43
+ **Input Schema:**
50
44
 
51
45
  ```json
52
46
  {
53
- "mcpServers": {
54
- "sequential-thinking": {
55
- "command": "bunx",
56
- "args": ["-y", "@wemake.cx/sequential-thinking"]
47
+ "task": "string - The problem or question to analyze",
48
+ "thoughts": [
49
+ {
50
+ "step": "number - Sequential step number",
51
+ "content": "string - The thought or reasoning step",
52
+ "reasoning": "string - Explanation of the reasoning behind this step",
53
+ "assumptions": ["string - List of assumptions made in this step"],
54
+ "evidence": ["string - Supporting evidence or data"],
55
+ "confidence": "number - Confidence level (0.0-1.0)",
56
+ "alternatives": ["string - Alternative approaches or interpretations"]
57
57
  }
58
- }
58
+ ],
59
+ "framework": "string - Reasoning approach (analytical|creative|diagnostic|strategic)",
60
+ "stage": "string - Current stage (problem-definition|analysis|synthesis|evaluation|conclusion)",
61
+ "iteration": "number - Current iteration number",
62
+ "confidence": "number - Overall confidence in reasoning chain (0.0-1.0)",
63
+ "nextThoughtNeeded": "boolean - Whether additional thoughts are required",
64
+ "suggestedNextSteps": ["string - Recommended next reasoning steps"]
59
65
  }
60
66
  ```
61
67
 
62
- #### docker
68
+ **Output:** Structured reasoning analysis with validated thought progression, logical consistency assessment, and
69
+ recommendations for next steps.
70
+
71
+ **Error Cases:**
72
+
73
+ - Invalid framework type
74
+ - Missing required reasoning steps
75
+ - Logical inconsistencies in thought progression
76
+ - Insufficient evidence for conclusions
77
+
78
+ ## Setup
79
+
80
+ ### bunx
63
81
 
64
82
  ```json
65
83
  {
66
84
  "mcpServers": {
67
85
  "sequential-thinking": {
68
- "command": "docker",
69
- "args": ["run", "--rm", "-i", "mcp/sequential-thinking"]
86
+ "command": "bunx",
87
+ "args": ["-y", "@wemake.cx/sequential-thinking@alpha"]
70
88
  }
71
89
  }
72
90
  }
73
91
  ```
74
92
 
75
- To disable logging of thought information set env var: `DISABLE_THOUGHT_LOGGING` to `true`. Comment
76
-
77
- ### Usage with VS Code
78
-
79
- For quick installation, click one of the installation buttons below...
80
-
81
- [![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=sequential-thinking&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-sequential-thinking%22%5D%7D)
82
- [![Install with NPX in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-NPM-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=sequential-thinking&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-sequential-thinking%22%5D%7D&quality=insiders)
93
+ ### Environment Variables
83
94
 
84
- [![Install with Docker in VS Code](https://img.shields.io/badge/VS_Code-Docker-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=sequential-thinking&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22--rm%22%2C%22-i%22%2C%22mcp%2Fsequential-thinking%22%5D%7D)
85
- [![Install with Docker in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Docker-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=sequential-thinking&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22--rm%22%2C%22-i%22%2C%22mcp%2Fsequential-thinking%22%5D%7D&quality=insiders)
95
+ - `REASONING_DEPTH`: Set maximum reasoning depth (default: "10")
96
+ - `VALIDATION_STRICTNESS`: Set validation level ("lenient" | "standard" | "strict", default: "standard")
97
+ - `FRAMEWORK_FLEXIBILITY`: Allow framework switching mid-process ("true" | "false", default: "true")
98
+ - `CONFIDENCE_THRESHOLD`: Minimum confidence for step acceptance (default: "0.6")
86
99
 
87
- For manual installation, you can configure the MCP server using one of these methods:
100
+ ### System Prompt Template
88
101
 
89
- **Method 1: User Configuration (Recommended)** Add the configuration to your user-level MCP configuration file. Open the
90
- Command Palette (`Ctrl + Shift + P`) and run `MCP: Open User Configuration`. This will open your user `mcp.json` file
91
- where you can add the server configuration.
102
+ ```markdown
103
+ You are an expert in sequential thinking and systematic reasoning. Use the sequential thinking tool to:
92
104
 
93
- **Method 2: Workspace Configuration** Alternatively, you can add the configuration to a file called `.vscode/mcp.json`
94
- in your workspace. This will allow you to share the configuration with others.
105
+ 1. Break down complex problems into logical, sequential steps
106
+ 2. Maintain coherent reasoning chains with clear dependencies
107
+ 3. Validate assumptions and evidence at each step
108
+ 4. Consider alternative approaches and interpretations
109
+ 5. Provide confidence assessments for each reasoning step
110
+ 6. Suggest next steps for continued analysis
95
111
 
96
- > For more details about MCP configuration in VS Code, see the
97
- > [official VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/mcp).
112
+ Always specify the reasoning framework that best fits the problem type:
98
113
 
99
- For bunx installation:
114
+ - Analytical: For systematic, logical analysis
115
+ - Creative: For exploratory and innovative thinking
116
+ - Diagnostic: For problem identification and troubleshooting
117
+ - Strategic: For long-term planning and decision-making
100
118
 
101
- ```json
102
- {
103
- "servers": {
104
- "sequential-thinking": {
105
- "command": "bunx",
106
- "args": ["-y", "@wemake.cx/sequential-thinking"]
107
- }
108
- }
109
- }
119
+ Ensure each thought builds logically on previous steps and contributes to the overall reasoning objective.
110
120
  ```
111
121
 
112
- For Docker installation:
113
-
114
- ```json
115
- {
116
- "servers": {
117
- "sequential-thinking": {
118
- "command": "docker",
119
- "args": ["run", "--rm", "-i", "mcp/sequential-thinking"]
122
+ ## Example
123
+
124
+ ```typescript
125
+ // Analyze a complex business problem using sequential thinking
126
+ const businessAnalysis = await sequentialthinking({
127
+ task: "Determine the best market entry strategy for a new SaaS product targeting small businesses",
128
+ thoughts: [
129
+ {
130
+ step: 1,
131
+ content: "Define the target market characteristics and size",
132
+ reasoning: "Understanding the market is fundamental to any entry strategy",
133
+ assumptions: ["Small businesses are defined as 1-50 employees", "SaaS adoption is growing in this segment"],
134
+ evidence: [
135
+ "Market research shows 32M small businesses in target regions",
136
+ "SaaS adoption rate of 73% among small businesses"
137
+ ],
138
+ confidence: 0.8,
139
+ alternatives: ["Focus on micro-businesses (<10 employees)", "Target specific industries first"]
140
+ },
141
+ {
142
+ step: 2,
143
+ content: "Analyze competitive landscape and positioning opportunities",
144
+ reasoning: "Competitive analysis reveals differentiation opportunities and market gaps",
145
+ assumptions: ["Current solutions have identifiable weaknesses", "Price sensitivity varies by business size"],
146
+ evidence: ["Top 3 competitors have 45% market share", "Customer reviews indicate pain points in user experience"],
147
+ confidence: 0.75,
148
+ alternatives: ["Blue ocean strategy", "Direct competition with feature superiority"]
149
+ },
150
+ {
151
+ step: 3,
152
+ content: "Evaluate go-to-market channel options",
153
+ reasoning: "Channel strategy determines reach, cost, and scalability of market entry",
154
+ assumptions: ["Digital channels are most cost-effective", "Small businesses prefer self-service onboarding"],
155
+ evidence: ["70% of small businesses research software online", "Self-service reduces CAC by 60%"],
156
+ confidence: 0.7,
157
+ alternatives: ["Partner channel strategy", "Hybrid direct + partner approach", "Pure direct sales model"]
120
158
  }
121
- }
122
- }
159
+ ],
160
+ framework: "strategic",
161
+ stage: "analysis",
162
+ iteration: 1,
163
+ confidence: 0.75,
164
+ nextThoughtNeeded: true,
165
+ suggestedNextSteps: [
166
+ "Develop pricing strategy based on market analysis",
167
+ "Create detailed implementation timeline",
168
+ "Identify key success metrics and milestones"
169
+ ]
170
+ });
123
171
  ```
124
-
125
- ## Building
126
-
127
- Docker:
128
-
129
- ```bash
130
- docker build -t mcp/sequential-thinking -f src/sequential-thinking/Dockerfile .
131
- ```
132
-
133
- ## License
134
-
135
- This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software,
136
- subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project
137
- repository.
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
+ // @bun
2
3
  var __create = Object.create;
3
4
  var __getProtoOf = Object.getPrototypeOf;
4
5
  var __defProp = Object.defineProperty;
@@ -11259,7 +11260,7 @@ class Server extends Protocol {
11259
11260
  }
11260
11261
 
11261
11262
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
11262
- import process2 from "node:process";
11263
+ import process2 from "process";
11263
11264
 
11264
11265
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
11265
11266
  class ReadBuffer {
@@ -11530,9 +11531,9 @@ var ansiStyles = assembleStyles();
11530
11531
  var ansi_styles_default = ansiStyles;
11531
11532
 
11532
11533
  // ../../node_modules/chalk/source/vendor/supports-color/index.js
11533
- import process3 from "node:process";
11534
- import os from "node:os";
11535
- import tty from "node:tty";
11534
+ import process3 from "process";
11535
+ import os from "os";
11536
+ import tty from "tty";
11536
11537
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process3.argv) {
11537
11538
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
11538
11539
  const position = argv.indexOf(prefix + flag);
@@ -11890,13 +11891,13 @@ class SequentialThinkingServer {
11890
11891
  context = "";
11891
11892
  }
11892
11893
  const header = `${prefix} ${thoughtNumber}/${totalThoughts}${context}`;
11893
- const border = "".repeat(Math.max(header.length, thought.length) + 4);
11894
+ const border = "\u2500".repeat(Math.max(header.length, thought.length) + 4);
11894
11895
  return `
11895
- ┌${border}
11896
- ${header}
11897
- ├${border}
11898
- ${thought.padEnd(border.length - 2)}
11899
- └${border}┘`;
11896
+ \u250C${border}\u2510
11897
+ \u2502 ${header} \u2502
11898
+ \u251C${border}\u2524
11899
+ \u2502 ${thought.padEnd(border.length - 2)} \u2502
11900
+ \u2514${border}\u2518`;
11900
11901
  }
11901
11902
  processThought(input) {
11902
11903
  try {
@@ -12050,7 +12051,7 @@ You should:
12050
12051
  };
12051
12052
  var server = new Server({
12052
12053
  name: "sequential-thinking-server",
12053
- version: "0.2.1"
12054
+ version: "0.2.4"
12054
12055
  }, {
12055
12056
  capabilities: {
12056
12057
  tools: {}
@@ -12084,5 +12085,5 @@ runServer().catch((error) => {
12084
12085
  process.exit(1);
12085
12086
  });
12086
12087
 
12087
- //# debugId=2B44113B29A82E4464756E2164756E21
12088
+ //# debugId=378BF4D9D57C729264756E2164756E21
12088
12089
  //# sourceMappingURL=index.js.map