unified-thinking

quanticsoul4772/unified-thinking

3.3

If you are the rightful owner of unified-thinking and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Unified Thinking Server is a comprehensive MCP server that consolidates multiple cognitive thinking patterns into a single, efficient Go-based server.

Tools
5
Resources
0
Prompts
0

unified thinking server

a model context protocol (mcp) server that consolidates multiple cognitive thinking patterns into a single, efficient go-based implementation.

features

thinking modes

  • linear mode: sequential step-by-step reasoning for systematic problem solving
  • tree mode: multi-branch parallel exploration with insights and cross-references
  • divergent mode: creative/unconventional ideation with "rebellion" capability
  • reflection mode: metacognitive reflection on previous reasoning with insight extraction
  • backtracking mode: checkpoint-based reasoning with ability to restore previous states
  • auto mode: automatic mode selection based on input content

core capabilities

  • multi-mode thinking (linear, tree, divergent, reflection, backtracking, auto)
  • branch management and exploration
  • insight generation and tracking
  • cross-reference support between branches
  • logical validation and consistency checking
  • formal proof attempts with universal instantiation
  • syntax validation for logical statements
  • search across all thoughts with full-text indexing
  • full history tracking with branch ancestry
  • checkpoint creation and restoration
  • optional persistence with sqlite (in-memory by default)

advanced cognitive reasoning

the server includes 63 specialized tools across 13 major categories:

probabilistic reasoning (4 tools)
  • bayesian inference with prior and posterior belief updates
  • evidence-based probability updates with quality assessment
  • belief combination operations (and/or logic)
  • confidence estimation from evidence aggregation
causal reasoning (5 tools)
  • causal graph construction from observations
  • intervention simulation using do-calculus
  • counterfactual scenario generation
  • correlation vs causation analysis
  • graph retrieval and inspection
decision support (3 tools)
  • multi-criteria decision analysis with weighted scoring
  • problem decomposition into manageable subproblems
  • sensitivity analysis for robustness testing
advanced reasoning modes (9 tools)
  • dual-process reasoning (system 1 fast intuition vs system 2 deliberate analysis)
  • abductive reasoning (hypothesis generation and evaluation)
  • case-based reasoning (similarity retrieval and adaptation)
  • symbolic constraint solving with inequality detection
metacognition (3 tools)
  • self-evaluation of thought quality, completeness, and coherence
  • cognitive bias detection (confirmation, anchoring, availability, sunk cost, overconfidence, recency, groupthink)
  • unknown unknowns detection (identifying knowledge gaps and blind spots)
analysis tools (8 tools)
  • contradiction detection across thoughts
  • multi-perspective stakeholder analysis
  • temporal reasoning (short-term vs long-term implications)
  • evidence quality assessment with reliability scoring
  • hallucination detection and reporting
  • confidence calibration tracking
integration & orchestration (6 tools)
  • cross-mode insight synthesis
  • emergent pattern detection across reasoning modes
  • workflow execution for automated multi-tool pipelines
  • custom workflow registration
  • integration pattern discovery
validation & logic (4 tools)
  • logical consistency validation
  • formal proof attempts (modus ponens, modus tollens, universal instantiation, etc.)
  • logical statement syntax checking
  • theorem proving with constraint checking
enhanced tools (8 tools)
  • cross-domain analogical reasoning (find and apply analogies)
  • argument decomposition (premises, claims, assumptions, inference chains)
  • counter-argument generation using multiple strategies
  • fallacy detection (formal and informal logical fallacies)
  • evidence pipeline integration (auto-update beliefs/graphs/decisions)
  • temporal-causal effect analysis (short/medium/long-term impacts)
  • decision timing optimization based on causal factors
episodic memory & learning (5 tools)
  • reasoning session tracking (build complete trajectory from problem to solution)
  • pattern learning (recognizes successful approaches across sessions)
  • adaptive recommendations (suggests proven strategies based on similar past problems)
  • trajectory search (learn from historical successes and failures)
  • retrospective analysis (comprehensive post-session analysis with actionable improvements)

installation

prerequisites

  • go 1.23 or higher
  • git

build

go mod download
go build -o bin/unified-thinking.exe ./cmd/server

or using make:

make build

documentation

comprehensive documentation is available:

  • - complete reference for all 63 mcp tools with parameters, examples, and response formats
  • - visual representations of system architecture, data flows, and component interactions
  • - comprehensive project structure, architecture, and component overview
  • - end-to-end validation results and production readiness certification
  • - detailed technical architecture and implementation guide

configuration

basic configuration (in-memory)

add to your claude desktop config (%appdata%\claude\claude_desktop_config.json on windows):

{
  "mcpservers": {
    "unified-thinking": {
      "command": "/path/to/unified-thinking/bin/unified-thinking.exe",
      "transport": "stdio",
      "env": {
        "debug": "true"
      }
    }
  }
}

configuration with sqlite persistence

for persistent storage across sessions:

{
  "mcpservers": {
    "unified-thinking": {
      "command": "/path/to/unified-thinking/bin/unified-thinking.exe",
      "transport": "stdio",
      "env": {
        "debug": "true",
        "storage_type": "sqlite",
        "sqlite_path": "c:\\users\\yourname\\appdata\\roaming\\claude\\unified-thinking.db",
        "storage_fallback": "memory"
      }
    }
  }
}

environment variables:

  • storage_type: memory (default) or sqlite
  • sqlite_path: path to sqlite database file (created automatically)
  • sqlite_timeout: connection timeout in milliseconds (default: 5000)
  • storage_fallback: storage to use if primary fails (e.g., memory)
  • debug: enable debug logging (true or false)
  • auto_validation_threshold: confidence threshold for auto-validation (default: 0.5)

after saving the config, restart claude desktop.

available tools (63 total)

core thinking tools (11 tools)

  1. think - main thinking tool

    {
      "content": "your thinking prompt",
      "mode": "auto|linear|tree|divergent|reflection|backtracking",
      "confidence": 0.8,
      "key_points": ["point1", "point2"],
      "require_validation": true
    }
    
  2. history - view thinking history

  3. list-branches - list all branches

  4. focus-branch - switch active branch

  5. branch-history - get detailed branch history

  6. recent-branches - get recently accessed branches

  7. validate - validate thought logical consistency

  8. prove - attempt to prove a logical conclusion

  9. check-syntax - validate logical statement syntax

  10. search - search thoughts

  11. get-metrics - system performance and usage metrics

probabilistic reasoning tools (4 tools)

  1. probabilistic-reasoning - bayesian inference and belief updates

    {
      "operation": "create|update|get|combine",
      "statement": "it will rain tomorrow",
      "prior_prob": 0.3
    }
    
  2. assess-evidence - evidence quality assessment

  3. detect-contradictions - find contradictions among thoughts

  4. sensitivity-analysis - test robustness of conclusions

decision & problem-solving tools (3 tools)

  1. make-decision - multi-criteria decision analysis

    {
      "question": "which option should we choose?",
      "options": [{"name": "option a", "scores": {"cost": 0.8}}],
      "criteria": [{"name": "cost", "weight": 0.6, "maximize": false}]
    }
    
  2. decompose-problem - break down complex problems

  3. verify-thought - verify thought validity and structure

metacognition tools (3 tools)

  1. self-evaluate - metacognitive self-assessment
  2. detect-biases - identify cognitive biases and logical fallacies
  3. detect-blind-spots - identify unknown unknowns and knowledge gaps

hallucination & calibration tools (4 tools)

  1. get-hallucination-report - retrieve hallucination detection reports
  2. record-prediction - record a prediction for calibration tracking
  3. record-outcome - record prediction outcomes
  4. get-calibration-report - retrieve confidence calibration analysis

perspective & temporal analysis tools (4 tools)

  1. analyze-perspectives - multi-stakeholder perspective analysis
  2. analyze-temporal - short-term vs long-term implications
  3. compare-time-horizons - compare across time horizons
  4. identify-optimal-timing - determine optimal decision timing

causal reasoning tools (5 tools)

  1. build-causal-graph - construct causal graphs from observations
  2. simulate-intervention - simulate interventions with do-calculus
  3. generate-counterfactual - generate "what if" scenarios
  4. analyze-correlation-vs-causation - distinguish correlation from causation
  5. get-causal-graph - retrieve previously built causal graph

integration & orchestration tools (6 tools)

  1. synthesize-insights - synthesize insights from multiple modes
  2. detect-emergent-patterns - detect patterns across reasoning modes
  3. execute-workflow - execute predefined multi-tool workflows
  4. list-workflows - list available automated workflows
  5. register-workflow - register custom workflows
  6. list-integration-patterns - discover integration patterns

dual-process reasoning tools (1 tool)

  1. dual-process-think - system 1 (fast) vs system 2 (deliberate) reasoning
    {
      "content": "problem to analyze",
      "force_system": "system1|system2"
    }
    

backtracking tools (3 tools)

  1. create-checkpoint - create reasoning checkpoint
  2. restore-checkpoint - restore from checkpoint
  3. list-checkpoints - list available checkpoints

abductive reasoning tools (2 tools)

  1. generate-hypotheses - generate explanatory hypotheses
  2. evaluate-hypotheses - evaluate hypothesis plausibility

case-based reasoning tools (2 tools)

  1. retrieve-similar-cases - retrieve similar cases from memory
  2. perform-cbr-cycle - execute full cbr cycle (retrieve, reuse, revise, retain)

symbolic reasoning tools (2 tools)

  1. prove-theorem - formal theorem proving
  2. check-constraints - check symbolic constraint satisfaction

enhanced tools (8 tools)

  1. find-analogy - find analogies between source and target domains for cross-domain reasoning
  2. apply-analogy - apply an existing analogy to a new context
  3. decompose-argument - break down arguments into premises, claims, assumptions, and inference chains
  4. generate-counter-arguments - generate counter-arguments using multiple strategies
  5. detect-fallacies - detect formal and informal logical fallacies (ad hominem, straw man, false dichotomy, etc.)
  6. process-evidence-pipeline - automatically update beliefs, causal graphs, and decisions from new evidence
  7. analyze-temporal-causal-effects - analyze temporal progression of causal effects (short/medium/long-term)
  8. analyze-decision-timing - determine optimal timing for decisions based on causal and temporal factors

episodic memory & learning tools (5 tools)

  1. start-reasoning-session - start tracking a reasoning session to build episodic memory

    {
      "session_id": "debug_2024_001",
      "description": "optimize database query performance",
      "goals": ["reduce query time", "improve user experience"],
      "domain": "software-engineering",
      "complexity": 0.6
    }
    
  2. complete-reasoning-session - complete session, calculate quality metrics, trigger pattern learning

  3. get-recommendations - get adaptive recommendations based on similar past problems

  4. search-trajectories - search past reasoning sessions to learn from successes and failures

  5. analyze-trajectory - perform retrospective analysis of completed session (strengths, weaknesses, improvements)

architecture

unified-thinking/
ā”œā”€ā”€ cmd/server/             # main entry point
ā”œā”€ā”€ internal/
│   ā”œā”€ā”€ types/              # core data structures (50+ types)
│   ā”œā”€ā”€ storage/            # pluggable storage (memory/sqlite)
│   │   ā”œā”€ā”€ memory.go       # in-memory implementation
│   │   ā”œā”€ā”€ sqlite.go       # sqlite with write-through cache
│   │   ā”œā”€ā”€ factory.go      # storage factory pattern
│   │   └── config.go       # configuration management
│   ā”œā”€ā”€ modes/              # thinking mode implementations
│   │   ā”œā”€ā”€ linear.go       # sequential reasoning
│   │   ā”œā”€ā”€ tree.go         # parallel exploration
│   │   ā”œā”€ā”€ divergent.go    # creative ideation
│   │   ā”œā”€ā”€ reflection.go   # metacognitive reflection
│   │   ā”œā”€ā”€ backtracking.go # checkpoint-based reasoning
│   │   └── auto.go         # automatic mode selection
│   ā”œā”€ā”€ processing/         # dual-process reasoning
│   │   └── dual_process.go # system 1/2 executor
│   ā”œā”€ā”€ reasoning/          # probabilistic, causal, temporal
│   │   ā”œā”€ā”€ probabilistic.go    # bayesian inference
│   │   ā”œā”€ā”€ causal.go           # pearl's causal framework
│   │   ā”œā”€ā”€ temporal.go         # temporal analysis
│   │   ā”œā”€ā”€ abductive.go        # hypothesis generation
│   │   └── case_based.go       # cbr implementation
│   ā”œā”€ā”€ analysis/           # evidence, contradiction, perspective
│   ā”œā”€ā”€ metacognition/      # self-eval, bias detection, unknown unknowns
│   ā”œā”€ā”€ validation/         # logic validation, fallacy detection, symbolic
│   ā”œā”€ā”€ integration/        # cross-mode synthesis
│   ā”œā”€ā”€ orchestration/      # workflow automation
│   ā”œā”€ā”€ memory/             # episodic memory and pattern learning
│   │   ā”œā”€ā”€ episodic.go     # reasoning trajectory storage
│   │   ā”œā”€ā”€ learning.go     # pattern recognition
│   │   └── retrospective.go # post-session analysis
│   └── server/             # mcp server implementation
│       └── handlers/       # specialized tool handlers (21 files)

cognitive architecture

the server implements a modular cognitive architecture with specialized packages:

  • modes: six thinking modes (linear, tree, divergent, reflection, backtracking, auto)
  • processing: dual-process reasoning (fast intuitive vs slow deliberate)
  • reasoning: probabilistic inference, causal analysis, temporal reasoning, abductive inference, case-based reasoning
  • analysis: evidence assessment, contradiction detection, perspective analysis, sensitivity testing
  • metacognition: self-evaluation, bias detection, unknown unknowns identification
  • validation: logical validation, fallacy detection, symbolic constraint solving
  • integration: cross-mode synthesis and emergent pattern detection
  • orchestration: automated multi-tool workflow execution
  • memory: episodic memory for session tracking, pattern learning, and adaptive recommendations

all components are thread-safe, composable, and maintain backward compatibility.

development

build

# build the server binary
make build

# clean build artifacts
make clean

testing

# run all tests
make test

# run with verbose output
go test -v ./...

# run with coverage
make test-coverage

# run benchmarks
make benchmark

test coverage: ~75% overall | 415 tests | 100% pass rate

coverage by package

packagecoveragestatus
internal/types100.0%excellent
internal/metrics100.0%excellent
internal/validation91.2%excellent
internal/metacognition90.2%excellent
internal/analysis89.3%excellent
internal/orchestration87.2%excellent
internal/reasoning86.5%excellent
internal/processing83.3%excellent
internal/integration82.2%excellent
internal/server/handlers81.2%improved (+29.6%)
internal/storage81.0%excellent
internal/modes77.8%good
internal/config64.5%adequate
internal/server45.5%adequate
cmd/server25.0%expected (entry point)

recent improvements:

  • handlers package: 51.6% → 81.2% (+29.6 percentage points)
  • 100+ new test cases across 7 test files
  • comprehensive edge case coverage
  • zero test failures (415/415 passing)

troubleshooting

server won't start

  1. check that go is installed: go version
  2. verify the binary was built: check bin/ directory
  3. enable debug mode: set debug=true in env

tools not appearing

  1. restart claude desktop completely
  2. check config file syntax
  3. verify the executable path is correct

performance issues

in-memory mode (default):

  • data is lost on server restart
  • for long sessions, consider periodic restarts
  • monitor memory usage if processing thousands of thoughts

sqlite mode (persistent):

  • data persists across restarts
  • uses write-through caching for fast access
  • automatic memory management via cache eviction
  • enable with storage_type=sqlite environment variable

technical details

key features

  • 63 specialized mcp tools across 13 categories
  • 6 thinking modes with automatic mode selection
  • dual-process reasoning (fast vs slow thinking)
  • checkpoint-based backtracking
  • probabilistic bayesian inference
  • causal reasoning with do-calculus
  • abductive hypothesis generation
  • case-based reasoning
  • symbolic constraint solving
  • hallucination detection
  • confidence calibration tracking
  • unknown unknowns detection
  • workflow orchestration for multi-tool automation
  • episodic memory with session tracking and pattern learning
  • adaptive recommendations based on historical reasoning sessions
  • retrospective analysis for continuous improvement
  • pluggable storage (in-memory or sqlite)
  • thread-safe operations
  • comprehensive test coverage

implementation highlights

  • modular package design for composability
  • interface-based architecture for testability
  • builder patterns for complex object construction
  • write-through caching for sqlite performance
  • fts5 full-text search
  • wal mode for concurrent database reads
  • automatic schema migrations
  • graceful fallback handling
  • resource limits to prevent dos

license

mit license