Retrieval Augmented Thinking (RAT) MCP Server is a reasoning tool for Claude that processes structured thoughts with metrics, branching, and revision capabilities. It helps organize and enhance analytical thinking by tracking thought sequences and providing metrics on your reasoning process.
git clone https://github.com/stat-guy/retrieval-augmented-thinking.git
cd retrieval-augmented-thinking
npm install -g .
Test that the installation worked correctly:
npx mcp-server-rat-node --help
If you see RAT MCP Server (Node.js) running on stdio
, your installation is ready!
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"retrieval-augmented-thinking": {
"command": "npx",
"args": ["mcp-server-rat-node"]
}
}
}
After adding the configuration, restart Claude Desktop to load the RAT server.
The server provides a single rat
tool for processing structured thoughts:
{
"thought": "I need to analyze this problem step by step...",
"nextThoughtNeeded": true,
"thoughtNumber": 1,
"totalThoughts": 3
}
{
"thought": "Let me reconsider my previous analysis...",
"nextThoughtNeeded": false,
"thoughtNumber": 2,
"totalThoughts": 3,
"isRevision": true,
"revisesThought": 1
}
{
"thought": "Alternative approach: what if we consider...",
"nextThoughtNeeded": true,
"thoughtNumber": 2,
"totalThoughts": 4,
"branchFromThought": 1,
"branchId": "alt-path-1"
}
thought
(string): The thought content to processnextThoughtNeeded
(boolean): Whether another thought is needed to continuethoughtNumber
(integer): Current thought number in the sequencetotalThoughts
(integer): Total expected thoughts (adjustable)isRevision
(boolean): Whether this revises a previous thoughtrevisesThought
(integer): The thought number being revisedbranchFromThought
(integer): Thought number to branch frombranchId
(string): Unique identifier for this branchneedsMoreThoughts
(boolean): Extend beyond totalThoughts if needed{
"thought_number": 1,
"total_thoughts": 3,
"metrics": {
"complexity": 0.342,
"depth": 0.521,
"quality": 0.643,
"impact": 0.289,
"confidence": 0.758
},
"analytics": {
"total_thoughts": 5,
"average_quality": 0.612,
"chain_effectiveness": 0.145
},
"next_thought_needed": true,
"visual_output": "āā š Thought 1/3 āāāāāāāāāāāāāāāāāā\\nā Analysis shows clear patterns... ā\\nāā Metrics āāāāāāāāāāāāāāāāāāāāāāā¤\\nā Quality: 0.64 | Impact: 0.29... ā\\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā"
}
If you encounter installation problems:
npm install -g git+https://github.com/stat-guy/retrieval-augmented-thinking.git
chmod +x $(npm bin -g)/mcp-server-rat-node
Before configuring Claude Desktop, always verify the installation:
npx mcp-server-rat-node --help
If this shows "RAT MCP Server (Node.js) running on stdio", you're ready to configure Claude Desktop.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "retrieval-augmented-thinking" '{"command":"npx","args":["mcp-server-rat-node"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"retrieval-augmented-thinking": {
"command": "npx",
"args": [
"mcp-server-rat-node"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"retrieval-augmented-thinking": {
"command": "npx",
"args": [
"mcp-server-rat-node"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect