Files
superbrain/mcp

superbrain-mcp

MCP (Model Context Protocol) server for Superbrain — exposes bookmarks, tags and Markdown pages to AI tools over the Superbrain REST API. Same shape as the other federated-suite MCP servers (e.g. listmonk-mcp): a pip-installable stdio server configured entirely by environment variables.

Run

pip install ./mcp        # or: pipx install ./mcp
export SUPERBRAIN_API_URL=http://localhost:8080   # the Go API, directly
export SUPERBRAIN_API_KEY=sb_...                  # Settings → API Keys
superbrain-mcp

SUPERBRAIN_API_URL must point at the Go API, not the web UI: the Next.js proxy signs browser assertions and never forwards a Bearer key. On a federated core the gateway uses http://superbrain-app:8080 (container-name DNS on the core network).

API keys require the tenant's plan to include the mcp-core connector (core plan). Keys are issued in the web UI (Settings → API Keys) or, for suite automation, by config_mcpserver_superbrain() in deploy/federated/lib-superbrain.sh.

MCP client config (e.g. Claude Desktop/Code)

{
  "mcpServers": {
    "superbrain": {
      "command": "superbrain-mcp",
      "env": {
        "SUPERBRAIN_API_URL": "https://superbrain.example.tld:8080",
        "SUPERBRAIN_API_KEY": "sb_..."
      }
    }
  }
}

Tools

Tool Description
search_bookmarks free-text + tag filter over bookmarks
get_bookmark / get_bookmark_markdown one bookmark (JSON / Markdown)
create_bookmark save a link with title/notes/due date/tags (missing tags are created)
update_bookmark partial update under the version contract; "" clears nullable fields
delete_bookmark move to Trash
list_tags / create_tag tag inventory
list_pages / get_page / get_page_markdown page inventory and bodies
create_page / update_page / append_to_page write Markdown pages (version-safe read-modify-write)

Concurrent-edit conflicts surface as tool errors mentioning 409 — re-read and retry.

Federated mcpserver gateway

The suite gateway (federatedcomputer/mcpserver) spawns this package when its .env carries SUPERBRAIN_API_URL (the registry entry in its apps_registry.py is "superbrain": {required_env: "SUPERBRAIN_API_URL", command: "superbrain-mcp", args: []}). Linking on a core host:

/federated/bin/installapp-mcpserver superbrain

which runs config_mcpserver_superbrain() (mints a dedicated mcpserver key for the admin account, directly in the database — the house pattern for apps whose credential creation is not a public API) and restarts the gateway so mcphub and Hermes pick the tools up.