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.
npx -y @liveblocks/liveblocks-mcp-serverOverview
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:
Claude Desktop:
VS Code:
Manual setup:
# Clone and build
# Run the MCP server (set your Liveblocks secret key)
Example Smithery client config (paste into the client’s MCP server list):
Environment variables:
| Variable | Purpose |
|---|---|
| LIVEBLOCKS_SECRET_KEY | Your Liveblocks project secret key (required) |
| PORT | Optional — 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 / Action | Description |
|---|---|
| createRoom | Create a new Liveblocks room with metadata and permissions |
| updateRoom | Modify room information (name, privacy, metadata) |
| deleteRoom | Remove a room and associated threads/comments |
| listRooms | Enumerate rooms accessible by the configured project |
| createThread | Start a discussion thread inside a room |
| postComment | Add a comment to a thread |
| deleteComment | Remove a comment by id |
| listThreads | List threads in a room |
| listNotifications | Fetch notifications for a project or user context |
| storage.read | Read Storage contents (read-only) |
| yjs.read | Read 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.
Links and Resources
- 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.