MCP server
The Liveblocks MCP server allows you to inspect and modify your project with AI in compatible apps such as Cursor, Claude, Codex, and more.
Features
Our MCP server features 39 different tools, enabling most features from our REST API. You can use it to:
- Create and modify rooms, threads, comments, notifications, more.
- Read realtime Storage and Yjs values.
- Broadcast custom events to connected clients.
- Mark threads and notifications as read/unread.
AI will often string tool calls together—for example, if you ask it to fetch a room that doesn’t exist, it will ask if you’d like to create the room first, and then fetch it after.
Setup
To install, you need to use your secret key from the correct project in your dashboard. Below are instructions for Cursor, Claude Code, Claude Desktop, and Codex.
Don’t insert a secret key from your production application, as AI will have direct access to modify it.
Cursor
To set up Cursor:
- Go to File → Cursor Settings → MCP → Add new server.
- Add the following:
Claude Code
To set up Claude Code, run the following command in the terminal:
Claude Desktop
To set up Claude Desktop:
- Go to Settings → Developer → Edit Config.
- Open the JSON file,
claude_desktop_config.json. - Add the following to the JSON:
Codex
To set up Codex:
- Ensure the Codex CLI is installed:
- Run the following command in the terminal, inserting your secret key:
Source code
The source code is available in our GitHub repository.