{
  "markdown": "# Rootr CLI + MCP Server\n\n**Connect your team's living knowledge base to Claude, ChatGPT, and any AI agent.**\n\n[Rootr](https://rootr.io) is a team knowledge & document workspace. This package is the\nofficial way to give an AI agent **direct, permissioned access to your team's shared\ndocuments, structured data, and institutional knowledge** — so your assistant already\nknows what your team knows, instead of you copy-pasting context into every conversation.\n\nThere are two ways to connect.\n\n## 1. Remote connector — no install (recommended)\n\nRootr hosts a remote MCP endpoint over **Streamable HTTP**. In Claude Desktop, claude.ai,\nor ChatGPT, add a connector with just the URL and sign in with OAuth:\n\n```\nhttps://rootr.io/mcp\n```\n\nNo JSON, no CLI, no tokens to paste. Log in, pick the workspace, and your team's docs are\navailable to the assistant with your existing permissions. See the\n[docs](https://rootr.io/en/docs).\n\n## 2. Local CLI / stdio MCP server (`rootr-cli`)\n\nFor the shell, or for agents that speak to a local stdio MCP server (e.g. Claude Code):\n\n```bash\nnpm install -g rootr-cli\nrootr config --api-key rootr_xxxx --workspace ws_xxx\nrootr mcp          # start the stdio MCP server\n```\n\nThe `rootr` command also works standalone: `ls`, `read`, `write`, `append`, `edit`,\n`search`, `ask`, `ws`, `config`.\n\nPure Node.js ESM, no build step. Requires Node 18+ (uses the built-in `fetch`).\n\n- **Homepage:** https://rootr.io\n- **Docs:** https://rootr.io/en/docs\n- **npm:** https://www.npmjs.com/package/rootr-cli\n\n---\n\n## Install\n\nRun it straight from a clone, or install globally.\n\n```bash\nnpm install -g rootr-cli\nrootr --help\n\n# or from source\ncd cli && npm install\nnode bin/rootr.js --help\n```\n\n## Configuration\n\nPrecedence: **environment variables > `~/.rootr/config.json`**\n\n| Env var | Config key | Description |\n|---|---|---|\n| `ROOTR_API_KEY` | `apiKey` | A `rootr_...` API key. Sent as the `x-api-key` header on every request. |\n| `ROOTR_WORKSPACE` | `workspace` | Workspace id |\n| `ROOTR_BASE_URL` | `baseUrl` | Defaults to `https://rootr.io/api/v1` |\n\nSave to the config file (created with `chmod 600`):\n\n```bash\nrootr config --api-key rootr_xxxxxxxxxxxxxxxx --workspace ws_123\n# optional on-prem / dev base URL\nrootr config --api-key rootr_xxx --workspace ws_123 --base-url https://dev.rootr.io/api/v1\n\nrootr config          # show current config (api key shown masked)\n```\n\n### Two kinds of key\n\nRootr API keys come in two kinds, and some tools require a specific one:\n\n- **Workspace key** — scoped to a single workspace\n  (`docs:read` / `docs:write` / `graph:read` / `ask` / `webhooks:manage`). Enough for most\n  document, LOG, issue, webhook, and ask tools.\n- **Account key (PAT)** — acts across your whole account. With the `workspaces:create`\n  scope it can create new workspaces (`rootr_create_workspace`). Using a workspace key for\n  an account-level action returns a `403` with a hint that an account key is required.\n\n## CLI usage\n\nPath rule: an argument starting with `/` is treated as a **path** (resolved to a node id\nvia the by-path API; needs a workspace set). Otherwise it is treated as a **node id**.\n\n```bash\nrootr ls                                   # whole tree  (TYPE<TAB>path)\nrootr ls /notes                            # subtree\n\nrootr read /notes/todo.md                  # markdown to stdout\nrootr read /notes/todo.md --json           # full JSON incl. metadata\n\necho \"# Title\" | rootr write /notes/new.md # full replace (creates if missing)\nrootr write /notes/new.md --file ./local.md\n\nrootr append /notes/log.md \"Deployed today\"          # safe, conflict-free\nrootr append /notes/log.md \"- one more\" --heading \"## Todo\"\n\nrootr edit /notes/todo.md --find \"- [ ] ship\" --replace \"- [x] ship\"\n\nrootr search \"deploy runbook\"              # path — snippet\nrootr ws                                   # list workspaces (id<TAB>name)\nrootr ask \"why did latency go up after last week's deploy?\"\n```\n\n`append` never rewrites the whole document, so it is safe to run concurrently. `write`\nsupports `--if-match \"\\\"etag\\\"\"` for optimistic concurrency (a `412` means the document\nchanged underneath you — re-read and retry). `edit` returns `409` if `--find` is missing or\nnot unique; pass `--all` to replace every match. `ask` queries the workspace knowledge graph\n(GraphRAG) and prints the answer plus citations (document path: quote).\n\n## Use as an MCP server\n\n`rootr mcp` starts a Model Context Protocol server over stdio. It exposes **80+ tools**\nacross the full Rootr surface, so an agent can author and query every node type:\n\n| Group | Tools (examples) |\n|---|---|\n| **Documents** | `rootr_list`, `rootr_read`, `rootr_append` *(recommended, conflict-free)*, `rootr_edit`, `rootr_write`, `rootr_search`, `rootr_document_versions`, `rootr_delete_node`, `rootr_duplicate_node` |\n| **Publishing & comments** | `rootr_publish_document`, `rootr_set_document_public`, `rootr_document_public_status`, `rootr_comment_document`, `rootr_list_document_comments` |\n| **Workspaces & scaffolding** | `rootr_workspaces`, `rootr_scaffold_plan`, `rootr_create_workspace`, `rootr_scaffold_apply` |\n| **Databases** (typed columns + board/table views) | `rootr_read_database`, `rootr_add_row`, `rootr_update_row`, `rootr_delete_row`, `rootr_list_rows` |\n| **Spreadsheets** (formulas) | `rootr_create_spreadsheet`, `rootr_read_spreadsheet`, `rootr_update_spreadsheet`, `rootr_create_sheet`, `rootr_update_sheet`, `rootr_delete_sheet`, `rootr_patch_spreadsheet_cells` |\n| **Whiteboards** | `rootr_create_whiteboard`, `rootr_read_whiteboard`, `rootr_update_whiteboard` |\n| **Forms** | `rootr_create_form`, `rootr_read_form`, `rootr_update_form`, `rootr_list_form_responses`, `rootr_submit_form_response`, `rootr_create_form_share_link`, `rootr_list_form_share_links` |\n| **CRM** | `rootr_crm_*` — companies, contacts, deals (kanban), activities, tasks, CSV import |\n| **Presentations** | `rootr_create_presentation`, `rootr_read_presentation`, `rootr_update_presentation`, `rootr_update_presentation_slide`, `rootr_append_presentation_slides`, `rootr_reorder_presentation_slides` |\n| **LOG datastores** | `rootr_create_log_store`, `rootr_update_log_fields`, `rootr_add_log_entries`, `rootr_query_log_entries`, `rootr_log_stats` |\n| **Issues** | `rootr_create_issue_tracker`, `rootr_list_issues`, `rootr_create_issue`, `rootr_get_issue`, `rootr_update_issue`, `rootr_comment_issue` |\n| **Webhooks** | `rootr_list_webhooks`, `rootr_create_webhook`, `rootr_delete_webhook` |\n| **GraphRAG ask** | `rootr_ask` — natural-language root-cause Q&A over the knowledge graph, with citations |\n| **Images** | `rootr_generate_image`, `rootr_remove_image_background` |\n\nTool descriptions steer agents to prefer `rootr_append` / `rootr_edit` over the destructive\n`rootr_write`. Tools that take a `workspace` argument fall back to `ROOTR_WORKSPACE` (or the\nconfig default) when it is omitted. All tool schemas are in English; JSON-returning tools\nrespond with pretty-printed JSON text.\n\n### Register in Claude Code / Claude Desktop\n\nAdd to `~/.claude.json` (Claude Code) or your Claude Desktop MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"rootr\": {\n      \"command\": \"rootr\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"ROOTR_API_KEY\": \"rootr_xxxxxxxxxxxxxxxx\",\n        \"ROOTR_WORKSPACE\": \"ws_123\"\n      }\n    }\n  }\n}\n```\n\n(If you did not install globally, use `\"command\": \"node\"` and\n`\"args\": [\"/path/to/rootr-cli/bin/rootr.js\", \"mcp\"]`.)\n\n## Error handling\n\nOn a non-2xx response the CLI prints the API `message` (when present) to stderr and exits 1:\n\n- `401` / `403` — check the API key / workspace scope\n- `412` — document changed since you read it (If-Match mismatch): re-read and retry\n- `409` — the server's reason is shown verbatim (e.g. `edit` find not found / not unique)\n\n## Layout\n\n- `bin/rootr.js` — entry point, command dispatch\n- `lib/config.js` — config load/save\n- `lib/client.js` — Rootr REST API client\n- `lib/resolve.js` — shared path/id target resolution\n- `lib/mcp.js` — MCP stdio server, assembles all tool groups\n- `lib/mcp-tools/*` — one module per tool group (documents, workspaces, databases,\n  spreadsheets, whiteboards, forms, crm, presentations, logs, issues, webhooks, ask, misc)\n\nDependencies: `@modelcontextprotocol/sdk` (MCP server) and `zod` (tool input schemas). The\nCLI core has no external dependencies. No build step — pure ESM JavaScript.\n\n---\n\nMade by [Inspirio](https://inspirio.co) · [rootr.io](https://rootr.io) · info@inspirio.co\n",
  "bytes": 8482,
  "sha": "2270f4bfcfbd5b94c574cf9fb221cbb4e7853817383fbb6cceb16118b4d6d00a",
  "repo_slug": "inspirio-co/rootr-cli",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_inspirio_co_rootr_cli_60805104/readme"
}