MCP Documentation

Connect any AI agent to your logic trees

logictree.space exposes a Model Context Protocol (MCP) endpoint so Claude Desktop, Cursor, ChatGPT, Gemini, and any MCP-compatible client can read and modify your projects directly — without copy-pasting JSON.

Overview

The server speaks JSON-RPC 2.0 over HTTP POST (Streamable HTTP transport). One endpoint, six tools, bearer-token auth.

Endpoint
https://logictree.space/api/mcp
Auth
Authorization: Bearer lt_mcp_…
Protocol
MCP 2024-11-05 / JSON-RPC 2.0

Setup

1. Generate an API key

  1. Open logictree.space and sign in.
  2. Go to Settings → MCP.
  3. Click Generate API Key.
  4. Copy the key — it starts with lt_mcp_. Store it somewhere safe; we can't show it to you twice.

2. Configure your MCP client

Claude Desktop(claude_desktop_config.json)

Claude Desktop only speaks stdio MCP, so bridge to the HTTP endpoint through mcp-remote. npx downloads it on first run.

json
{
  "mcpServers": {
    "logictree": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://logictree.space/api/mcp",
        "--header",
        "Authorization: Bearer lt_mcp_YOUR_KEY_HERE"
      ]
    }
  }
}

Config file location: macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json. Restart Claude Desktop after editing.

Cursor(Settings → MCP → Add Server)
yaml
URL:    https://logictree.space/api/mcp
Header: Authorization: Bearer lt_mcp_YOUR_KEY_HERE
ChatGPT / Gemini / any MCP client

Point the client at https://logictree.space/api/mcp with header Authorization: Bearer lt_mcp_YOUR_KEY. All tools become available as remote MCP tools.

3. Verify

Ask your agent to "list my logictree projects". It should call list_projects and return your project list. If you see 401 Unauthorized, the key is wrong or was revoked.

Authentication

Every request must include a bearer token tied to a single user account. The token has full read/write access to that user's projects — treat it like a password.

http
POST /api/mcp HTTP/1.1
Host: logictree.space
Authorization: Bearer lt_mcp_YOUR_KEY_HERE
Content-Type: application/json

{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
  • Keys are per-user. Settings → MCP shows only your own.
  • Regenerate the key at any time — the old one instantly stops working.
  • Never commit keys to git or share them in chat screenshots.

Tools

Six tools, enough to build and edit any tree. The MCP client usually exposes these automatically after the initial tools/list handshake.

list_projects

List every project the authenticated user can access.

Returns
`{ id, title, node_count, parent_project_id, updated_at }[]`
Start here to discover project IDs. The `id` value is required by every other tool.

get_tree_structure

Fetch the whole tree in a compact token-efficient shape. Use it first so your agent has context before making changes.

Parameters
NameTypeRequiredDescription
project_idstringyesProject ID returned by list_projects.
Returns
`{ project_id, title, nodes: [{ id, pid, layer, text, color?, checked? }], _id_format }`
`id` and `pid` are short prefixes of the underlying UUID (usually 8 chars, auto-extended on collision). Pass them back verbatim — every mutation tool accepts either the short prefix (>=4 chars) or the full UUID. `text` is the concatenated text of the node's content blocks. Optional fields are omitted when empty.

get_nodes

Fetch full content blocks for specific nodes — useful when get_tree_structure's summary isn't enough detail.

Parameters
NameTypeRequiredDescription
project_idstringyesProject ID.
node_idsstring[]yesNode ids — short prefix (>=4 chars) or full UUID.
Returns
Array of complete node objects with every content block. `id` and `parent_id` are emitted in short-prefix form.

add_node

Create a new node. Returns the new node's id.

Parameters
NameTypeRequiredDescription
project_idstringyesProject ID.
parent_idstring | nullyesParent node id, or null for a new root.
contentstring (markdown)yesMarkdown body. Headings, lists, images, tables, code blocks.
colorstringnoOptional CSS color, e.g. "#fef9c3".
checkedbooleannoTask completion state.
Returns
`{ id, title }` — the new node's id and the title derived from the first line of text.
Node titles are derived server-side from the content's first line. Never send a title field.

edit_node

Update an existing node. Include only the fields you want to change.

Parameters
NameTypeRequiredDescription
project_idstringyesProject ID.
node_idstringyesNode ID to edit.
changesobjectyesSubset of { content, color, checked, parent_id, collapsed }.
optionstringnoFor parent_id changes: "attach" (default — children follow) or "detach_children" (children stay with the old parent).
Returns
Updated node summary.
Set a field to empty string to clear it — e.g. `{ color: "" }` removes the color override.

delete_node

Delete a node.

Parameters
NameTypeRequiredDescription
project_idstringyesProject ID.
node_idstringyesNode ID to delete.
optionstringyes"deleteall" to remove the node and all descendants, or "attach" to remove just this node and re-parent its children to its current parent.
Returns
`{ ok: true }`

Content blocks

A node's content is an array of typed blocks. The first line of the first text block becomes the node title automatically — do not send a separate title field.

json
[
  { "type": "text",  "value": "Revenue is declining\n\nMapped against the Q3 forecast…" },
  { "type": "code",  "value": "SELECT SUM(amount) …", "language": "sql" },
  { "type": "link",  "url": "https://…", "label": "Source" },
  { "type": "image", "url": "https://…" },
  { "type": "table", "value": "…" }
]

Minimum valid content: a single text block with a non-empty value. All other block types are optional.

Errors & limits

StatusMeaning
401Missing or invalid Authorization header.
403The project exists but the key's owner has no access to it.
404Project or node id does not exist.
400Malformed JSON-RPC request or invalid tool arguments.
500Server error — retry. If persistent, contact support.

The endpoint inherits standard Vercel serverless limits (function duration and payload size). No additional rate-limiting is applied beyond that today, but abusive usage may be throttled without notice.

Back to homeQuestions? Reach out via the link in the footer of the home page.
MCP Documentation — logictree space | logictree space