<div align="center">
# π§ Think MCP
**Structured Sequential Thinking Server for LLMs**
[](https://www.npmjs.com/package/@gofman3/think-mcp)
[](https://opensource.org/licenses/MIT)
[](https://modelcontextprotocol.io/)
<p align="center">
<b>Break down complex problems. Branch out ideas. Remember insights.</b><br>
Designed for LLMs to think deeper, smarter, and more efficiently.
</p>
[Quick Start](#-quick-start) β’ [Tools](#-tools-reference) β’ [Features](#-features) β’ [Changelog](#-changelog)
</div>
---
## π Overview
**Think MCP** transforms how LLMs approach problem-solving. It's not just a tool; it's a cognitive framework that enables:
- **Sequential Reasoning**: Step-by-step problem decomposition.
- **Branching & Revision**: Ability to backtrack, fork thoughts, and correct mistakes.
- **Deep Analysis**: Built-in methodology generator for rigorous code and logic auditing.
- **Long-term Memory**: Cross-session recall of insights and dead ends.
---
## β¨ Features
| Feature | Description |
| :--- | :--- |
| **π Efficient Thinking** | **Imperative Prompts (v5.1)** reduce token usage by ~55% using IF/THEN logic. |
| **β‘οΈ Burst Mode** | Submit up to **30 thoughts** in a single API call with `think_batch`. |
| **π§ Methodology Generator** | On-demand deep analysis frameworks (Chain Mapping, Crack Hunting, etc.) via `think_logic`. |
| **πΎ Smart Memory** | Cross-session learning via `think_recall` and auto-save with 24h retention. |
| **π Nudge System** | Proactive micro-prompts to detect low confidence, tunnel vision, or missed steps. |
| **π³ Branching** | Explore alternative paths without losing context. |
---
## π Quick Start
### Installation
```bash
npx @gofman3/think-mcp
```
### MCP Configuration
Add this to your MCP settings file:
```json
{
"mcpServers": {
"think": {
"command": "npx",
"args": ["-y", "@gofman3/think-mcp"]
}
}
}
```
---
## π οΈ Tools Reference
### 1. `think`
*The core unit of reasoning.* Adds a single thought to the chain.
```typescript
{
thought: string, // The reasoning content
thoughtNumber: number, // Current step index
totalThoughts: number, // Estimated total steps
nextThoughtNeeded: boolean, // Is the chain complete?
confidence?: number, // Score 1-10
goal?: string, // Required for the first thought
subSteps?: string[], // Breakdown of current step (max 5)
alternatives?: string[], // Other approaches considered (max 5)
quickExtension?: { // Immediate micro-actions
type: 'critique' | 'elaboration' | 'correction' | 'innovation' | 'polish',
content: string,
impact?: 'low' | 'medium' | 'high' | 'blocker'
},
isRevision?: boolean, // Is this correcting a previous step?
revisesThought?: number, // Which step is being fixed?
branchId?: string // For branching paths
}
```
### 2. `think_batch`
*High-velocity reasoning.* Submit a complete chain (1-30 thoughts) at once.
> **β οΈ Constraints**
> - `IF similarity > 60%` β Reject ("Stagnation")
> - `IF thought < 50 chars` β Reject ("Too short")
> - `IF avg_confidence < 4` β Warning issued
```typescript
{
goal: string, // Min 10 chars
thoughts: Array<{ // List of thought objects
thoughtNumber: number,
thought: string, // 50-1000 chars
confidence?: number,
// ... other standard fields
}>,
consolidation?: {
winningPath: number[],
summary: string,
verdict: 'ready' | 'needs_more_work'
}
}
```
### 3. `think_logic`
*The Architect.* Generates a strict thinking methodology for complex analysis.
**Output Phases:** `CHAIN MAPPING` β `CRACK HUNTING` β `STANDARD BENCHMARK` β `ACTION PLANNING`
```typescript
{
target: string, // The subject of analysis (Min 10 chars)
depth?: 'quick' | 'standard' | 'deep',
focus?: ('security' | 'performance' | 'reliability' | 'ux' | 'data-flow')[],
stack?: ('nestjs' | 'react' | 'redis' | 'nextjs' | /* etc */)[]
}
```
### 4. `think_recall`
*The Memory Bank.* Search current session or past insights.
**Best Practices:**
- `BEFORE complex_task` β Check `scope: 'insights'`
- `IF repeating_logic` β Check for dead ends
- `IF unsure` β Verify context
```typescript
{
query: string,
scope?: 'session' | 'insights',
searchIn?: 'thoughts' | 'extensions' | 'alternatives' | 'all',
limit?: number
}
```
### 5. `think_done` & `think_reset`
- **`think_done`**: Finalize session. Validates gaps, blockers, and confidence levels.
- **`think_reset`**: Wipe the slate clean. *(Use only if task context changes completely).*
---
## π‘ Intelligent Systems
### The Nudge System
*The server watches your back.*
| Trigger Pattern | System Nudge |
| :--- | :--- |
| `confidence < 5` | "Low confidence. Validate?" |
| `3+ thoughts` w/o alternatives | "No alternatives. Tunnel vision?" |
| Complex goal w/o subSteps | "Complex goal, no breakdown. Decompose?" |
| Unresolved blocker | "Blocker unresolved. Fix first." |
### Complexity Budget
*Recommended tool usage based on task size.*
| Task Difficulty | Thoughts | Recommended Tool |
| :--- | :--- | :--- |
| **Simple** | 0-2 | *Skip (Direct Answer)* |
| **Medium** | 3-7 | `think` (Step-by-step) |
| **Complex** | 8-30 | `think_batch` (Burst mode) |
---
## π Changelog
<details open>
<summary><b>v5.1.0 (Current)</b></summary>
- **Imperative Prompts**: Switched to IF/THEN style instructions.
- **Performance**: ~55% Token Reduction per request.
- **Optimization**: Faster parsing, less LLM overhead.
</details>
<details>
<summary><b>v5.0.0</b></summary>
- **New Tool**: `think_logic` for generating methodologies.
- **Framework**: Added 4-phase analysis (Mapping, Cracking, Benchmarking, Planning).
</details>
<details>
<summary><b>v4.x.x History</b></summary>
- **v4.6.0**: Added NudgeService for proactive prompts.
- **v4.5.0**: Renamed to `think`, added Cross-session insights.
- **v4.1.0**: Introduced Burst Thinking (`think_batch`).
</details>
---
<div align="center">
<sub>MIT License β’ Created by @gofman3</sub>
</div>