Thoughtbox

Thoughtbox

thoughtbox•bykastalien-research

An MCP server for structured, multi-agent reasoning that records every step as a structured thought in a persistent, auditable reasoning ledger.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Exposes two MCP tools using a Code Mode pattern: thoughtbox_search queries the operation/prompt/resource catalog in JavaScript, and thoughtbox_execute chains operations through a tb SDK namespace.
  • •Provides a Hub coordination layer where agents register with role-specific profiles, join shared workspaces, and work through a structured workflow from problem creation to peer review and consensus.
  • •Records each thought as a numbered, timestamped graph node linked to its predecessors and persisted across sessions, supporting forward, backward, branching, and revision reasoning patterns.
  • •Includes an Observatory web UI that displays thoughts live as graph nodes over WebSocket, with branch navigation, a detail panel, multi-session switching, and session analysis.

BEST FOR

  • •Multi-agent teams that need a shared, reviewable problem-solving workflow with tracked proposals and consensus decisions.
  • •Debugging or auditing how conclusions were reached by reviewing a persistent, visualized trail of reasoning steps.
  • •Comparing alternatives through parallel branch exploration and later synthesis.

ABOUT THOUGHTBOX

Thoughtbox is cataloged as an MCP server attributed to kastalien-research. An MCP server for structured, multi-agent reasoning that records every step as a structured thought in a persistent, auditable reasoning ledger. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Thoughtbox are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does Thoughtbox keep memory across sessions?

It provides a persistent knowledge graph that stores insights, concepts, workflows, and decisions as typed entities with typed relations and visibility controls.

What storage backends does Thoughtbox support?

It offers three storage backends: InMemoryStorage for testing, FileSystemStorage with atomic writes and project isolation as the default, and SupabaseStorage for deployed instances.

What agent profiles are available in the Hub?

MANAGER, ARCHITECT, DEBUGGER, SECURITY, RESEARCHER, and REVIEWER, each providing domain-specific mental models and behavioral priming.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 85a623048c42 · 采集于 2026-11-13 11:42:39 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Thoughtbox

Multi-agent collaborative reasoning that's auditable. Thoughtbox is an MCP server for structured, multi-agent reasoning, with a companion web app for workspace and inspection flows. Every step is recorded as a structured thought in a persistent reasoning ledger that can be visualized, exported, and analyzed.

Runtime modes: Local development can use filesystem or in-memory storage. Deployed mode uses Supabase-backed storage, and the current production MCP server runs on Cloud Run.

Thoughtbox Observatory Observatory UI showing a reasoning session with 14 thoughts and a branch exploration (purple nodes 13-14) forking from thought 5.

Code Mode

Thoughtbox exposes exactly two MCP tools using the Code Mode pattern:

  • thoughtbox_search — Write JavaScript to query the operation/prompt/resource catalog. The LLM has full programmatic filtering power over the catalog.
  • thoughtbox_execute — Write JavaScript using the tb SDK to chain operations. Access thoughts, sessions, knowledge, notebooks, hub, observability, and protocol tools through a unified namespace.

Workflow: search to discover available operations, then execute code against them. Use console.log() for debugging — output is captured in response logs.

This replaces per-operation tool registration with a two-tool surface that scales without context window bloat.

Multi-Agent Collaboration

The Hub is the coordination layer. Agents register with role-specific profiles, join shared workspaces, and work through a structured problem-solving workflow — all via thoughtbox_execute.

The workflow: register → create workspace → create problem → claim → work → propose solution → peer review → merge → consensus

Workspace primitives:

  • Problem — A unit of work with dependencies, sub-problems, and status tracking (open → in-progress → resolved → closed)
  • Proposal — A proposed solution with a source branch reference and review workflow
  • Consensus — A decision marker tied to a thought reference for traceability
  • Channel — A message stream scoped to a problem for discussion

Agent Profiles: MANAGER, ARCHITECT, DEBUGGER, SECURITY, RESEARCHER, REVIEWER — each provides domain-specific mental models and behavioral priming.

28 operations across identity, workspace management, problems, proposals, consensus, channels, and status reporting.

Auditable Reasoning

Every thought is a node in a graph — numbered, timestamped, linked to its predecessors, and persisted across sessions. This creates an auditable trail of how conclusions were reached.

Agents can think forward, plan backward, branch into parallel explorations, and revise earlier conclusions. Each pattern is a first-class operation:

PatternDescriptionUse Case
ForwardSequential 1→2→3→N progressionExploration, discovery, open-ended analysis
BackwardStart at goal (N), work back to start (1)Planning, system design, working from known goals
BranchingFork into parallel explorations (A, B, C...)Comparing alternatives, A/B scenarios
RevisionUpdate earlier thoughts with new informationError correction, refined understanding

