# Liveblocks (Collaborative) MCP for AI Agents AI Agent Connect

> Liveblocks (Collaborative) MCP lets your AI agent manage real-time collaborative environments. You can create rooms, track who's online, sync shared data like Yjs documents, and handle discussion threads. It connects your agent directly to your Liveblocks infrastructure so you can manage multi-user state without switching tabs.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_v2FU0vtTfzUrtsk5QcSuOhhoPhdk0tcyNdn6k4Ay/ai-agent-connect
- **Tags:** real-time-sync, multiplayer-experience, presence-tracking, collaborative-editing, web-sockets, state-management

## Description

Imagine you're building a collaborative whiteboarding tool or a real-time document editor. Usually, managing the heavy lifting of presence, room states, and data synchronization means juggling a ton of dashboard clicks and manual configuration. This Connector changes that by letting your AI agent handle the infrastructure for you. You can ask your agent to spin up a new room with specific permissions, check who's currently active in a shared space, or grab the latest state of a Yjs document to see what's happening on the canvas. It even handles the messy stuff like resolving threads and authorizing users. Because it's part of the Vinkius catalog, you get this direct line to your Liveblocks account without having to set up complex custom integrations from scratch. It turns your AI into a real-time infrastructure manager that knows exactly what's happening in your collaborative rooms at any given second.

## Tools

### update_ydoc
Sends a binary Yjs update to the document. Use this to push specific changes to the shared state.

### get_ydoc
Gets a JSON version of the Yjs document. This is perfect for checking the content of a collaborative doc.

### list_active_users
Shows who is currently in a room. Use this to monitor live collaboration activity.

### broadcast_event
Sends a JSON event to a specific room. Use this to trigger actions on the frontend.

### create_room
Sets up a new collaborative room. Use this to initialize a new workspace for your users.

### create_thread
Starts a new discussion thread with a first comment. This helps organize feedback in a room.

### delete_room
Removes a room from your infrastructure. Use this to clean up old or inactive workspaces.

### get_room
Pulls the details of a specific room. This helps you verify room metadata and settings.

### get_storage
Retrieves the room's Storage tree in JSON or LSON format. Use this to inspect the current shared state.

### identify_user
Generates an ID token for a specific user. Use this to handle secure user identification.

### initialize_storage
Sets up or resets the room storage. Use this to prepare a room for new data.

### list_rooms
Lists all rooms with filters and pagination. Use this to get an overview of your entire environment.

### list_threads
Lists all threads within a room. Use this to see all active discussions in a single space.

### patch_storage
Applies JSON Patch operations to the storage. Use this to make precise updates to shared data.

### resolve_thread
Marks a thread as resolved. Use this to close out completed discussions.

### set_presence
Sets an ephemeral presence for a user. Use this to show online statuses or custom icons.

### update_room
Changes room properties like metadata or permissions. Use this to modify room settings on the fly.

### authorize_user
Grabs an access token with specific permissions. Use this to manage who can do what in a room.

### list_versions
Shows the version history of Yjs documents. Use this to see snapshots of previous states.

## Prompt Examples

**Prompt:** 
```
Show me all rooms that are currently active and tell me how many people are in each.
```

**Response:** 
```
I've checked your Liveblocks environment. Here are the currently active rooms:

| Room Name | Active Users | Status |
| :--- | :--- | :--- |
| **Editor-Prod-42** | 3 | Active |
| **Sprint-Planning** | 1 | Active |
| **Design-Sync** | 5 | Active |

Would you like me to list the specific users for any of these rooms?
```

**Prompt:** 
```
I need to see the current state of the Yjs document for the 'editor-prod-42' room.
```

**Response:** 
```
I've retrieved the current Yjs document state for **editor-prod-42**. Here is the JSON representation of the content:

```json
{
  "content": "The project is moving along well. We need to finalize the UI by Friday.",
  "metadata": {
    "last_modified": "2026-07-10T10:00:00Z",
    "author": "Alice"
  }
}
```

Let me know if you'd like me to apply any updates to this document.
```

**Prompt:** 
```
Create a new room for 'Beta Testing' and give it write permissions.
```

