Linora

Connect an AI agent (MCP)

Linora ships an MCP server, so an agent such as Claude Code can list your projects, read pages and draw on them as a collaborator. People on the page see the agent’s cursor, selection and edits live, and the agent’s undo only reverts its own edits. Design and limits: architecture/mcp.md.

You need a running Linora (the quickstart starts one at http://127.0.0.1:8080) and an account on it. The examples use port 8080; if you set another LINORA_PROD_PORT, use yours.

1. Create a personal access token

  1. Open the web app, then Access tokens in the top bar (http://127.0.0.1:8080/#/tokens).
  2. Name the token (for example “Claude Code”), keep the scopes files:read and files:write, and pick an expiry.
  3. Click Create token and copy it. It is shown only once.

The token acts as you, with your role in each project. Treat it like a password: keep it out of git and revoke it on the same page when you no longer need it. For a read-only agent, give it files:read only.

Tokens start with linora_pat_.

2. Choose a transport

| | HTTP (recommended) | stdio | |—|—|—| | Where the adapter runs | in the stack, at http://127.0.0.1:8080/mcp | as a child process of your agent, from a clone of the repo | | Auth | Authorization: Bearer <token> on every request | LINORA_TOKEN in the adapter’s environment | | Needs | nothing on the agent’s machine | Node 26.4+ and npm ci in a clone |

3. Claude Code

HTTP, one command:

claude mcp add --transport http linora http://127.0.0.1:8080/mcp \
  --header "Authorization: Bearer linora_pat_..."

Without a scope, Claude Code adds the server for the current directory only; add --scope user to use it in every project. To share the setup with your team in a project’s .mcp.json, keep the token out of the file; Claude Code expands ${LINORA_PAT} from your environment:

{
  "mcpServers": {
    "linora": {
      "type": "http",
      "url": "http://127.0.0.1:8080/mcp",
      "headers": { "Authorization": "Bearer ${LINORA_PAT}" }
    }
  }
}

stdio, from a clone (use absolute paths if Claude Code starts elsewhere):

claude mcp add --transport stdio linora \
  --env LINORA_URL=http://127.0.0.1:8080 --env LINORA_TOKEN=linora_pat_... \
  -- node /path/to/linora/apps/mcp/src/main.ts

Check it with claude mcp list, or /mcp inside a session. Then try: “List my Linora projects, open the first file and draw a 1440x900 frame with a header and three cards.”

4. Claude Desktop

Claude Desktop starts local servers from its config file (Settings > Developer > Edit Config, claude_desktop_config.json). The mcp-remote package bridges it to the HTTP endpoint:

{
  "mcpServers": {
    "linora": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://127.0.0.1:8080/mcp", "--header", "Authorization:${LINORA_AUTH}"],
      "env": { "LINORA_AUTH": "Bearer linora_pat_..." }
    }
  }
}

Or skip the bridge and run the adapter over stdio: "command": "/absolute/path/to/node", "args": ["/path/to/linora/apps/mcp/src/main.ts"] and "env": { "LINORA_URL": "http://127.0.0.1:8080", "LINORA_TOKEN": "linora_pat_..." }. Desktop apps often don’t see a Node installed through a version manager, hence the absolute path. Restart Claude Desktop after each change.

Other clients

Any client that speaks Streamable HTTP needs only the URL and the Authorization header. To poke at the tools by hand, run the MCP Inspector from a clone: LINORA_URL=http://127.0.0.1:8080 LINORA_TOKEN=linora_pat_... npx @modelcontextprotocol/inspector node apps/mcp/src/main.ts.

Running the adapter yourself

Troubleshooting

To test the endpoint and a token without any client, send an initialize request. A working setup answers with "serverInfo":{"name":"linora",...}; otherwise the error matches a row below. The session it opens closes after 30 idle minutes.

curl -s http://127.0.0.1:8080/mcp -H "Authorization: Bearer linora_pat_..." \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
Symptom Cause and fix
401 missing Authorization: Bearer <personal access token> The client sends no header. Check the --header or headers entry, including the word Bearer.
401 not a personal access token The value isn’t a whole token: a prefix plus 43 characters, with no quotes or spaces. Copy it again, or create a new one.
401 invalid, expired or revoked personal access token Create a new token on the Access tokens page.
Tool error read_only: ... Fix: ask a project owner for editor access The token has only files:read, or you are a viewer in that project.
404 unknown or expired MCP session; initialize again Sessions close after 30 idle minutes or when the stack restarts. Most clients reconnect on their own; otherwise reconnect (/mcp in Claude Code) or restart the client.
403 this session belongs to a different token The token changed during a session. Restart the client.
429 when connecting More than 10 sessions for one token, or too many connects from one address (2 per second). Close other clients and retry.
413 One request is over 1 MiB. Split a very large create_nodes into several calls; a 10,000-node tree still fits in one.
busy: ... Fix: wait ... Too many calls at once (4 per session, 16 per user). Retry after the others finish.
open_page answers unavailable after 15 s The adapter can’t reach the realtime WebSocket named in its token. Set LINORA_MCP_REALTIME_URL to an origin it can reach; the prod-like stack already does this for its own adapter.
Connection refused The stack is down. npm run prod:ps, then node deploy/smoke.mjs http://127.0.0.1:8080. Adapter logs: npm run prod:logs -- mcp.
An extra “(agent)” collaborator stays on the page after the client reconnects The old session lingers until it idles out (up to 30 minutes). Known issue.
Claude Desktop says the server failed Read its MCP logs (macOS: ~/Library/Logs/Claude/mcp*.log). Usually npx or node isn’t on the app’s PATH; use absolute paths.