map-think-do is an MCP server that exposes a single map-think-do tool for structured problem solving. It supports linear reasoning, revisions, branching, prompt templates, persisted memory, and a set of heuristic cognitive signals such as bias detection and recommendation generation.
This project is experimental software. It uses cognitive and persona-oriented language in parts of the codebase, but it should be understood as a reasoning aid and orchestration layer, not as a claim of sentience or general intelligence.
- Registers the
map-think-doMCP tool over stdio. - Validates tool input with a strict schema and rejects extra fields.
- Tracks ordered thoughts with optional revision and branch metadata.
- Generates cognitive state metadata such as
metacognitive_awarenessandbreakthrough_likelihood. - Persists reasoning history in SQLite by default, with alternate memory store implementations in the repo.
- Supports prompt templates and custom prompt files under
~/.map-think-do/prompts. - Includes unit tests, end-to-end MCP tests, and transport/compliance test scripts.
- It does not provide autonomous execution of external tasks.
- It does not guarantee correctness of generated recommendations.
- It does not provide real consciousness, sentience, or AGI.
- It does not currently expose a public CLI for changing the config directory at runtime.
For local development:
npm install
npm run buildRun the server directly:
node dist/index.jsIf you install the package globally, the executable name is map-think-do.
The executable is map-think-do, and the MCP tool name exposed by the server is also map-think-do.
For backward compatibility, the server still accepts incoming code-reasoning tool calls from older MCP clients, but it no longer advertises that legacy name.
Example Claude Desktop configuration for a local checkout:
{
"mcpServers": {
"map-think-do": {
"command": "node",
"args": ["/absolute/path/to/map-think-do/dist/index.js"]
}
}
}The map-think-do tool accepts:
{
"thought": "Investigate the failing request path",
"thought_number": 1,
"total_thoughts": 4,
"next_thought_needed": true,
"is_revision": false,
"revises_thought": null,
"branch_from_thought": null,
"branch_id": null,
"needs_more_thoughts": false
}Required fields:
thoughtthought_numbertotal_thoughtsnext_thought_needed
Branching requires both branch_from_thought and branch_id. Revisions require is_revision: true and revises_thought.
Responses include the validated thought flow plus cognitive metadata. Common fields include:
cognitive_insightscognitive_interventionsEach intervention now includes bounded activation context explaining why it fired now.hypothesis_ledgerEach hypothesis now includes a bounded explanation of its latest confidence change.reasoning_moderecent_mode_shiftsaction_rankingdetected_biasesai_recommendationsmetacognitive_awarenesscreative_pressurebreakthrough_likelihoodcognitive_flexibilityinsight_potential
These values are heuristics produced by the current implementation. They are useful for downstream prompts and debugging, but they are not formal guarantees or calibrated scientific measurements.
Debug mode:
node dist/index.js --debugCLI help:
node dist/index.js --helpCurrent runtime behavior:
- JSON-RPC is written to
stdout. - Logs are written to
stderr. - Debug mode reduces redaction in logs and should not be used in production environments.
- Prompt data is stored under
~/.map-think-doby default. - If
~/.code-reasoningalready exists and~/.map-think-dodoes not, the server keeps using the legacy directory to avoid orphaning existing prompt data.
Main checks:
npm run build
npm testAdditional useful commands:
npm run test:basic
npm run test:branch
npm run test:revision
npm run test:error
npm run test:perf
node test/mcp-compliance.test.js
node test/transport-failure.test.js
npm run demo- Tool input is schema-validated and unknown fields are rejected.
- The filesystem-backed memory store now rejects unsafe IDs and fails closed if encryption is enabled without
MEMORY_STORE_KEY. - Debug logging can expose sensitive input data and should be used only in controlled environments.
- Prompt and config file access is restricted to the configured base directory and guarded against traversal through symlink escapes.