---
meta:
title: "MCP server"
parentTitle: "Tools"
description:
"Learn to use the official MCP server for Liveblocks, helpful for inspecting
and modifying your project with AI in Cursor, VS Code, Claude Desktop, and
more."
---
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](/docs/api-reference/rest-api-endpoints). 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](/dashboard). Below are instructions for [Cursor](#Cursor),
[Claude Code](#Claude-Code), [Claude Desktop](#Claude-Desktop), and
[Codex](#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](https://cursor.sh/):
1. Go to File → Cursor Settings → MCP → Add new server.
2. Add the following:
```json
{
"mcpServers": {
"liveblocks": {
"command": "npx",
"args": ["-y", "github:liveblocks/liveblocks-mcp-server"],
"env": {
"LIVEBLOCKS_SECRET_KEY": "{{SECRET_KEY}}"
}
}
}
}
```
### Claude Code
To set up [Claude Code](https://claude.ai/code), run the following command in
the terminal:
```bash
claude mcp add liveblocks -e LIVEBLOCKS_SECRET_KEY="{{SECRET_KEY}}" -- npx -y github:liveblocks/liveblocks-mcp-server
```
### Claude Desktop
To set up [Claude Desktop](https://claude.ai/download):
1. Go to Settings → Developer → Edit Config.
2. Open the JSON file, `claude_desktop_config.json`.
3. Add the following to the JSON:
```json
{
"mcpServers": {
"liveblocks": {
"command": "npx",
"args": ["-y", "github:liveblocks/liveblocks-mcp-server"],
"env": {
"LIVEBLOCKS_SECRET_KEY": "{{SECRET_KEY}}"
}
}
}
}
```
### Codex
To set up [Codex](https://codex.com/):
1. Ensure the Codex CLI is installed:
```bash
npm i -g @openai/codex
```
2. Run the following command in the terminal, inserting your secret key:
```bash
codex mcp add liveblocks \
--env LIVEBLOCKS_SECRET_KEY="{{SECRET_KEY}}" \
-- npx -y github:liveblocks/liveblocks-mcp-server
```
## Source code
The source code is available in our
[GitHub repository](https://github.com/liveblocks/liveblocks-mcp-server).