MCP server for meta-cognitive reasoning strategies and problem resolution.
npm install metacogMulti-strategy reasoning and problem-solving server implementing the Model Context Protocol. Provides structured cognitive processing with 20+ reasoning strategies, cognitive state management, and unified reasoning chains.
The MetaCognition MCP Server orchestrates multiple reasoning strategies for complex problem-solving and analysis. It manages reasoning chains, cognitive states, and provides tools for autonomous decision-making, debugging, research, and optimization.
- Multi-Strategy Reasoning: 20+ specialized strategies including Abductive, Bayesian, Causal, Sequential, Financial, and Ethical reasoning
- Cognitive State Management: Parallel hypothesis exploration with superposition states and resolution mechanisms
- Reasoning Chain Orchestration: Sequential strategy execution with convergence optimization
- Thought Management: Dynamic branching, revision, and refinement of reasoning paths
- MCP Protocol Compliance: Full WebSocket/stdio transport integration
| Tool | Function |
|------|----------|
| metacognition | Multi-strategy reasoning and cognitive state management |
| autonomous | Decision engine with comprehensive strategy orchestration |
| debugger | Code analysis and error resolution |
| markdown_master | Markdown content creation and refactoring |
| research_pro | Research synthesis with online search integration |
| deep_analysis | Codebase and system analysis |
| optimus_prime | Performance and resource optimization |
| wildcard | Dynamic strategy selection |
Logical: Abductive, Deductive, Inductive, Analogical, ForwardChaining, BackwardChaining, Defeasible
Probabilistic: Bayesian, FuzzyLogic
Structural: PatternAnalysis, ConstraintSatisfaction
Causal: Causal, Counterfactual, Empirical
Specialized: Financial, Ethical, Sequential, CaseBased, HypothesisGeneration
Control: MetacognitiveControl
``bash`
npm install @modelcontextprotocol/metacog
npm run build
npm start
`bash`
docker build -t mcp/metacog
docker run --rm -i mcp/metacog
`json`
{
"mcpServers": {
"metacognition": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/metacog"]
}
}
}
`json`
{
"mcp": {
"servers": {
"metacognition": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/metacog"]
}
}
}
}
`json`
{
"thought": "Analyzing market data for trend identification",
"thoughtNumber": 1,
"totalThoughts": 3,
"nextThoughtNeeded": true,
"strategy": "Bayesian",
"strategy_input_data": {
"prior": 0.6,
"evidence_threshold": 0.8
}
}
`json`
{
"thought": "Exploring multiple causal hypotheses",
"thoughtNumber": 1,
"totalThoughts": 4,
"nextThoughtNeeded": true,
"cognitive_superposition_concepts": [
"supply chain disruption",
"demand fluctuation",
"competitive pressure",
"regulatory changes"
]
}
`json`
{
"thought": "Comprehensive problem analysis",
"thoughtNumber": 1,
"totalThoughts": 1,
"nextThoughtNeeded": false,
"unified_reasoning_chain": true,
"strategies": ["Causal", "Bayesian", "Sequential"],
"convergence_target": 0.95,
"cognitive_enhancement": true
}
- thought (string): Current reasoning step or analysisthoughtNumber
- (integer): Current step numbertotalThoughts
- (integer): Estimated total steps (adjustable)nextThoughtNeeded
- (boolean): Whether additional steps are required
- cognitive_superposition_concepts (array): Create parallel hypothesis statescognitive_resolve_state_id
- (string): Collapse superposition to single conceptstrategy
- (enum): Select specific reasoning strategyunified_reasoning_chain
- (boolean): Execute multi-strategy reasoningconvergence_target
- (number): Target confidence level (0.0-1.0)
Different strategies accept specific input parameters via strategy_input_data:
- Bayesian: { prior: number, evidence_threshold: number }{ cause: string, effect: string }
- Causal: { original_condition: string, altered_condition: string }
- Counterfactual: { market_data: object, risk_tolerance: number }
- Financial: { time_horizon: string, world_branches: boolean }
- Sequential:
- DISABLE_THOUGHT_LOGGING: Disable console output of reasoning stepsCOGNITIVE_ENHANCEMENT
- : Enable/disable cognitive superposition featuresCONVERGENCE_TARGET
- : Default convergence threshold for reasoning chains
- Node.js 18+
- TypeScript 4.9+
`bash`
npm install
npm run build
npm test
`bash``
npm run test:strategies # Strategy validation
npm run test:cognitive # Cognitive features
npm run benchmark # Performance tests
MIT & Apache-2.0