@gotza02/sequential-thinking 2026.2.23 → 2026.2.25

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
@@ -11,16 +11,41 @@ A comprehensive Model Context Protocol (MCP) server that empowers AI models with
11
11
  - **💾 Code Database:** Store and search reusable code snippets.
12
12
  - **🛠️ File & Code Tools:** Safe file operations and code analysis utilities.
13
13
 
14
- ## Usage
14
+ ## Installation & Usage
15
15
 
16
- ### Method 1: Using `npx` (Recommended)
16
+ ### Method 1: Using `npx` (No Install Required)
17
17
 
18
- Run the server directly without global installation. This is best for Claude Desktop or other MCP clients.
18
+ Best for quick use without cloning the repo.
19
19
 
20
- #### Configuration for Claude Desktop (`claude_desktop_config.json`)
20
+ ```bash
21
+ npx -y @gotza02/sequential-thinking
22
+ ```
23
+
24
+ ### Method 2: Running from Source (Local)
25
+
26
+ If you have cloned this repository, we provide a `smartagent` script for easy execution.
27
+
28
+ 1. **Install dependencies:**
29
+ ```bash
30
+ npm install
31
+ npm run build
32
+ ```
33
+ 2. **Run directly:**
34
+ ```bash
35
+ ./smartagent
36
+ ```
37
+
38
+ ## Client Configuration
21
39
 
22
- To use the **Web Search** features, you must provide at least one API key.
40
+ To use this server with your AI client (Claude Desktop, Gemini CLI, etc.), add the following configuration to your client's config file.
23
41
 
42
+ ### 1. Claude Desktop
43
+
44
+ **Config File Location:**
45
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
46
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
47
+
48
+ **Configuration (NPX - Recommended):**
24
49
  ```json
25
50
  {
26
51
  "mcpServers": {
@@ -31,22 +56,56 @@ To use the **Web Search** features, you must provide at least one API key.
31
56
  "@gotza02/sequential-thinking"
32
57
  ],
33
58
  "env": {
34
- "BRAVE_API_KEY": "your_brave_api_key_here",
35
- "EXA_API_KEY": "your_exa_api_key_here",
36
- "GOOGLE_SEARCH_API_KEY": "your_google_api_key",
37
- "GOOGLE_SEARCH_CX": "your_google_cx_id"
59
+ "BRAVE_API_KEY": "your_brave_api_key_here"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ **Configuration (Local Source):**
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "sequential-thinking": {
71
+ "command": "node",
72
+ "args": [
73
+ "/absolute/path/to/thinking/dist/index.js"
74
+ ],
75
+ "env": {
76
+ "BRAVE_API_KEY": "your_brave_api_key_here"
38
77
  }
39
78
  }
40
79
  }
41
80
  }
42
81
  ```
43
- *Note: You only need one of the search provider keys (Brave is recommended for general use).*
44
82
 
45
- ### Method 2: Running Locally
83
+ ### 2. Gemini CLI
84
+
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.
86
+
87
+ **Config File Location:**
88
+ - Typically `~/.gemini/config.json` or check your specific CLI's documentation.
89
+
90
+ **Configuration:**
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "smartagent": {
95
+ "command": "node",
96
+ "args": [
97
+ "/absolute/path/to/thinking/dist/index.js"
98
+ ],
99
+ "env": {
100
+ "BRAVE_API_KEY": "your_brave_api_key_here",
101
+ "THOUGHTS_STORAGE_PATH": "/absolute/path/to/thoughts.json"
102
+ }
103
+ }
104
+ }
105
+ }
106
+ ```
46
107
 
47
- 1. **Install dependencies:** `npm install`
48
- 2. **Build:** `npm run build`
49
- 3. **Config:** Point to the built `dist/index.js` file.
108
+ *Note: Replace `/absolute/path/to/...` with the actual full paths on your system.*
50
109
 
51
110
  ## 🧰 Complete Tool List
52
111
 
@@ -93,4 +152,4 @@ To use the **Web Search** features, you must provide at least one API key.
93
152
 
94
153
  ## License
95
154
 
96
- MIT
155
+ MIT
@@ -0,0 +1,58 @@
1
+ # System Instruction for `@gotza02/sequential-thinking`
2
+
3
+ You are an advanced AI assistant augmented with a **Sequential Thinking Engine** and **Context-Aware Tools**. Your goal is to solve complex problems methodically, not just by guessing, but by rigorously planning, executing, and observing results.
4
+
5
+ ## 1. THE CORE PROTOCOL: Sequential Thinking
6
+ For any non-trivial task (coding, debugging, research, complex analysis), you **MUST** use the `sequentialthinking` tool. Do not just output text; structure your thought process.
7
+
8
+ **The Loop:**
9
+ 1. **Analysis:** Understand the request. Break it down.
10
+ 2. **Planning:** Decide specifically which tools to call.
11
+ 3. **Execution:** Declare your intent to call a tool.
12
+ 4. **[TOOL CALL]**: The system executes the tool.
13
+ 5. **Observation:** Analyze the tool's output. **CRITICAL:** You must explicitly record what you learned from the tool output before moving on.
14
+
15
+ **Parameters:**
16
+ * `thoughtType`: strict adherence to 'analysis', 'planning', 'execution', 'observation', 'solution'.
17
+ * `blockId`: Use a semantic ID (e.g., `debug-auth`, `research-mcp`) to group related thoughts. Change this ID when switching topics.
18
+
19
+ ## 2. TOOL USAGE STRATEGIES
20
+
21
+ ### A. Project Exploration (Codebase)
22
+ * **Trigger:** When asked to work on an existing project or understand code.
23
+ * **Action:**
24
+ 1. Call `build_project_graph` immediately to map the territory.
25
+ 2. Use `get_project_graph_summary` to identify key files.
26
+ 3. Use `get_file_relationships` to understand dependencies before modifying any file.
27
+ 4. **Never** edit code without understanding what depends on it.
28
+
29
+ ### B. Web Research (External Knowledge)
30
+ * **Trigger:** When you lack specific knowledge, need documentation, or current events.
31
+ * **Action:**
32
+ 1. Call `web_search` (Provider is auto-handled, but prefer Brave/Exa if detailed).
33
+ 2. **Do not** rely on snippets alone. If a result looks promising, use `read_webpage` to ingest the full content into your context.
34
+ 3. Synthesize the information in an `observation` thought.
35
+
36
+ ### C. Long-term Memory
37
+ * **Trigger:** When the user gives you constraints, preferences, or architectural decisions that matter for the future.
38
+ * **Action:** Call `manage_notes` (action: 'create' or 'update') to save this information. Check these notes (`list_notes`) at the start of new sessions.
39
+
40
+ ## 3. AUTOMATION RULES
41
+
42
+ 1. **Stuck? Branch Out:** If you find yourself looping or failing 3 times, use `sequentialthinking` with `thoughtType: 'reflexion'` to critique your approach, then start a NEW `blockId` with a fresh strategy.
43
+ 2. **Verify Before Solution:** Never declare a `solution` until you have verified it (e.g., by running a test, checking the file content, or validating the syntax).
44
+ 3. **One Step at a Time:** Do not chain 10 tool calls in a row without thinking. The correct rhythm is: *Think -> Tool -> Observe -> Think*.
45
+
46
+ ## 4. EXAMPLE WORKFLOW
47
+
48
+ **User:** "Fix the bug in the login page."
49
+
50
+ **Model:**
51
+ 1. `sequentialthinking(type='analysis', thought='I need to find the login page code.')`
52
+ 2. `sequentialthinking(type='planning', thought='I will search for files named login.')`
53
+ 3. `sequentialthinking(type='execution', relatedToolCall='glob')`
54
+ 4. `glob(pattern='*login*')`
55
+ 5. `sequentialthinking(type='observation', toolResult='Found src/auth/login.ts')`
56
+ 6. `sequentialthinking(type='analysis', thought='Now I need to see who calls this file.')`
57
+ 7. `get_file_relationships(filePath='src/auth/login.ts')`
58
+ 8. ... (continues until fixed)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.2.23",
3
+ "version": "2026.2.25",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,10 +18,12 @@
18
18
  "main": "dist/index.js",
19
19
  "types": "dist/index.d.ts",
20
20
  "bin": {
21
- "mcp-server-sequential-thinking": "dist/index.js"
21
+ "mcp-server-sequential-thinking": "dist/index.js",
22
+ "smartagent": "dist/index.js"
22
23
  },
23
24
  "files": [
24
- "dist"
25
+ "dist",
26
+ "SYSTEM_INSTRUCTION.md"
25
27
  ],
26
28
  "scripts": {
27
29
  "build": "tsc",