LI

Liveblocks MCP Server: AI API for Rooms, Yjs

Manage Liveblocks with the MCP server: let AI create, modify, and delete rooms, threads, comments, and notifications, plus read access to Storage and Yjs.

Quick Install
npx -y @liveblocks/liveblocks-mcp-server

Overview

The Liveblocks MCP (Model Context Protocol) Server exposes Liveblocks REST functionality to AI agents and tools. It gives AI read and write access to key Liveblocks resources—rooms, threads, comments, and notifications—plus read access to Storage and Yjs state. The server is intended as a bridge so copilots or agents can manage collaboration objects (create rooms, post comments, fetch Yjs documents) without embedding Liveblocks keys in the AI client.

This is useful for building AI assistants that interact with collaborative apps: a summarization agent can read a Yjs document and generate a summary, a moderation bot can remove abusive comments or threads, and a copilot can create rooms or seed threads based on user prompts. The MCP server runs locally or on a secure host and is configured with a Liveblocks project secret key.

Features

  • Create, update, and delete rooms
  • Create and manage threads and comments
  • Send and list notifications
  • Read-only access to Storage contents
  • Read-only access to Yjs documents (snapshots)
  • Integrates with Smithery MCP clients (Cursor, Claude Desktop, VS Code, etc.)
  • Locally runnable: build and run with Node.js
  • Minimal configuration: set LIVEBLOCKS_SECRET_KEY to authenticate API calls

Installation / Configuration

Automatic install via Smithery (recommended for quick setup). Replace [key] with your Liveblocks secret key.

Cursor:

npx -y @smithery/cli install @liveblocks/liveblocks-mcp-server --client cursor --key [key]

Claude Desktop:

npx -y @smithery/cli install @liveblocks/liveblocks-mcp-server --client claude --key [key]

VS Code:

npx -y @smithery/cli install @liveblocks/liveblocks-mcp-server --client vscode --key [key]

Manual setup:

# Clone and build
git clone https://github.com/liveblocks/liveblocks-mcp-server.git
cd liveblocks-mcp-server
npm install
npm run build

# Run the MCP server (set your Liveblocks secret key)
export LIVEBLOCKS_SECRET_KEY="sk_dev_..."
node build/index.js

Example Smithery client config (paste into the client’s MCP server list):

{
  "mcpServers": {
    "liveblocks-mcp-server": {
      "command": "node",
      "args": ["/full/path/to/liveblocks-mcp-server/build/index.js"],
      "env": {
        "LIVEBLOCKS_SECRET_KEY": "sk_dev_..."
      }
    }
  }
}

Environment variables:

VariablePurpose
LIVEBLOCKS_SECRET_KEYYour Liveblocks project secret key (required)
PORTOptional — port to run the MCP server on (if applicable)

See the repository for full build steps and any additional configuration options.

Available Resources

The MCP server exposes a set of tools/actions a connected AI client can call. Typical resources include:

Tool / ActionDescription
createRoomCreate a new Liveblocks room with metadata and permissions
updateRoomModify room information (name, privacy, metadata)
deleteRoomRemove a room and associated threads/comments
listRoomsEnumerate rooms accessible by the configured project
createThreadStart a discussion thread inside a room
postCommentAdd a comment to a thread
deleteCommentRemove a comment by id
listThreadsList threads in a room
listNotificationsFetch notifications for a project or user context
storage.readRead Storage contents (read-only)
yjs.readRead a Yjs snapshot (read-only)

For exact method names and payloads, consult the source and the Liveblocks REST API docs linked in the repository README.

Use Cases

  • AI room lifecycle management
    An agent creates rooms for new projects, seeds an initial thread with onboarding instructions, and notifies project members. The MCP server performs the room creation and thread posting using the project key.

  • Comment moderation assistant
    A moderation agent scans comments in threads and uses sentiment or policy models to flag or delete abusive comments through the MCP server’s deleteComment endpoint.

  • Collaborative document summarization
    A copilot reads a Yjs snapshot and Storage attachments, generates a summary or changelog, posts it as a thread comment, and optionally notifies interested users.

  • Contextual help and autosuggestions
    A developer copilot inspects Yjs document content to provide inline suggestions. The MCP server provides read-only Yjs snapshots so the copilot can offer accurate, up-to-date suggestions without direct client-side secrets.

Security and Operational Notes

  • The MCP server requires your Liveblocks secret key—treat it as sensitive. Run the server in a secured environment and avoid exposing the key to untrusted clients.
  • The server exposes read access to Storage/Yjs and full CRUD access for rooms/threads/comments based on the configured key’s permissions. Limit usage and logs appropriately.
  • Consider rate limits and API quotas in high-throughput scenarios; instrument monitoring if you deploy this in production.
  • The server is open-source: review the code on GitHub and adapt it to your security policies or extend allowed actions.
  • GitHub: https://github.com/liveblocks/liveblocks-mcp-server
  • Liveblocks API reference and docs: https://liveblocks.io/docs/api-reference/rest-api-endpoints and https://liveblocks.io/docs/tools/mcp-server

This MCP server is designed to simplify safe AI integrations with Liveblocks by centralizing privileged API access and exposing a compact set of tools for agents and copilots.