ThinkingRoot Docs
Concepts

MCP and the `root` CLI

ThinkingRoot speaks the Model Context Protocol (MCP), so any MCP-capable client —

MCP — give any AI tool memory

ThinkingRoot speaks the Model Context Protocol (MCP), so any MCP-capable client — Claude, Cursor, Codex, Claude Code, and others — can use a workspace as its memory and toolset. Once connected, the client can recall, remember, search, branch, and call any deployed Root Function (each is exposed as a function::<name> tool), all grounded in the workspace's compiled memory.

The cloud gateway adds authentication in front of the engine's MCP endpoint and routes each session to the right project's engine. You connect a client by pointing it at the workspace's MCP URL with your key — the Console generates the exact config for each client (Claude Code, Claude Desktop, Cursor, Codex, or raw).

What this unlocks: an AI assistant that remembers across sessions, answers from your knowledge with citations, and can invoke server-side functions you deployed — no custom integration code.

The root CLI

root is the open-source command-line interface to the engine. The cloud and local use the same engine, so behavior you build and learn locally transfers directly to the cloud. Core commands:

# Run a self-hostable database
root serve                         # starts the engine (REST + MCP)

# Compile sources into the cognition graph
root compile                       # build/refresh the brain from ./sources
root compile --watch               # recompile as sources change

# Ask grounded questions
root ask "what depends on the billing service?"

# Root Functions
root function deploy <name> --code ./fn.js
root function invoke <name> --input '{"id":42}'
root function list
root function runs <name>

# Compiled Prompts
root prompt put <name> --file ./prompt.txt
root prompt assemble <name>

# Secrets (never printed back)
root secrets set OPENAI_API_KEY        # prompts on stdin, kept out of shell history
root secrets list                       # names only — never values
root secrets unset OPENAI_API_KEY

root ask produces a grounded, cited answer; root compile is the step that turns your raw sources into queryable claims; root function and root prompt manage the durable compute and prompt templates that live in the workspace.

How the pieces fit

  • CLI / SDK / MCP are three doors to the same engine.
  • The engine compiles sources into claims, serves grounded recall, runs Root Functions, and assembles Compiled Prompts.
  • The cloud wraps that engine with auth, multi-tenancy, and a Console — without changing the engine, so everything you learn locally works in the cloud.