Each thought carries a semantic thoughtType (reasoning, decision_frame, action_report, belief_snapshot, assumption_update, context_snapshot, progress) that classifies what kind of thought it is, orthogonal to the process pattern used.

See the Patterns Cookbook for comprehensive examples.

Real-Time Observability

The Observatory is a built-in web UI at http://localhost:1729 for watching reasoning unfold live.

  • Live Graph — thoughts appear as nodes in real-time via WebSocket
  • Branch Navigation — branches collapse into clickable stubs; drill in and back out
  • Detail Panel — click any node to view full thought content
  • Multi-Session — switch between active reasoning sessions
  • Deep Analysis — analyze sessions for reasoning patterns, cognitive load, and decision points

The full observability stack includes OpenTelemetry tracing, Prometheus metrics, and Grafana dashboards.

Knowledge & Reasoning Tools

Knowledge Graph — Persistent memory across sessions. Capture insights, concepts, workflows, and decisions as typed entities with typed relations (BUILDS_ON, CONTRADICTS, SUPERSEDES, etc.) and visibility controls (public, agent-private, team-private).

Notebooks — Interactive literate programming combining documentation with executable JavaScript/TypeScript in isolated environments.

Client Compatibility

Thoughtbox is currently optimized for Claude Code. We are actively working on supporting additional MCP clients. Due to variation in capability support across the MCP ecosystem — server features (prompts, resources, tools), client features (roots, sampling, elicitation), and behaviors like listChanged notifications — we implement custom adaptations for many clients.

If you're using a client other than Claude Code and encounter issues, please open an issue describing your client and the problem.

Installation

Thoughtbox runs as a Docker-based MCP server. It requires Docker and Docker Compose.

Quick Start

git clone https://github.com/Kastalien-Research/thoughtbox.git
cd thoughtbox
docker compose up --build

This starts Thoughtbox and the full observability stack. The MCP server listens on port 1731 and the Observatory UI is available at http://localhost:1729.

MCP Client Configuration

Since Thoughtbox uses HTTP transport, configure your MCP client to connect via URL.

Claude Code

Add to your ~/.claude/settings.json or project .claude/settings.json:

{
  "mcpServers": {
    "thoughtbox": {
      "url": "http://localhost:1731/mcp"
    }
  }
}

To connect through the observability sidecar (adds OpenTelemetry tracing):

{
  "mcpServers": {
    "thoughtbox": {
      "url": "http://localhost:4000/mcp"
    }
  }
}

Cline / VS Code

Add to your MCP settings or .vscode/mcp.json:

{
  "servers": {
    "thoughtbox": {
      "url": "http://localhost:1731/mcp"
    }
  }
}

Usage Examples

Forward Thinking — Problem Analysis

Thought 1: "Users report slow checkout. Let's analyze..."
Thought 2: "Data shows 45s average, target is 10s..."
Thought 3: "Root causes: 3 API calls, no caching..."
Thought 4: "Options: Redis cache, query optimization, parallel calls..."
Thought 5: "Recommendation: Implement Redis cache for product data"

Backward Thinking — System Design

Thought 8: [GOAL] "System handles 10k req/s with <100ms latency"
Thought 7: "Before that: monitoring and alerting operational"
Thought 6: "Before that: resilience patterns implemented"
Thought 5: "Before that: caching layer with invalidation"
...
Thought 1: [START] "Current state: 1k req/s, 500ms latency"

Branching — Comparing Alternatives

Thought 4: "Need to choose database architecture..."

Branch A (thought 5): branchId="sql-path"
  "PostgreSQL: ACID compliance, mature tooling, relational integrity"

Branch B (thought 5): branchId="nosql-path"
  "MongoDB: Flexible schema, horizontal scaling, document model"

Thought 6: [SYNTHESIS] "Use PostgreSQL for transactions, MongoDB for analytics"

Environment Variables

VariableDescriptionDefault
DISABLE_THOUGHT_LOGGINGSuppress thought logging to stderrfalse
THOUGHTBOX_DATA_DIRBase directory for persistent storage~/.thoughtbox
THOUGHTBOX_PROJECTProject scope for session isolation_default
THOUGHTBOX_TRANSPORTTransport type (stdio or http)http
THOUGHTBOX_STORAGEStorage backend (fs, memory, or supabase)fs
THOUGHTBOX_OBSERVATORY_ENABLEDEnable Observatory web UIfalse
THOUGHTBOX_OBSERVATORY_PORTObservatory UI port1729
THOUGHTBOX_OBSERVATORY_CORSCORS origins for Observatory (comma-separated)(none)
THOUGHTBOX_AGENT_IDPre-assigned Hub agent ID(none)
THOUGHTBOX_AGENT_NAMEPre-assigned Hub agent name(none)
SUPABASE_URLSupabase project URL (required for supabase storage)(none)
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (required for supabase storage)(none)
PORTHTTP server port1731
HOSTHTTP server bind address0.0.0.0
NODE_ENVNode environment(none)
PROMETHEUS_URLPrometheus endpoint (Docker)http://prometheus:9090
GRAFANA_URLGrafana endpoint (Docker)http://grafana:3000

Development

For local development (requires Node.js 22+):

pnpm install
pnpm build
pnpm dev      # Development with hot reload

Testing

npx vitest run              # Unit tests
pnpm test                   # Full suite (build + vitest)
pnpm test:agentic           # Agentic tests — full suite (build + run)
pnpm test:agentic:tool      # Agentic tests — tool-level only
pnpm test:agentic:quick     # Agentic tests — quick (no build)
pnpm test:behavioral        # Behavioral contract tests

Docker Compose

docker compose up --build starts the full stack:

ServicePortDescription
thoughtbox1731 (MCP), 1729 (Observatory)Core MCP server + Observatory UI
mcp-sidecar4000Observability proxy with OpenTelemetry
otel-collector4318 (HTTP), 8889 (metrics)OpenTelemetry Collector
prometheus9090Metrics storage + alerting
grafana3001Dashboards and visualization

Persistent data is stored in named volumes: thoughtbox-data, prometheus-data, grafana-data.

Architecture

src/
├── index.ts                # Entry point (Streamable HTTP transport)
├── server-factory.ts       # MCP server factory with tool registration
├── thought-handler.ts      # Core thought recording logic
├── types.ts                # Shared type definitions
├── database.types.ts       # Supabase generated types
├── code-mode/              # Code Mode tool surface
│   ├── search-tool.ts      # thoughtbox_search — catalog query via JS
│   ├── execute-tool.ts     # thoughtbox_execute — operation chaining via tb SDK
│   ├── search-index.ts     # Frozen catalog of operations/prompts/resources
│   └── sdk-types.ts        # TypeScript definitions for the tb SDK
├── thought/                # Thought operations and tool definitions
├── sessions/               # Session management
├── persistence/            # Storage layer
│   ├── storage.ts          # InMemoryStorage with LinkedThoughtStore
│   ├── filesystem-storage.ts  # FileSystemStorage with atomic writes
│   └── supabase-storage.ts # SupabaseStorage for deployed/cloud usage
├── observatory/            # Real-time visualization
│   ├── ui/                 # Self-contained HTML/CSS/JS
│   └── ws-server.ts        # WebSocket server for live updates
├── hub/                    # Multi-agent collaboration
│   ├── identity.ts         # Agent registration
│   ├── workspace.ts        # Workspace management
│   ├── problems.ts         # Problem tracking with dependencies
│   ├── proposals.ts        # Solution proposals with reviews
│   ├── consensus.ts        # Decision recording
│   ├── channels.ts         # Problem-scoped messaging
│   ├── hub-handler.ts      # Hub operation dispatcher
│   └── operations.ts       # 28-operation catalog
├── channel/                # Hub event channels and SSE streaming
├── protocol/               # Ulysses and Theseus protocol tools
├── knowledge/              # Knowledge graph memory
├── auth/                   # API key authentication
├── audit/                  # Audit manifest generation
├── evaluation/             # LangSmith evaluation and online monitoring
├── notebook/               # Literate programming engine
├── events/                 # Event emission system
├── observability/          # Prometheus/Grafana integration
├── prompts/                # MCP prompt definitions
├── references/             # Anchor parsing and resolution
├── revision/               # Revision indexing
├── operations-tool/        # Operations tool handler
└── resources/              # Documentation and patterns cookbook

Storage

Thoughtbox supports three storage backends:

  • InMemoryStorage: Volatile storage for testing, uses LinkedThoughtStore for O(1) thought lookups
  • FileSystemStorage: Persistent storage with atomic writes and project isolation (default)
  • SupabaseStorage: Cloud-native storage backed by Supabase Postgres for deployed instances

Data is stored at ~/.thoughtbox/ by default (FileSystemStorage):

~/.thoughtbox/
├── config.json           # Global configuration
└── projects/
    └── {project}/
        └── sessions/
            └── {date}/
                └── {session-id}/
                    ├── manifest.json
                    └── {thought-number}.json

Contributing

We welcome contributions! See CONTRIBUTING.md for:

  • Development setup
  • Commit conventions (optimized for thick_read code comprehension)
  • Testing with vitest and agentic scripts
  • Pull request process

License

MIT License — free to use, modify, and distribute.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Thoughtbox from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/thoughtbox)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent