Sandbox
@dioptx/mcp-atom-of-thoughts

MCP server for structured reasoning and graph review

Atom of Thoughts adds three tools to an MCP client: fast reasoning, deeper decomposition, and session and approval management. Each chain is split into atoms with types, dependencies, and confidence scores, then can be viewed in a browser graph or a terminal TUI.

91 stars13 forksTypeScriptUpdated 4mo ago
Who it's for

Builders who want their agent's reasoning to be structured, reviewable, and split into tracked steps.

What it delivers

You can inspect and approve an agent's reasoning instead of treating the answer as a black box.

What it does

Atomic reasoning chain

Breaks work into premise, reasoning, hypothesis, verification, and conclusion atoms with dependency links and confidence scores.

Fast and full tools

Provides `AoT-fast` for shorter decisions and `AoT-full` for deeper decomposition, plus `atomcommands` for session and approval control.

Browser visualization

Opens a D3-based graph when `viz: true` is passed, with colored atoms, confidence rings, and approve or reject actions.

Live TUI

Shows atoms streaming in a second terminal pane, with keys for accept, reject, star, pause, and submit.

Session isolation

Keeps reasoning chains in separate sessions so unrelated threads do not bleed into each other.

Approval feedback loop

Lets the user approve or reject atoms, then feeds that verdict back through the server's approval flow.

How to get it

  1. 1npm global
    npm install -g @dioptx/mcp-atom-of-thoughts
  2. 2Smithery
    npx -y @smithery/cli install @dioptx/mcp-atom-of-thoughts --client claude
  3. 3Docker
    docker build -t aot .

README

Atom of Thoughts

Structured reasoning for LLMs. Decompose, track confidence, visualize, approve.

npm version license node tests TypeScript

Atom of Thoughts: live TUI watching reasoning unfold


Quickstart

1. Add to your MCP config:

{
  "mcpServers": {
    "atom-of-thoughts": {
      "command": "npx",
      "args": ["-y", "@dioptx/mcp-atom-of-thoughts"]
    }
  }
}

2. Restart your client.

3. Ask the model to reason something through:

"Use AoT-fast to think through whether we should use JWT or session-based auth for the API."

The model breaks the problem into five kinds of atoms (premise, reasoning, hypothesis, verification, conclusion), each tagged with a confidence score. You get a structured chain you can audit, not a black-box answer.

[!TIP] Works with Claude Code, Cursor, Windsurf, or any MCP-aware client.

Install

npx (recommended; zero install, always latest)

{ "command": "npx", "args": ["-y", "@dioptx/mcp-atom-of-thoughts"] }

npm global

npm install -g @dioptx/mcp-atom-of-thoughts
{ "command": "mcp-atom-of-thoughts" }

Smithery

npx -y @smithery/cli install @dioptx/mcp-atom-of-thoughts --client claude

Docker

docker build -t aot .
{ "command": "docker", "args": ["run", "-i", "--rm", "aot"] }

How it works

graph LR
    P["P · Premise"]:::premise --> R["R · Reasoning"]:::reasoning
    R --> H["H · Hypothesis"]:::hypothesis
    H --> V["V · Verification"]:::verification
    V --> C["C · Conclusion"]:::conclusion

    classDef premise fill:#6b7280,stroke:#9ca3af,color:#fff,font-weight:bold
    classDef reasoning fill:#3b82f6,stroke:#60a5fa,color:#fff,font-weight:bold
    classDef hypothesis fill:#eab308,stroke:#facc15,color:#000,font-weight:bold
    classDef verification fill:#06b6d4,stroke:#22d3ee,color:#fff,font-weight:bold
    classDef conclusion fill:#22c55e,stroke:#4ade80,color:#fff,font-weight:bold

Atoms chain through dependencies. Each carries a confidence score from 0 to 1. Reasoning terminates when a high-confidence conclusion lands or max depth is hit. Each problem runs in its own session, so two threads of thought never bleed into each other.

Tools

Three tools cover the full surface:

ToolWhen to reach for it
AoT-fastDefault. Tradeoffs, debugging, decisions, option evaluation. Depth 3.
AoT-fullPlans, architecture, decomposition into sub-problems. Depth 5.
atomcommandsSessions, export, approval polling, decomposition lifecycle.

Quick example

AoT-fast({atomId:"P1", content:"API returns 500 on POST /users",     atomType:"premise"})
AoT-fast({atomId:"R1", content:"Unhandled exception in route handler", atomType:"reasoning", dependencies:["P1"]})
AoT-fast({atomId:"C1", content:"Add try-catch in POST handler",       atomType:"conclusion", dependencies:["R1"], confidence:0.9})

Only atomId, content, and atomType are required. Everything else has sensible defaults.

Visualization

Pass viz: true on any call to open an interactive D3 graph in the browser:

AoT-fast({atomId:"C1", ..., viz: true})

Approve and reject decisions POST back to the server over HTTP. No filesystem polling.

Live TUI

Watch the model reason in a second terminal pane while it works, and feed approve/reject decisions back into the next tool call. The event feed is on by default; nothing extra to configure.

In a second pane next to your LLM client:

npx -y @dioptx/mcp-atom-of-thoughts tui

1. Watch reasoning unfold

Watch atoms streaming in

Atoms appear as the model emits them, walking the chain premise → reasoning → hypothesis → verification → conclusion. Confidence bars fill in real time, dependencies show as inline arrows, and a velocity sparkline tracks event rate. Auto-scroll keeps the newest atom selected.

2. Give granular feedback

Accept, reject with note, submit

j / k move the selection. a accepts an atom; * stars it as critical context; r rejects it and prompts for a one-line reason. s submits the verdict. The submit flash tells you exactly what to do next: ask the model to call atomcommands check_approval. The verdict is written as the same approval JSON the existing file-fallback path already polls for, so feedback flows back through a contract the server already understands. Zero new wire protocol.

3. Customize the view

Settings overlay and help overlay

t opens settings: confidence threshold to hide low-confidence atoms, color theme (vibrant, soft, or mono), compact mode, dependency arrows toggle. ? shows the full keymap.

Keys reference

KeyAction
j / kMove selection
aAccept the selected atom
rReject (prompts for a one-line reason)
uClear feedback on the selected atom
*Star as critical context
sSubmit verdict (writes aot-approval-*.json)
tSettings (threshold, theme, compact mode, deps)
?Keys help
spacePause / resume event stream
qQuit

[!TIP] Skip setup and see it in action: npx -y @dioptx/mcp-atom-of-thoughts tui --demo


Configuration
{
  "args": ["-y", "@dioptx/mcp-atom-of-thoughts", "--mode", "fast", "--viz", "never"]
}
FlagDefaultEffect
--mode full|fast|bothbothWhich tools to register
--viz auto|always|neverautoauto: render on viz:true. always: render every call. never: skip (CI)
--max-depth <n>5 / 3Override depth limit
--output-dir <path>OS tempWhere to write viz HTML
--downloads-dir <path>~/DownloadsApproval JSON fallback
Sessions

Each reasoning chain gets its own session. Default ID: "default".

  • atomcommands new_session creates and activates a new one.
  • atomcommands switch_session / list_sessions / reset_session for management.
  • When reasoning terminates, the session auto-archives. The next zero-dependency atom auto-spawns default-2, default-3, and so on.
  • Or pass sessionId on any AoT call to target one explicitly.

Two problems in one MCP process stay isolated without manual session management.

Browser visualization (alternative to the TUI)

Prefer a browser tab to a terminal pane? Pass viz: true on any AoT call. The server writes a self-contained HTML file (D3 inlined, works offline) and opens it:

  • Force-directed graph colored by atom type with confidence rings
  • Sidebar to approve or reject phases or individual atoms
  • Approve / reject POSTs to a local 127.0.0.1 listener on an ephemeral port; falls back to a ~/Downloads file scan if the listener can't bind

The TUI and the browser viz both feed atomcommands check_approval. Pick whichever fits your workflow.

Install methods

npx (zero install):

{ "command": "npx", "args": ["-y", "@dioptx/mcp-atom-of-thoughts"] }

npm global:

npm install -g @dioptx/mcp-atom-of-thoughts

Smithery:

npx -y @smithery/cli install @dioptx/mcp-atom-of-thoughts --client claude

Docker:

docker build -t aot . && docker run -i --rm aot
Development
git clone https://github.com/dioptx/mcp-atom-of-thoughts.git
cd mcp-atom-of-thoughts
npm install
npm test        # 183 tests (unit + e2e)
npm run build
Migrating from v2

See MIGRATION_v2_to_v3.md for the full lookup table. The short version:

  • AoT-light is now AoT-fast
  • AoT is now AoT-full
  • generate_visualization is now viz: true on any AoT call
  • export_graph and check_approval are now atomcommands subcommands
  • --no-viz and --no-approval are replaced by --viz auto|always|never

MIT. Based on Atom of Thoughts.

Files in the repo

Repository payload22 top-level entries
  • .github
  • assets
  • src
  • tests
  • .gitignore
  • .npmignore
  • AUDIT_v2_to_v3_dotfiles.md
  • CHANGELOG.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Dockerfile
  • LICENSE
  • MIGRATION_v2_to_v3.md
  • package-lock.json
  • package.json
  • PLAN_V3.md
  • README.agents.md
  • README.md
  • SECURITY.md
  • smithery.yaml
  • tsconfig.json
  • vitest.config.ts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k