@gotza02/sequential-thinking 2026.2.25 β†’ 2026.2.27

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.
Files changed (2) hide show
  1. package/README.md +79 -24
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,13 +4,15 @@ A comprehensive Model Context Protocol (MCP) server that empowers AI models with
4
4
 
5
5
  ## Features
6
6
 
7
- - **🧠 Sequential Thinking:** Structured reasoning engine with block-based context management (Analysis -> Planning -> Execution -> Observation).
7
+ - **🧠 Sequential Thinking Engine:** A structured reasoning system that forces the AI to think before acting, using a rigorous `Analysis -> Planning -> Execution -> Observation` loop.
8
8
  - **🌐 Web Research:** Built-in web search (Brave, Exa, Google) and webpage reading with ad-blocking/markdown conversion.
9
9
  - **πŸ•ΈοΈ Project Knowledge Graph:** Automatically scans and maps code dependencies (imports/exports) to understand project architecture.
10
- - **πŸ“ Persistent Notes:** Save and retrieve long-term project notes.
11
- - **πŸ’Ύ Code Database:** Store and search reusable code snippets.
10
+ - **πŸ“ Persistent Notes:** Save and retrieve long-term project notes and facts.
11
+ - **πŸ’Ύ Code Database:** Store and search reusable code snippets and architectural patterns.
12
12
  - **πŸ› οΈ File & Code Tools:** Safe file operations and code analysis utilities.
13
13
 
14
+ ---
15
+
14
16
  ## Installation & Usage
15
17
 
16
18
  ### Method 1: Using `npx` (No Install Required)
@@ -35,9 +37,11 @@ If you have cloned this repository, we provide a `smartagent` script for easy ex
35
37
  ./smartagent
36
38
  ```
37
39
 
40
+ ---
41
+
38
42
  ## Client Configuration
39
43
 
40
- To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add the following configuration to your client's config file.
44
+ To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add the following configuration.
41
45
 
42
46
  ### 1. Claude Desktop
43
47
 
@@ -56,7 +60,13 @@ To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add t
56
60
  "@gotza02/sequential-thinking"
57
61
  ],
58
62
  "env": {
59
- "BRAVE_API_KEY": "your_brave_api_key_here"
63
+ "BRAVE_API_KEY": "your_brave_api_key_here",
64
+ "EXA_API_KEY": "your_exa_api_key_here",
65
+ "GOOGLE_SEARCH_API_KEY": "your_google_api_key",
66
+ "GOOGLE_SEARCH_CX": "your_google_cx_id",
67
+ "THOUGHTS_STORAGE_PATH": "/absolute/path/to/thoughts.json",
68
+ "NOTES_STORAGE_PATH": "/absolute/path/to/notes.json",
69
+ "DISABLE_THOUGHT_LOGGING": "false"
60
70
  }
61
71
  }
62
72
  }
@@ -73,7 +83,13 @@ To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add t
73
83
  "/absolute/path/to/thinking/dist/index.js"
74
84
  ],
75
85
  "env": {
76
- "BRAVE_API_KEY": "your_brave_api_key_here"
86
+ "BRAVE_API_KEY": "your_brave_api_key_here",
87
+ "EXA_API_KEY": "your_exa_api_key_here",
88
+ "GOOGLE_SEARCH_API_KEY": "your_google_api_key",
89
+ "GOOGLE_SEARCH_CX": "your_google_cx_id",
90
+ "THOUGHTS_STORAGE_PATH": "/absolute/path/to/thoughts.json",
91
+ "NOTES_STORAGE_PATH": "/absolute/path/to/notes.json",
92
+ "DISABLE_THOUGHT_LOGGING": "false"
77
93
  }
78
94
  }
79
95
  }
@@ -82,7 +98,7 @@ To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add t
82
98
 
83
99
  ### 2. Gemini CLI
84
100
 
85
- If you are using a Gemini CLI tool that supports MCP (often via a `config.json` or `mcp_config.json`), use the setup below.
101
+ For Gemini CLI tools that support MCP (often via a `config.json` or `mcp_config.json`):
86
102
 
87
103
  **Config File Location:**
88
104
  - Typically `~/.gemini/config.json` or check your specific CLI's documentation.
@@ -98,46 +114,84 @@ If you are using a Gemini CLI tool that supports MCP (often via a `config.json`
98
114
  ],
99
115
  "env": {
100
116
  "BRAVE_API_KEY": "your_brave_api_key_here",
101
- "THOUGHTS_STORAGE_PATH": "/absolute/path/to/thoughts.json"
117
+ "EXA_API_KEY": "your_exa_api_key_here",
118
+ "GOOGLE_SEARCH_API_KEY": "your_google_api_key",
119
+ "GOOGLE_SEARCH_CX": "your_google_cx_id",
120
+ "THOUGHTS_STORAGE_PATH": "/absolute/path/to/thoughts.json",
121
+ "NOTES_STORAGE_PATH": "/absolute/path/to/notes.json",
122
+ "DISABLE_THOUGHT_LOGGING": "false"
102
123
  }
103
124
  }
104
125
  }
105
126
  }
106
127
  ```
107
-
108
128
  *Note: Replace `/absolute/path/to/...` with the actual full paths on your system.*
109
129
 
130
+ ---
131
+
132
+ ## 🧠 How to Use Sequential Thinking
133
+
134
+ This server forces a "Thick Thinking" approach. The AI should not just execute tools randomly but follow a strict cognitive loop.
135
+
136
+ ### The Core Loop (Interleaved Thinking)
137
+
138
+ The correct workflow for solving complex problems is:
139
+
140
+ 1. **πŸ” Analysis:** Understand the user's request, break it down, and identify what is missing.
141
+ 2. **πŸ“‹ Planning:** Decide *exactly* which tool to call next and why.
142
+ 3. **⚑ Execution:** Declare the intent to call a tool (e.g., "I will read file X").
143
+ 4. **[Tool Call]**: The actual MCP tool (e.g., `read_file`, `web_search`) is executed.
144
+ 5. **πŸ‘οΈ Observation:** Analyze the *output* of the tool. Did it work? What did we learn?
145
+ 6. **πŸ”„ Reflexion:** (Optional) Critique the progress. Are we on track?
146
+
147
+ ### Thought Types
148
+
149
+ When using the `sequentialthinking` tool, you must specify a `thoughtType`:
150
+
151
+ | Type | Description |
152
+ | :--- | :--- |
153
+ | **`analysis`** | Initial problem breakdown or re-evaluating the situation. |
154
+ | **`planning`** | Formulating a plan or next steps. **ALWAYS plan before executing.** |
155
+ | **`execution`** | Stating the action to be taken. Set `relatedToolCall` to the tool name. |
156
+ | **`observation`** | analyzing tool output. **MANDATORY after every tool call.** |
157
+ | **`hypothesis`** | Formulating a theory to test (e.g., "I suspect the bug is in auth.ts"). |
158
+ | **`reflexion`** | Self-correction or review. Use this if stuck. |
159
+ | **`solution`** | The final answer or completion of the task. |
160
+
161
+ ### Best Practices
162
+
163
+ * **One Step at a Time:** Do not chain 10 thoughts in one go. Think -> Tool -> Observe -> Think.
164
+ * **Use Blocks:** When switching topics (e.g., from "Research" to "Coding"), use `start_thinking_block` to reset context and avoid loop detection errors.
165
+ * **Branching:** If a solution fails, don't keep trying the same thing. Use the `branchFromThought` parameter to "fork" your thinking process from an earlier point and try a different approach.
166
+
167
+ ---
168
+
110
169
  ## 🧰 Complete Tool List
111
170
 
112
171
  ### 🧠 Core Thinking
113
- * **`sequentialthinking`**: The main engine for problem-solving. Handles `analysis`, `planning`, `execution`, and `observation` steps.
114
- * **`start_thinking_block`**: Start a new thinking context (e.g., switch from "Planning" to "Coding"). Helps prevent context pollution.
115
- * **`get_thinking_blocks`**: View a summary of all discussion topics/blocks.
116
- * **`summarize_history`**: Compress past thoughts to save token space.
172
+ * **`sequentialthinking`**: The main engine for problem-solving.
173
+ * **`start_thinking_block`**: Start a new thinking context/topic.
174
+ * **`summarize_history`**: Compress past thoughts to save context window.
117
175
  * **`search_thoughts`**: Search through your thinking history.
118
176
  * **`clear_thought_history`**: Reset the thinking state completely.
119
177
 
120
178
  ### 🌐 Web & Research (Requires API Keys)
121
- * **`web_search`**: Search the internet.
122
- * *Requires:* `BRAVE_API_KEY` OR `EXA_API_KEY` OR (`GOOGLE_SEARCH_API_KEY` + `GOOGLE_SEARCH_CX`).
123
- * **`fetch`**: Fetch raw content from a URL (GET/POST).
124
- * **`read_webpage`**: Download a webpage and convert it to clean Markdown (removes ads/clutter).
179
+ * **`web_search`**: Search the internet (Brave, Exa, Google).
180
+ * **`read_webpage`**: Download a webpage and convert it to clean Markdown.
181
+ * **`fetch`**: Fetch raw content from a URL.
125
182
 
126
183
  ### πŸ•ΈοΈ Project Knowledge Graph
127
184
  * **`build_project_graph`**: Scans the current directory to map file dependencies.
128
- * **`force_rebuild_graph`**: Clears cache and rebuilds the graph from scratch.
129
- * **`get_file_relationships`**: Shows what a specific file imports and what imports it.
185
+ * **`get_file_relationships`**: Shows imports/exports for a specific file.
130
186
  * **`get_project_graph_summary`**: High-level stats of the project structure.
131
- * **`get_project_graph_visualization`**: Generates a Mermaid diagram of the dependency graph.
187
+ * **`get_project_graph_visualization`**: Generates a Mermaid diagram.
132
188
 
133
189
  ### πŸ“ Notes & Memory
134
190
  * **`manage_notes`**: Create, read, update, or delete persistent notes.
135
- * **`list_notes`**: List all saved notes.
136
191
  * **`add_code_snippet`**: Save a useful piece of code to the database.
137
- * **`search_code_db`**: Find saved code snippets by description or tags.
192
+ * **`search_code_db`**: Find saved code snippets.
138
193
 
139
- ### πŸ’» System & Coding
140
- * (Include standard file system tools provided by the server context, typically `read_file`, `write_file`, etc., if exposed via this MCP, though often provided by the client itself. This server provides specialized graph/analysis tools.)
194
+ ---
141
195
 
142
196
  ## Configuration Variables
143
197
 
@@ -149,6 +203,7 @@ If you are using a Gemini CLI tool that supports MCP (often via a `config.json`
149
203
  | `GOOGLE_SEARCH_CX` | Google Custom Search Engine ID | `web_search` (Provider: Google) |
150
204
  | `THOUGHTS_STORAGE_PATH` | Path to save thinking history (default: `thoughts_history.json`) | Persistence |
151
205
  | `NOTES_STORAGE_PATH` | Path to save notes (default: `project_notes.json`) | Persistence |
206
+ | `DISABLE_THOUGHT_LOGGING` | Set to `true` to hide thoughts in console output | Optional |
152
207
 
153
208
  ## License
154
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.2.25",
3
+ "version": "2026.2.27",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },