quanticsoul4772/unified-thinking
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.
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) orsqlitesqlite_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 (trueorfalse)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)
-
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 } -
history - view thinking history
-
list-branches - list all branches
-
focus-branch - switch active branch
-
branch-history - get detailed branch history
-
recent-branches - get recently accessed branches
-
validate - validate thought logical consistency
-
prove - attempt to prove a logical conclusion
-
check-syntax - validate logical statement syntax
-
search - search thoughts
-
get-metrics - system performance and usage metrics
probabilistic reasoning tools (4 tools)
-
probabilistic-reasoning - bayesian inference and belief updates
{ "operation": "create|update|get|combine", "statement": "it will rain tomorrow", "prior_prob": 0.3 } -
assess-evidence - evidence quality assessment
-
detect-contradictions - find contradictions among thoughts
-
sensitivity-analysis - test robustness of conclusions
decision & problem-solving tools (3 tools)
-
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}] } -
decompose-problem - break down complex problems
-
verify-thought - verify thought validity and structure
metacognition tools (3 tools)
- self-evaluate - metacognitive self-assessment
- detect-biases - identify cognitive biases and logical fallacies
- detect-blind-spots - identify unknown unknowns and knowledge gaps
hallucination & calibration tools (4 tools)
- get-hallucination-report - retrieve hallucination detection reports
- record-prediction - record a prediction for calibration tracking
- record-outcome - record prediction outcomes
- get-calibration-report - retrieve confidence calibration analysis
perspective & temporal analysis tools (4 tools)
- analyze-perspectives - multi-stakeholder perspective analysis
- analyze-temporal - short-term vs long-term implications
- compare-time-horizons - compare across time horizons
- identify-optimal-timing - determine optimal decision timing
causal reasoning tools (5 tools)
- build-causal-graph - construct causal graphs from observations
- simulate-intervention - simulate interventions with do-calculus
- generate-counterfactual - generate "what if" scenarios
- analyze-correlation-vs-causation - distinguish correlation from causation
- get-causal-graph - retrieve previously built causal graph
integration & orchestration tools (6 tools)
- synthesize-insights - synthesize insights from multiple modes
- detect-emergent-patterns - detect patterns across reasoning modes
- execute-workflow - execute predefined multi-tool workflows
- list-workflows - list available automated workflows
- register-workflow - register custom workflows
- list-integration-patterns - discover integration patterns
dual-process reasoning tools (1 tool)
- dual-process-think - system 1 (fast) vs system 2 (deliberate) reasoning
{ "content": "problem to analyze", "force_system": "system1|system2" }
backtracking tools (3 tools)
- create-checkpoint - create reasoning checkpoint
- restore-checkpoint - restore from checkpoint
- list-checkpoints - list available checkpoints
abductive reasoning tools (2 tools)
- generate-hypotheses - generate explanatory hypotheses
- evaluate-hypotheses - evaluate hypothesis plausibility
case-based reasoning tools (2 tools)
- retrieve-similar-cases - retrieve similar cases from memory
- perform-cbr-cycle - execute full cbr cycle (retrieve, reuse, revise, retain)
symbolic reasoning tools (2 tools)
- prove-theorem - formal theorem proving
- check-constraints - check symbolic constraint satisfaction
enhanced tools (8 tools)
- find-analogy - find analogies between source and target domains for cross-domain reasoning
- apply-analogy - apply an existing analogy to a new context
- decompose-argument - break down arguments into premises, claims, assumptions, and inference chains
- generate-counter-arguments - generate counter-arguments using multiple strategies
- detect-fallacies - detect formal and informal logical fallacies (ad hominem, straw man, false dichotomy, etc.)
- process-evidence-pipeline - automatically update beliefs, causal graphs, and decisions from new evidence
- analyze-temporal-causal-effects - analyze temporal progression of causal effects (short/medium/long-term)
- analyze-decision-timing - determine optimal timing for decisions based on causal and temporal factors
episodic memory & learning tools (5 tools)
-
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 } -
complete-reasoning-session - complete session, calculate quality metrics, trigger pattern learning
-
get-recommendations - get adaptive recommendations based on similar past problems
-
search-trajectories - search past reasoning sessions to learn from successes and failures
-
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
| package | coverage | status |
|---|---|---|
internal/types | 100.0% | excellent |
internal/metrics | 100.0% | excellent |
internal/validation | 91.2% | excellent |
internal/metacognition | 90.2% | excellent |
internal/analysis | 89.3% | excellent |
internal/orchestration | 87.2% | excellent |
internal/reasoning | 86.5% | excellent |
internal/processing | 83.3% | excellent |
internal/integration | 82.2% | excellent |
internal/server/handlers | 81.2% | improved (+29.6%) |
internal/storage | 81.0% | excellent |
internal/modes | 77.8% | good |
internal/config | 64.5% | adequate |
internal/server | 45.5% | adequate |
cmd/server | 25.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
- check that go is installed:
go version - verify the binary was built: check
bin/directory - enable debug mode: set
debug=truein env
tools not appearing
- restart claude desktop completely
- check config file syntax
- 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=sqliteenvironment 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