Wisdom Layer MCP
by PV-Bhat
Verified
# Wisdom Layer MCP
A metacognitive advisor for Claude powered by LearnLM.
## Overview
The Wisdom Layer MCP is a specialized Model Context Protocol server designed to enhance Claude's reasoning capabilities. It creates a "wisdom layer" that acts as a strategic questioner, advisor, and complexity reducer for Claude, helping it to avoid recurring mistakes and achieve better results.
## Features
- **Strategic Metacognitive Advisor**: Analyzes Claude's thinking process and provides targeted advice
- **Plan Distillation**: Forces ultra-simplified summaries for clarity and focus
- **Mistake Tracking**: Learns from past mistakes to avoid future ones
- **LearnLM Integration**: Powered by Google's LearnLM/Gemini API for metacognitive guidance
## Tools
### 1. wisdom_advise
A constraint-free strategic advisor that works like a challenging mentor:
- Takes raw, unfiltered context to avoid Claude's cognitive biases
- Provides user alignment checks and complexity reduction
- Offers pattern-breaking questions and perspectives
- Suggests appropriate MCP tools to use
- Learns from past mistake patterns
```
<use_mcp_tool>
<server_name>wisdom</server_name>
<tool_name>wisdom_advise</tool_name>
<arguments>
{
"plan": "My current plan is...",
"userRequest": "Original request from user",
"thinkingLog": "Raw sequential thinking output",
"availableTools": ["tool1", "tool2"]
}
</arguments>
</use_mcp_tool>
```
### 2. wisdom_canvas
A distillation tool for final plans:
- Forces ultra-simplified plan representation
- Includes "why" section to justify approach
- Creates a checkpoint before implementation
- Serves as a reference during execution
```
<use_mcp_tool>
<server_name>wisdom</server_name>
<tool_name>wisdom_canvas</tool_name>
<arguments>
{
"plan": "Detailed plan to distill",
"userRequest": "Original request from user"
}
</arguments>
</use_mcp_tool>
```
### 3. wisdom_log
A mistake tracking system:
- One-sentence descriptions of mistakes made and corrected
- Categorizes and tallies recurring mistakes
- Creates a persistent learning feedback loop
- Read by LearnLM to provide targeted guidance
```
<use_mcp_tool>
<server_name>wisdom</server_name>
<tool_name>wisdom_log</tool_name>
<arguments>
{
"mistake": "One-sentence description of the mistake",
"category": "mistake-category",
"solution": "How it was corrected"
}
</arguments>
</use_mcp_tool>
```
## Installation
### Prerequisites
- Node.js (v18.0.0 or higher)
- npm (v7.0.0 or higher)
- A Gemini API key for LearnLM functionality
### Installation Steps
```bash
# Install globally
npm install -g wisdom-layer-mcp
# Or run directly
npx wisdom-layer-mcp
```
### MCP Configuration
Add the server to your MCP settings file. For Claude/Cline, this is typically located at:
- For Claude Desktop: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
- For VSCode Cline: `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` (Linux)
Add the following configuration:
```json
{
"mcpServers": {
"wisdom": {
"command": "wisdom-layer-mcp",
"args": [],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
},
"disabled": false,
"autoApprove": []
}
}
}
```
## Usage Pattern
The ideal usage pattern for Claude:
1. Claude uses sequential thinking to formulate an initial plan
2. Claude calls wisdom_advise with raw context
3. Claude refines its approach based on LearnLM's advice
4. Claude finalizes with wisdom_canvas for ultra-clarity
5. Claude implements the solution
6. Claude logs any lessons learned in wisdom_log
This creates a metacognitive layer that helps Claude think better about its own thinking.
## Development
```bash
# Clone the repository
git clone https://github.com/yourusername/wisdom-layer-mcp.git
cd wisdom-layer-mcp
# Install dependencies
npm install
# Build
npm run build
# Start development mode
npm run dev
```
## License
MIT