sequential-thinking 0.6.0__py3-none-any.whl

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.
@@ -0,0 +1,475 @@
1
+ Metadata-Version: 2.4
2
+ Name: sequential-thinking
3
+ Version: 0.6.0
4
+ Summary: A Sequential Thinking MCP Server for advanced problem solving
5
+ Project-URL: Source, https://github.com/feniix/mcp-sequential-thinking
6
+ Project-URL: Original, https://github.com/arben-adm/mcp-sequential-thinking
7
+ Author-email: Sebastian Otaegui <feniix@gmail.com>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: ai,mcp,problem-solving,sequential-thinking
11
+ Requires-Python: >=3.10
12
+ Requires-Dist: mcp>=1.27.1
13
+ Requires-Dist: portalocker>=3.2.0
14
+ Requires-Dist: pydantic>=2.13.4
15
+ Description-Content-Type: text/markdown
16
+
17
+ # Sequential Thinking MCP Server
18
+
19
+ A Model Context Protocol (MCP) server that facilitates structured, progressive thinking through defined stages. This tool helps break down complex problems into sequential thoughts, track the progression of your thinking process, and generate summaries.
20
+
21
+ Maintained by **Sebastian Otaegui <feniix@gmail.com>**.
22
+
23
+ This project is based on the original [`arben-adm/mcp-sequential-thinking`](https://github.com/arben-adm/mcp-sequential-thinking) project by Arben Ademi. See [Attribution](#attribution) for details.
24
+
25
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
26
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
27
+ [![Lint: Ruff](https://img.shields.io/badge/lint-ruff-46a4f5.svg)](https://docs.astral.sh/ruff/)
28
+
29
+ ## Features
30
+
31
+ - **Structured Thinking Framework**: Organizes thoughts through standard cognitive stages (Problem Definition, Research, Analysis, Synthesis, Conclusion)
32
+ - **Thought Tracking**: Records and manages sequential thoughts with metadata
33
+ - **Related Thought Analysis**: Identifies connections between similar thoughts
34
+ - **Progress Monitoring**: Tracks your position in the overall thinking sequence
35
+ - **Summary Generation**: Creates concise overviews of the entire thought process
36
+ - **Persistent Storage**: Automatically saves your thinking sessions with thread-safety
37
+ - **Data Import/Export**: Share and reuse thinking sessions
38
+ - **Extensible Architecture**: Easily customize and extend functionality
39
+ - **Robust Error Handling**: Graceful handling of edge cases and corrupted data
40
+ - **Type Safety**: Comprehensive type annotations and validation
41
+
42
+ ## Prerequisites
43
+
44
+ - Python 3.10 or higher
45
+ - UV package manager ([Install Guide](https://github.com/astral-sh/uv))
46
+
47
+ ## Key Technologies
48
+
49
+ - **MCP Python SDK / FastMCP**: For Model Context Protocol integration
50
+ - **Pydantic**: For data validation and serialization
51
+ - **Portalocker**: For thread-safe file access
52
+ - **uv**: For dependency management and reproducible development environments
53
+ - **Ruff + basedpyright**: For linting, formatting, and strict type checking
54
+
55
+ ## Project Structure
56
+
57
+ ```
58
+ mcp-sequential-thinking/
59
+ ├── mcp_sequential_thinking/
60
+ │ ├── server.py # Main server implementation and MCP tools
61
+ │ ├── models.py # Data models with Pydantic validation
62
+ │ ├── storage.py # Thread-safe persistence layer
63
+ │ ├── storage_utils.py # Shared utilities for storage operations
64
+ │ ├── analysis.py # Thought analysis and pattern detection
65
+ │ ├── utils.py # Common utilities and helper functions
66
+ │ ├── logging_conf.py # Centralized logging configuration
67
+ │ └── __init__.py # Package initialization
68
+ ├── tests/
69
+ │ ├── test_analysis.py # Tests for analysis functionality
70
+ │ ├── test_models.py # Tests for data models
71
+ │ ├── test_server.py # Tests for MCP server tools
72
+ │ ├── test_storage.py # Tests for persistence layer
73
+ │ ├── test_storage_utils.py # Tests for storage utility edge cases
74
+ │ ├── test_utils.py # Tests for common utilities
75
+ │ └── __init__.py
76
+ ├── run_server.py # Server entry point script
77
+ ├── debug_mcp_connection.py # Utility for debugging connections
78
+ ├── README.md # Main documentation
79
+ ├── CHANGELOG.md # Version history and changes
80
+ ├── example.md # Customization examples
81
+ ├── LICENSE # MIT License
82
+ └── pyproject.toml # Project configuration and dependencies
83
+ ```
84
+
85
+ ## Quick Start
86
+
87
+ 1. **Set Up Project**
88
+ ```bash
89
+ # Create and activate virtual environment
90
+ uv venv
91
+ .venv\Scripts\activate # Windows
92
+ source .venv/bin/activate # Unix
93
+
94
+ # Install package and dependencies
95
+ uv pip install -e .
96
+
97
+ # For development with testing tools
98
+ uv sync --group dev
99
+ ```
100
+
101
+ 2. **Run the Server**
102
+ ```bash
103
+ # Run directly
104
+ uv run -m mcp_sequential_thinking.server
105
+
106
+ # Or use the installed script
107
+ mcp-sequential-thinking
108
+ ```
109
+
110
+ 3. **Run Tests**
111
+ ```bash
112
+ # Run all tests with coverage
113
+ uv run --group dev pytest
114
+
115
+ # Run linting and type checks
116
+ uv run --group dev ruff check .
117
+ uv run --group dev basedpyright
118
+ ```
119
+
120
+ ## Claude Desktop Integration
121
+
122
+ Add to your Claude Desktop configuration:
123
+ - **Linux**: `~/.config/Claude/claude_desktop_config.json`
124
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
125
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
126
+
127
+ ### Option 1: Using the virtual environment (recommended for Linux/macOS)
128
+
129
+ If you have set up the project with `uv venv && uv pip install -e .`, point directly to the venv Python interpreter. This avoids dependency resolution issues (e.g., on systems with Python 3.14+):
130
+
131
+ ```json
132
+ {
133
+ "mcpServers": {
134
+ "sequential-thinking": {
135
+ "command": "/path/to/mcp-sequential-thinking/.venv/bin/python",
136
+ "args": [
137
+ "-m",
138
+ "mcp_sequential_thinking.server"
139
+ ],
140
+ "cwd": "/path/to/mcp-sequential-thinking"
141
+ }
142
+ }
143
+ }
144
+ ```
145
+
146
+ ### Option 2: Using uv run
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "sequential-thinking": {
152
+ "command": "uv",
153
+ "args": [
154
+ "run",
155
+ "--directory",
156
+ "/path/to/mcp-sequential-thinking",
157
+ "-m",
158
+ "mcp_sequential_thinking.server"
159
+ ]
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ ### Option 3: Using the installed entry point
166
+
167
+ If you've installed the package globally with `pip install -e .`:
168
+
169
+ ```json
170
+ {
171
+ "mcpServers": {
172
+ "sequential-thinking": {
173
+ "command": "mcp-sequential-thinking"
174
+ }
175
+ }
176
+ }
177
+ ```
178
+
179
+ ### Option 4: Using uvx (no local install needed)
180
+
181
+ ```json
182
+ {
183
+ "mcpServers": {
184
+ "sequential-thinking": {
185
+ "command": "uvx",
186
+ "args": [
187
+ "--from",
188
+ "git+https://github.com/feniix/mcp-sequential-thinking",
189
+ "mcp-sequential-thinking"
190
+ ]
191
+ }
192
+ }
193
+ }
194
+ ```
195
+
196
+ ## Editor & IDE Integration
197
+
198
+ ### Cursor
199
+
200
+ Add to your Cursor MCP configuration at `.cursor/mcp.json` in your project root (or globally at `~/.cursor/mcp.json`):
201
+
202
+ ```json
203
+ {
204
+ "mcpServers": {
205
+ "sequential-thinking": {
206
+ "command": "uv",
207
+ "args": [
208
+ "run",
209
+ "--directory",
210
+ "/path/to/mcp-sequential-thinking",
211
+ "-m",
212
+ "mcp_sequential_thinking.server"
213
+ ]
214
+ }
215
+ }
216
+ }
217
+ ```
218
+
219
+ ### VS Code (Copilot MCP)
220
+
221
+ VS Code supports MCP servers since version 1.99+. Add to `.vscode/mcp.json` in your workspace or to your user `settings.json`:
222
+
223
+ ```json
224
+ {
225
+ "servers": {
226
+ "sequential-thinking": {
227
+ "command": "uv",
228
+ "args": [
229
+ "run",
230
+ "--directory",
231
+ "/path/to/mcp-sequential-thinking",
232
+ "-m",
233
+ "mcp_sequential_thinking.server"
234
+ ]
235
+ }
236
+ }
237
+ }
238
+ ```
239
+
240
+ > **Note:** Enable MCP support in VS Code via `"chat.mcp.enabled": true` in your settings.
241
+
242
+ ### Zed
243
+
244
+ Add to your Zed settings (`~/.config/zed/settings.json`):
245
+
246
+ ```json
247
+ {
248
+ "context_servers": {
249
+ "sequential-thinking": {
250
+ "command": {
251
+ "path": "uv",
252
+ "args": [
253
+ "run",
254
+ "--directory",
255
+ "/path/to/mcp-sequential-thinking",
256
+ "-m",
257
+ "mcp_sequential_thinking.server"
258
+ ]
259
+ }
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ ### Claude Code (CLI)
266
+
267
+ Add the server using the CLI:
268
+
269
+ ```bash
270
+ claude mcp add sequential-thinking -- uv run --directory /path/to/mcp-sequential-thinking -m mcp_sequential_thinking.server
271
+ ```
272
+
273
+ Or manually create/edit `.mcp.json` in your project root:
274
+
275
+ ```json
276
+ {
277
+ "mcpServers": {
278
+ "sequential-thinking": {
279
+ "command": "uv",
280
+ "args": [
281
+ "run",
282
+ "--directory",
283
+ "/path/to/mcp-sequential-thinking",
284
+ "-m",
285
+ "mcp_sequential_thinking.server"
286
+ ]
287
+ }
288
+ }
289
+ }
290
+ ```
291
+
292
+ ### Windsurf
293
+
294
+ Add to your Windsurf MCP configuration at `~/.codeium/windsurf/mcp_config.json`:
295
+
296
+ ```json
297
+ {
298
+ "mcpServers": {
299
+ "sequential-thinking": {
300
+ "command": "uv",
301
+ "args": [
302
+ "run",
303
+ "--directory",
304
+ "/path/to/mcp-sequential-thinking",
305
+ "-m",
306
+ "mcp_sequential_thinking.server"
307
+ ]
308
+ }
309
+ }
310
+ }
311
+ ```
312
+
313
+ ### Gemini CLI
314
+
315
+ Add to your Gemini CLI settings at `~/.gemini/settings.json`:
316
+
317
+ ```json
318
+ {
319
+ "mcpServers": {
320
+ "sequential-thinking": {
321
+ "type": "stdio",
322
+ "command": "uvx",
323
+ "args": [
324
+ "--from",
325
+ "git+https://github.com/feniix/mcp-sequential-thinking",
326
+ "mcp-sequential-thinking"
327
+ ],
328
+ "env": {}
329
+ }
330
+ }
331
+ }
332
+ ```
333
+
334
+ > **Tip:** All editor configurations above use `uv run` or `uvx`. You can also point directly to the venv Python interpreter (see [Claude Desktop Option 1](#option-1-using-the-virtual-environment-recommended-for-linuxmacos)) or use `uvx` (see [Option 4](#option-4-using-uvx-no-local-install-needed)) if you prefer not to clone the repository.
335
+
336
+ # How It Works
337
+
338
+ The server maintains a history of thoughts and processes them through a structured workflow. Each thought is validated using Pydantic models, categorized into thinking stages, and stored with relevant metadata in a thread-safe storage system. The server automatically handles data persistence, backup creation, and provides tools for analyzing relationships between thoughts.
339
+
340
+ ## Usage Guide
341
+
342
+ The Sequential Thinking server exposes five main tools:
343
+
344
+ ### 1. `process_thought`
345
+
346
+ Records and analyzes a new thought in your sequential thinking process.
347
+
348
+ **Parameters:**
349
+
350
+ - `thought` (string): The content of your thought
351
+ - `thought_number` (integer): Position in your sequence (e.g., 1 for first thought)
352
+ - `total_thoughts` (integer): Expected total thoughts in the sequence
353
+ - `next_thought_needed` (boolean): Whether more thoughts are needed after this one
354
+ - `stage` (string): The thinking stage - must be one of:
355
+ - "Problem Definition"
356
+ - "Research"
357
+ - "Analysis"
358
+ - "Synthesis"
359
+ - "Conclusion"
360
+ - `tags` (list of strings, optional): Keywords or categories for your thought
361
+ - `axioms_used` (list of strings, optional): Principles or axioms applied in your thought
362
+ - `assumptions_challenged` (list of strings, optional): Assumptions your thought questions or challenges
363
+
364
+ **Example:**
365
+
366
+ ```python
367
+ # First thought in a 5-thought sequence
368
+ process_thought(
369
+ thought="The problem of climate change requires analysis of multiple factors including emissions, policy, and technology adoption.",
370
+ thought_number=1,
371
+ total_thoughts=5,
372
+ next_thought_needed=True,
373
+ stage="Problem Definition",
374
+ tags=["climate", "global policy", "systems thinking"],
375
+ axioms_used=["Complex problems require multifaceted solutions"],
376
+ assumptions_challenged=["Technology alone can solve climate change"]
377
+ )
378
+ ```
379
+
380
+ ### 2. `generate_summary`
381
+
382
+ Generates a summary of your entire thinking process.
383
+
384
+ **Example output:**
385
+
386
+ ```json
387
+ {
388
+ "summary": {
389
+ "totalThoughts": 5,
390
+ "stages": {
391
+ "Problem Definition": 1,
392
+ "Research": 1,
393
+ "Analysis": 1,
394
+ "Synthesis": 1,
395
+ "Conclusion": 1
396
+ },
397
+ "timeline": [
398
+ {"number": 1, "stage": "Problem Definition"},
399
+ {"number": 2, "stage": "Research"},
400
+ {"number": 3, "stage": "Analysis"},
401
+ {"number": 4, "stage": "Synthesis"},
402
+ {"number": 5, "stage": "Conclusion"}
403
+ ]
404
+ }
405
+ }
406
+ ```
407
+
408
+ ### 3. `clear_history`
409
+
410
+ Resets the thinking process by clearing all recorded thoughts.
411
+
412
+ ### 4. `export_session`
413
+
414
+ Exports the current thinking session to a JSON file for sharing or backup.
415
+
416
+ **Parameters:**
417
+
418
+ - `file_path` (string): Path to the output JSON file (parent directories are created automatically)
419
+
420
+ **Example:**
421
+
422
+ ```python
423
+ export_session(file_path="/home/user/exports/my-analysis.json")
424
+ ```
425
+
426
+ ### 5. `import_session`
427
+
428
+ Imports a previously exported thinking session from a JSON file.
429
+
430
+ **Parameters:**
431
+
432
+ - `file_path` (string): Path to the JSON file to import
433
+
434
+ ## Practical Applications
435
+
436
+ - **Decision Making**: Work through important decisions methodically
437
+ - **Problem Solving**: Break complex problems into manageable components
438
+ - **Research Planning**: Structure your research approach with clear stages
439
+ - **Writing Organization**: Develop ideas progressively before writing
440
+ - **Project Analysis**: Evaluate projects through defined analytical stages
441
+
442
+
443
+ ## Getting Started
444
+
445
+ With the proper MCP setup, simply use the `process_thought` tool to begin working through your thoughts in sequence. As you progress, you can get an overview with `generate_summary` and reset when needed with `clear_history`.
446
+
447
+
448
+
449
+ # Customizing the Sequential Thinking Server
450
+
451
+ For detailed examples of how to customize and extend the Sequential Thinking server, see [example.md](example.md). It includes code samples for:
452
+
453
+ - Modifying thinking stages
454
+ - Enhancing thought data structures with Pydantic
455
+ - Adding persistence with databases
456
+ - Implementing enhanced analysis with NLP
457
+ - Creating custom prompts
458
+ - Setting up advanced configurations
459
+ - Building web UI integrations
460
+ - Implementing visualization tools
461
+ - Connecting to external services
462
+ - Creating collaborative environments
463
+ - Separating test code
464
+ - Building reusable utilities
465
+
466
+ ## Attribution
467
+
468
+ This project is maintained by Sebastian Otaegui <feniix@gmail.com>.
469
+
470
+ It is based on the original [`arben-adm/mcp-sequential-thinking`](https://github.com/arben-adm/mcp-sequential-thinking) project by Arben Ademi. The original project is also licensed under the MIT License.
471
+
472
+ ## License
473
+
474
+ MIT License. See [LICENSE](LICENSE) for the full license text.
475
+
@@ -0,0 +1,13 @@
1
+ mcp_sequential_thinking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mcp_sequential_thinking/analysis.py,sha256=zGKZ3yOMoC1N2b3Jd_1ZH2YI7ufdhdTlyQHi_xj_JE8,8040
3
+ mcp_sequential_thinking/logging_conf.py,sha256=MrmuTh5TZ5FSVvwQZe60_TORquaRb3UI8B82dDt6cPI,577
4
+ mcp_sequential_thinking/models.py,sha256=3lr47aQKqX_FOHLKXWo4BQnhPvBv0BwSfK0rkGlkQls,7092
5
+ mcp_sequential_thinking/server.py,sha256=y6hAykncaqKVQuWWAS4W3OxsxiOrMMFZUUcat5IrL10,7130
6
+ mcp_sequential_thinking/storage.py,sha256=xywi4ka3-weIK7WGeMg7A9bvalM5yUiHyxw4nDpKhes,5370
7
+ mcp_sequential_thinking/storage_utils.py,sha256=NMOf6yyzMdw-EcU7JLKDew3z8v_QhOCrXyWyEB_9Pcc,3533
8
+ mcp_sequential_thinking/utils.py,sha256=eqfowFJ7_tZ_KreBXH9mmQruLubU1VKL2rBNgvwihvo,2175
9
+ sequential_thinking-0.6.0.dist-info/METADATA,sha256=VUCX_Y6THcdGI-nMa85mrtmYFFhe2FpRg8CKvuwUq-U,13948
10
+ sequential_thinking-0.6.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
11
+ sequential_thinking-0.6.0.dist-info/entry_points.txt,sha256=s1eGbdY_gDTswr80tt-CuXOrrTyfl5byj6fFX1QIqXo,80
12
+ sequential_thinking-0.6.0.dist-info/licenses/LICENSE,sha256=jHFWhlsN9RTrXuCAMmWAhOi_UjWMjDwz8BwBjwMrKxs,1105
13
+ sequential_thinking-0.6.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mcp-sequential-thinking = mcp_sequential_thinking.server:main
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sebastian Otaegui
4
+ Copyright (c) 2025 Arben Ademi
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.