A comprehensive Model Context Protocol (MCP) server that combines systematic thinking, mental models, debugging approaches, and stochastic algorithms for enhanced problem-solving capabilities. This server merges the functionality of Clear Thought and Stochastic Thinking servers into a unified cognitive toolkit.
- sequential_thinking - Dynamic multi-step thinking with revision support
- mental_model - Structured mental models for problem-solving
- debugging_approach - Systematic debugging methodologies
- stochastic_algorithm - Probabilistic algorithms for decision-making under uncertainty
- collaborative_reasoning - Multi-perspective collaborative problem solving
- decision_framework - Structured decision analysis and rational choice
- metacognitive_monitoring - Self-assessment of knowledge and reasoning quality
- scientific_method - Formal hypothesis testing and experimentation
- structured_argumentation - Dialectical reasoning and argument analysis
- visual_reasoning - Diagram-based thinking and problem solving
Markov Decision Processes: Sequential decision-making with clear state transitions and defined rewards.
Monte Carlo Tree Search: Game playing, strategic planning, large decision spaces where simulation is possible.
Multi-Armed Bandit: A/B testing, resource allocation, online advertising, quick adaptation needs.
Bayesian Optimization: Hyperparameter tuning, expensive function optimization, continuous parameter spaces.
Hidden Markov Models: Time series analysis, pattern recognition, state inference, sequential data modeling.
To install Thinking Patterns MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @emmahyde/thought-patterns --client claude
npm install @emmahyde/thought-patterns
Or run with npx:
npx @emmahyde/thinking-patterns
Build the Docker image:
docker build -t emmahyde/thinking-patterns .
Run the container:
docker run -it emmahyde/thinking-patterns
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
npm start
const response = await mcp.callTool("mental_model", {
modelName: "first_principles",
problem: "How to implement a new feature?",
steps: [
"Break down the problem",
"Analyze components",
"Build solution"
]
});
const response = await mcp.callTool("sequential_thinking", {
thought: "Initial analysis of the problem",
thoughtNumber: 1,
totalThoughts: 3,
nextThoughtNeeded: true
});
// Markov Decision Process
const response = await mcp.callTool("stochastic_algorithm", {
algorithm: "mdp",
problem: "Optimize robot navigation policy",
parameters: {
states: 100,
actions: ["up", "down", "left", "right"],
gamma: 0.9,
learningRate: 0.1
}
});
// Monte Carlo Tree Search
const response = await mcp.callTool("stochastic_algorithm", {
algorithm: "mcts",
problem: "Find optimal game moves",
parameters: {
simulations: 1000,
explorationConstant: 1.4,
maxDepth: 10
}
});
const response = await mcp.callTool("debugging_approach", {
approachName: "binary_search",
issue: "Performance degradation in the system",
steps: [
"Identify performance metrics",
"Locate bottleneck",
"Implement solution"
]
});
const response = await mcp.callTool("collaborative_reasoning", {
topic: "System architecture decision",
personas: [
{
id: "architect",
name: "Senior Architect",
expertise: ["distributed systems", "scalability"],
background: "10+ years in system design",
perspective: "Long-term maintainability focus",
biases: ["over-engineering"],
communication: { style: "analytical", tone: "measured" }
}
],
contributions: [],
stage: "problem-definition",
activePersonaId: "architect",
sessionId: "session-1",
iteration: 1,
nextContributionNeeded: true
});
const response = await mcp.callTool("decision_framework", {
decisionContext: "Selecting a cloud provider",
options: ["AWS", "GCP", "Azure"],
criteria: ["cost", "scalability", "support"],
weights: { cost: 0.5, scalability: 0.3, support: 0.2 },
rationale: "Prioritize cost and scalability for a startup."
});
const response = await mcp.callTool("metacognitive_monitoring", {
task: "Code review for critical bug fix",
confidenceLevel: 0.7,
knowledgeGaps: ["edge case handling"],
reflection: "Need to double-check concurrency issues."
});
const response = await mcp.callTool("scientific_method", {
hypothesis: "Increasing cache size will improve response time",
experiment: {
control: { cacheSize: 128 },
variant: { cacheSize: 512 },
metric: "averageResponseTime"
},
results: null,
nextStep: "Run A/B test and collect data"
});
const response = await mcp.callTool("structured_argumentation", {
claim: "Microservices are better than monoliths for scaling",
argumentsFor: ["Independent deployment", "Fault isolation"],
argumentsAgainst: ["Increased complexity", "Operational overhead"],
conclusion: null
});
const response = await mcp.callTool("visual_reasoning", {
problem: "Optimize network topology",
diagramType: "graph",
nodes: ["A", "B", "C", "D"],
edges: [
{ from: "A", to: "B" },
{ from: "B", to: "C" },
{ from: "C", to: "D" },
{ from: "A", to: "D" }
],
transformation: "minimize total edge length"
});
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.
- Based on the clear-thought server, which is based on the Model Context Protocol (MCP) by Anthropic
- Combines functionality from Clear Thought and Stochastic Thinking MCP servers
- Mental Models framework inspired by James Clear's comprehensive guide to mental models
- Stochastic algorithms based on classic works in reinforcement learning and decision theory