**Response:** 
```
I've created a new collaborative room for you.

*   **Room Name:** Beta Testing
*   **Room ID:** `beta-test-room-99`
*   **Permissions:** Set to `room:write`

Your new workspace is ready for use. Would you like me to initialize the storage for it?
```

## Capabilities

### Create and delete collaborative rooms
Spin up new workspaces or remove old ones with specific metadata and access controls.

### Track active users in real-time
See exactly who is currently in a room and monitor their live activity.

### Sync and patch shared room storage
Retrieve the current room state or apply specific JSON Patch operations to shared data.

### Manage comment threads and discussions
Create, list, and resolve discussion threads to keep team feedback organized.

### Authorize users with specific permissions
Generate access tokens and identify users with specific group assignments.

### Broadcast custom events to connected clients
Send JSON events to rooms to trigger specific actions on your frontend.

## Use Cases

### Debugging a stuck document
A developer asks the agent to get_ydoc and list_versions to see why a collaborative doc isn't syncing for a specific user.

### Checking live engagement
A PM asks the agent to list_active_users in a specific room to see if the new feature is being used by real people.

### Rapid room setup
A dev asks the agent to create_room and initialize_storage to quickly spin up a test environment for a new feature.

### Cleaning up feedback
A support lead asks the agent to resolve_thread on all completed support tickets in a room to keep the workspace clean.

## Benefits

- Skip the dashboard: Use list_rooms and get_room to check your entire infrastructure without leaving your chat or IDE.
- Monitor live activity: Use list_active_users and set_presence to see exactly who is in a room and what they're doing.
- Direct data access: Use get_ydoc and patch_storage to inspect and modify shared states instantly.
- Thread management: Use create_thread and resolve_thread to organize and clean up user feedback in real-time.
- Easy permissions: Use authorize_user and identify_user to handle secure access control through simple commands.

## How It Works

The bottom line is you get a direct command line for your real-time collaboration infrastructure inside your favorite AI chat.

1. Subscribe to the Connector and enter your Liveblocks Secret Key from your dashboard.
2. Connect your AI client like Claude or Cursor to the Vinkius platform.
3. Start asking your agent to manage rooms, check presence, or sync data.

## Frequently Asked Questions

**What can the Liveblocks (Collaborative) MCP do for my app?**
This Connector gives your AI agent the ability to manage your Liveblocks infrastructure. You can create rooms, track user presence, sync shared data, and manage discussion threads directly through a chat interface.

**Can I use this to see who is online in my collaborative rooms?**
Yes, your AI agent can check the active users in any specific room instantly. This helps you monitor engagement or troubleshoot connection issues without opening your dashboard.

**How does the Liveblocks (Collaborative) MCP help with Yjs documents?**
It allows your agent to pull the current JSON state of a Yjs document or push binary updates. This makes it much easier to debug shared states or inspect content in real-time.

**Can my AI agent create new rooms for me?**
Absolutely. You can tell your agent to spin up a new room with specific names and metadata, and it will handle the creation and permission setup for you.

**Can I manage user permissions with this Connector?**
Yes, you can use the agent to identify users and authorize them with specific access tokens, making it easier to manage who can interact with your collaborative spaces.

**How do I check the history of a shared document?**
You can ask your agent to list the version history for a specific Yjs document. This shows you snapshots of previous states so you can see how the content has evolved.

**Can I use this to organize feedback threads?**
Yes, the Connector includes tools to create, list, and resolve discussion threads. This helps you keep team feedback organized within your collaborative rooms.

**How can I see which users are currently active in a specific collaboration room?**
You can use the `list_active_users` tool by providing the Room ID. The agent will return a list of all users currently connected to that room, including their connection IDs and associated info.

**Is it possible to inspect or modify the shared state of a room from the AI?**
Yes! Use `get_storage` to retrieve the current LSON/JSON storage tree or `patch_storage` to update specific keys in the room's shared state. For Yjs-based rooms, you can use `get_ydoc` and `update_ydoc`.

**Can I manage user comments and discussion threads through this integration?**
Absolutely. You can use `list_threads` to see all discussions in a room, `create_thread` to start a new one, and `resolve_thread` to mark a discussion as completed.