think-mcp-tool
v1.3.0
Published
An MCP server that provides a 'think' tool for structured reasoning, based on Anthropic's engineering research
Downloads
247
Maintainers
Readme
Think Tool MCP Server
Implementation of Anthropic's "think" tool as an MCP server — Structured reasoning that dramatically improves AI performance, with a hard rule that forces deep analysis on any problem with ≥ 3 parallel items.
What's in this server?
Two tools, served over stdio:
think— a structured-reasoning scratchpad. The model pauses, organizes its thoughts in Markdown headings + lists, then proceeds. No side effects; no new information fetched. Each call returns a short structure diagnostic (recorded id, detected sections, warnings) instead of echoing the thought — a feedback loop the model can use to self-correct.recall— revisit prior thoughts from the same session, ranked by keyword relevance, deduplicated, and budget-capped, so the model builds on earlier reasoning instead of repeating itself.
What's new in v1.3.0
think no longer echoes the full thought back — it returns a structure diagnostic instead (e.g. Thought #3 recorded (sections: Problem, Options, Decision). plus ⚠ warnings for missing Verification, single-option tradeoffs, duplicates, or unstructured prose). Input schemas and the string return type are unchanged, but this is a semantic change in what think returns: workflows that fed the echoed thought text into later steps must adapt (the thought itself is already in the tool-call input; retrieve stored thoughts via recall). recall now ranks results by term relevance (headings weighted higher), deduplicates repeated thoughts, and truncates long entries/output to protect the context window.
What is the Think Tool?
This MCP server implements the "think" tool that Anthropic introduced in their engineering blog post. The Think Tool provides AI assistants with a dedicated space for structured reasoning during complex problem-solving tasks, enabling more thoughtful, accurate, and reliable responses.
Proven Performance Benefits
Anthropic's research demonstrates remarkable improvements when using the "think" tool:
- 54% improvement in complex customer service tasks
- Significantly better adherence to detailed policies and guidelines
- Enhanced consistency across multiple trials of the same task
- Improved performance on software engineering benchmarks
- Minimal implementation overhead compared to other enhancement techniques
The "think" tool excels where other approaches fall short:
- Better than extended thinking for cases requiring complex tool chains
- More effective than baseline prompting for policy-heavy scenarios
- Especially powerful when paired with optimized prompting
Quick Install
Via npm (Recommended)
npx think-mcp-toolFor Claude Desktop
Add to your Claude Desktop configuration:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"think-tool": {
"command": "npx",
"args": ["think-mcp-tool"]
}
}
}For Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"think-tool": {
"command": "npx",
"args": ["think-mcp-tool"]
}
}
}For OpenCode
Add to your opencode.json:
{
"mcp": {
"think-tool": {
"command": "npx",
"args": ["think-mcp-tool"]
}
}
}How It Works
The "think" tool implements the mechanism described in Anthropic's engineering blog. Unlike extended thinking (which happens before the AI starts responding), the "think" tool allows the AI to pause and reflect during its response generation. The tool performs no external actions and retrieves no new information — it provides a dedicated scratchpad to reason step-by-step, which materially improves performance on complex tasks.
Feedback loop and relevance-ranked recall (v1.3.0)
Every think call is analyzed on the fly: the server detects ## sections, hashes the content, and returns a compact diagnostic — Thought #N recorded (sections: …) plus warnings such as missing Verification, a single option is not a tradeoff, duplicate of Thought #N, or unstructured prose. The model reads the diagnostic and fills the flagged gaps on non-trivial problems. recall scores stored thoughts per query term (word-boundary hits > substring hits, heading hits doubled), drops duplicates keeping the newest copy, truncates entries over 1500 characters, and caps total output at 10000 characters so retrieval never floods the context.
Hard rule: think before acting on ≥ 3 items
This server ships with a mandatory trigger. The model must call think before acting when any of these hold:
- ≥ 3 parallel items — options, candidates, files, fields, steps, search hits, errors (any countable set)
- ≥ 3 affected code points — files, functions, call sites, config keys
- A task that decomposes into ≥ 3 ordered steps
Counting rule: if unsure whether items are "parallel," trigger. Skipping this rule causes missed tradeoffs, missed call-site edits, and wrong step ordering. This rule is injected via the server's MCP instructions field and the think tool description, so any compliant client will see it automatically.
When else it helps (soft triggers)
Beyond the hard rule, think is valuable after non-trivial tool results, before writing or editing code, when verify fails (trace root cause), and before multi-file edits (plan order, gauge blast radius).
System Prompt for Optimal Results
Anthropic's research shows that combining the "think" tool with optimized prompting delivers the strongest performance improvements. This server already injects the prompt below via the MCP instructions field, so most clients (Claude Desktop, Cursor, OpenCode) pick it up automatically — if your client already surfaces MCP instructions, there is no need to paste this prompt again. Only if your client does not surface MCP instructions, paste this into your system prompt:
You have two structured-reasoning tools: think and recall.
## MUST think first (hard rule)
Call think before acting when ANY of these hold — no exceptions:
- ≥ 3 parallel items (options, candidates, files, fields, steps, search hits, errors)
- ≥ 3 affected code points (files, functions, call sites, config keys)
- Task decomposes into ≥ 3 ordered steps
Rule: count the items; ≥ 3 → trigger. When unsure if "parallel," trigger.
## Workflow
1. Complex task (≥ 3 items / multi-step / policy-heavy)?
2. recall first — check whether prior analysis already covers it.
3. think with structure (template below).
4. Read the returned diagnostic; fill flagged gaps if the problem is non-trivial.
5. Act.
## How to structure
Always Markdown headings + lists. No prose dumps. Template:
## Problem
One sentence.
## Constraints
- What's frozen
- Boundaries not to cross
## Options
1. Option A — one-line tradeoff
2. Option B — one-line tradeoff
## Decision
Which, and why.
## Verification
How to confirm correctness.
Skip irrelevant sections on simple problems. Core discipline: boxes, not mush.
## Anti-patterns
- Listing options without tradeoffs
- Deciding without Constraints
- Decision without Verification
- Re-thinking an already-analyzed problem (recall first)
- Stream-of-consciousness prose (no boxes, mush)
## When else to think (soft)
- After non-trivial tool results — assess before acting
- After search/API results — list findings, contradictions, next action
- Before writing/editing code — validate plan, list affected call sites
- Before execution — check each policy/constraint one by one
- When stuck or verify fails — trace root cause
- Before multi-file edits — plan order, gauge blast radius
## recall — revisit past thoughts
Use recall (short keyword queries like "constraint", "trade-off", "decision") to check if a problem was already analyzed, build on existing reasoning, or review the decision chain. Results are relevance-ranked and deduplicated.Manual Installation
If you prefer to run the server locally from source:
Clone the repository:
git clone https://github.com/LeXwDeX/think-mcp-server.git cd think-mcp-serverInstall dependencies:
npm installBuild and run:
npm run build npm start
Development
npm run dev # Hot-reload development mode
npm run build # Compile TypeScript
npm start # Run compiled output