# Flock MCP

> Flock MCP gives your AI client full control over team communications inside Flock. It lets you manage private groups, list public channels, audit who is a member of any group or channel, and send rich, formatted messages directly from natural conversation. You can also pull historical chat logs and retrieve employee metadata by alias.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** team-chat, instant-messaging, rich-messaging, workspace-management, channel-automation, roster-management

## Description

This MCP connects your AI agent to the full power of Flock, letting you manage every aspect of team communication without leaving your chat interface. Forget switching between dashboards or running manual reports just to confirm who needs to know what. Instead, you use natural language to get answers about your organization's roster and group structures.

Need to announce a policy change? You can send formatted, rich messages using advanced layouts straight into any channel. Want to audit security? Your agent can identify private groups or check which users are active members of specific channels. It even handles the messy work of mapping user aliases (like @john_doe) to their permanent UUIDs. When you connect through Vinkius, you get access to this full catalog of Flock tools, letting your AI client handle everything from checking chat logs to retrieving employee time zones and LDAP properties.

It means your agent doesn't just talk about your team; it actively manages the flow of information across your entire organization.

## Tools

### channels_get_info
Retrieves the description and banner configuration for any specific channel.

### channels_list_public
Gets a list of every public channel active in your Flock workspace.

### channels_list_members
Identifies and lists the UUIDs of all members attached to a specific channel.

### groups_list_members
Audits group boundaries to list members with read permissions, crucial for verifying sensitive targets.

### roster_list_directory
Provides a directory mapping every active user's direct @ alias to their absolute UUID for accurate routing.

### chat_send_message
Sends formatted messages using advanced layouts directly into an existing Flock chat room.

### chat_fetch_messages
Pulls recent chat history for a room, returning raw JSON objects with chronological messages.

### users_get_metadata
Retrieves structured profile metadata (like time zone and email) linked to any Flock user identity.

### groups_get_info
Inspects the deep internal credentials needed to understand a specific private group's operation.

### groups_list_private
Returns an array of all bounded private groups, helping you find the correct routing UUIDs.

## Prompt Examples

**Prompt:** 
```
Send a message to group 'g:123': 'Project update is live!'
```

**Response:** 
```
Message dispatched! 'Project update is live!' has been sent to group g:123. I've used your bot token to route the payload through the Flock API synchronously.
```

**Prompt:** 
```
List all public channels in my Flock workspace
```

**Response:** 
```
Retrieving channels... I found 5 public environments: '#general', '#product-news', '#marketing', '#announcements', and '#engineering'. Which one would you like to see the members for?
```

**Prompt:** 
```
Get the metadata for user '@john_doe'
```

**Response:** 
```
Retrieving identity... For alias '@john_doe' (UUID: u:456), I found: Name: John Doe, Email: john@example.com, Time Zone: America/New_York. He is currently an active member of 3 private groups.
```

## Capabilities

### Sending Rich Messages
Send formatted messages, including rich attachments and styled layouts, to any established Flock chat.

### Auditing Group Memberships
Identify members for specific channels or audit the explicit active UUIDs attached to a group to verify who can see sensitive content.

### Managing Private Groups
List all private groups and inspect their internal credentials to understand exactly how they operate within your company's structure.

### Listing Public Channels
Get a complete list of every public channel available in the workspace, along with details about its banners and descriptions.

### Roster Mapping & User Details
Find precise user metadata (like time zones or emails) for any employee by their alias, or get a directory mapping all active users to their UUIDs.

### Retrieving Chat History
Pull chronological logs and raw JSON objects from any specific room's chat history for auditing purposes.

## Use Cases

### Handling an executive announcement
A manager needs to send a critical policy update only to the core leadership team. Instead of manually listing every group and sending messages, they ask their agent: 'Send this memo to all members in the Executive Steering Group.' The agent uses `groups_list_members` then `chat_send_message`, ensuring perfect delivery.

### Onboarding a new cross-functional team
An HR specialist needs to confirm who belongs to three different project channels (Product, Marketing, Engineering). They simply ask their agent: 'List all members in these three channels.' The agent runs `channels_list_members` for each, providing one consolidated list of active UUIDs.

### Investigating a data leak
A security analyst must determine if sensitive client data was shared outside the intended group. They ask their agent to pull all chat logs from the relevant room using `chat_fetch_messages`, providing raw JSON objects for forensic review.

### Updating user contact info
A developer needs to verify if a contractor's time zone or email address has changed. They use their agent to run the `users_get_metadata` tool on the alias, getting real-time profile details without logging into HR systems.

## Benefits

- Stop manually listing users. With the `roster_list_directory` tool, your agent gets a definitive map of every employee’s alias to their UUID, making targeting messages accurate every time.
- Audit permissions without fear. You can use `groups_list_members` to check who has read access to a sensitive group, guaranteeing that only the intended audience sees critical information.
- Send better announcements. The `chat_send_message` tool lets you bypass basic Markdown and send richly formatted messages with enterprise attachments straight into any channel.
- Track conversations historically. Need proof of what was said? Use `chat_fetch_messages` to pull raw, chronological JSON logs from a room for deep auditing.
- Understand the structure. You can use `groups_list_private` and `channels_get_info` together to map out your entire communication topology—public channels, private groups, and their specific rules.
- Get user context instantly. The `users_get_metadata` tool retrieves essential profile details for any employee, including their time zone or LDAP properties.

## How It Works

The bottom line is that your AI agent becomes a natural language interface for complex team communication tasks.

1. Subscribe to this MCP on Vinkius, then enter your Flock Bot Token in the developer dashboard.
2. Connect your preferred AI client (like Cursor or Claude).
3. Tell your agent what you need—for example, 'List all public channels and check who belongs to #announcements.' — and it executes the actions.

## Frequently Asked Questions

**How do I send a message using the Flock MCP?**
You use the `chat_send_message` tool. Simply ask your agent to 'Send an announcement about the new deadline' and it handles routing the rich payload into the correct chat.

**Can I see who is in a private group using Flock MCP?**
Yes, you use `groups_list_members`. This tool audits the IAM boundaries of the specific group to list every active UUID that has read access, keeping your data secure.

**What if I need a user's time zone for an announcement?**
Use `users_get_metadata`. This tool retrieves structural profile metadata linked to any Flock identity, including their current time zone and LDAP properties.

**How do I find all the public channels available?**
Run the `channels_list_public` tool. It enumerates every public channel in your workspace, giving you a full map of your accessible communication areas.

**Is it possible to get historical chat logs with Flock MCP?**
Yes, use `chat_fetch_messages`. This tool pulls chronological records and raw JSON objects from any specific room's history for thorough review.

**Can my agent send formatted messages using FlockML?**
Yes. Use the 'chat_send_message' tool and provide your XML string in the 'flockml' parameter. The agent will bypass standard Markdown limits to render rich enterprise attachments and layouts natively in Flock.

**How do I list all members of a specific private group via chat?**
Use the 'groups_list_members' tool. Provide the Group UUID. Your agent will surface the explicitly mapped profiles within that group, helping you verify sensitive message targets securely.

**Can I search for a user's UUID using their '@' alias through the agent?**
Absolutely. The 'roster_list_directory' tool discovers global identity blocks mapping direct aliases to absolute string UUIDs, ensuring you can route messages accurately to anyone in your company.