developer-toolsapi_key

Ably

Ably is a real-time messaging platform helping developers build live features, including chat and data synchronization, with global scalability and robust reliability for modern applications

Verdict

Ably's MCP exposes real-time messaging infrastructure inside Switchy. @mention it to create channels, retrieve message history, check presence events, or pull application usage stats without leaving your workspace. Teams building real-time features — chat, live dashboards, collaborative tools — use it to debug production channels, audit message flow, and monitor subscription health. You'll need an API key with appropriate capabilities (channel read/write, stats, presence). The MCP doesn't handle client-side subscriptions or WebSocket connections; it's for server-side inspection and management.

Common use cases

  • Debug production channel message flow
  • Audit presence events during live sessions
  • Monitor application usage stats by hour
  • Retrieve message history for support investigations
  • Unsubscribe devices from push channels

Integration

Vendor
Ably
Category
developer-tools
Auth
API_KEY
Tools
11
Composio slug
ably

Tools

  • Create Ably Channel

    Creates a new channel or retrieves an existing channel in ably. this tool allows you to programmatically create and initialize channels for real-time messaging. since ably creates channels implicitly when first used, this action publishes a

  • Delete Channel Subscription
    destructive

    This tool allows you to unsubscribe devices or clients from push notifications for specific channels. the operation is asynchronous, so immediate requests after deletion may briefly still return the subscription.

  • Get Ably Service Time

    This tool retrieves the current server time from ably's service in milliseconds since the epoch. it is particularly useful for time synchronization and generating valid tokenrequest timestamps to prevent replay attacks. the endpoint support

  • Get Application Stats

    This tool retrieves your application's usage statistics from ably. the stats endpoint returns a paginated list of your application's usage statistics by minute, hour, day, or month. it supports optional parameters such as start, end, direct

  • Get Channel Details

    This tool retrieves metadata and details for a specific channel in ably. it returns a channeldetails object containing information about the channel's status, occupancy, and other metadata. the endpoint provides visibility into channel acti

  • Get Channel History

    This tool retrieves the message history for a specified ably channel. it uses the get /channels/{channelid}/messages endpoint to return a paginated list of messages in chronological order, subject to parameters such as 'channelid', 'limit',

  • Get Channel Presence History

    This tool retrieves the history of presence messages for a specified channel in ably. it allows you to query presence events on a channel within a given time period.

  • List Push Channel Subscriptions

    This tool retrieves a list of all push notification channel subscriptions. it allows you to view all active push notification subscriptions for channels in your ably application. allows filtering by channel, deviceid, and clientid, supports

  • Publish Message to Channel

    This tool will allow users to publish a message to a specified ably channel using a post request. it covers the essentials like channel name, message data, optional event name/type, and additional metadata for push notifications. it is an i

  • Query Batch Presence

    This tool enables querying the presence states of multiple channels in a single api request. the api retrieves the member presence details of the specified channels in parallel.

  • Query Batch Presence History

    This tool enables querying presence history for multiple channels in a single api request. it uses the get endpoint at https://rest.ably.io/presence to retrieve the member presence history details of the specified channels in parallel.

Setup

Setup guide

  1. 11. In Switchy, open your workspace settings and navigate to the MCP integrations panel. 2. Select 'Add MCP' and choose Ably from the developer tools category. 3. You'll be prompted to paste an Ably API key — generate one in your Ably dashboard under 'API Keys' with capabilities matching your needs (typically 'subscribe', 'publish', 'presence', 'stats'). 4. Paste the key into Switchy and click 'Connect'. 5. Switchy validates the key by calling Ably's service time endpoint; if successful, the integration shows 'Active'. 6. Open any Space, type '@Ably get channel details' followed by a channel name, and send — if you see metadata returned, the connection works. 7. From there, @mention Ably to invoke any of its 11 tools directly in conversation.

What teammates see: by default, memories from Ably are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Spaces have used this MCP together with a given model.

How Switchy teams use it

Not enough Spaces yet to publish anonymised usage stats (we require ≥ 50 Spaces per week).

Starter prompts

Check Channel Activity

@Ably get the last 50 messages from the 'support-chat' channel and show current presence members
Open in a Space →

Review Usage Stats

@Ably retrieve application stats for the last 24 hours, grouped by hour
Open in a Space →

Inspect Channel Metadata

@Ably get channel details for 'live-dashboard' including occupancy metrics
Open in a Space →

Audit Presence History

@Ably show presence history for 'collab-session-42' from 2 hours ago to now
Open in a Space →

List Push Subscriptions

@Ably list all push channel subscriptions, filtered by channel 'notifications-prod'
Open in a Space →

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@ably show me the message history for the 'game-lobby-42' channel from the last hour, including any presence events

Output

Retrieved 47 messages from 'game-lobby-42' spanning the last hour. The channel saw 12 unique clients, with peak activity at 14:23 UTC (8 messages in one minute). Message types include 23 chat messages, 15 game-state updates, and 9 player-action events. Presence history shows 5 enter events and 3 leave events. The most recent message was sent 2 minutes ago by client 'player_8f3a'. Note: History is limited to the retention period configured for your Ably app (typically 24-72 hours depending on plan).

Notes

This example demonstrates Ably's message and presence history retrieval, which is essential for debugging real-time applications or reconstructing session state. Requires channels.history permission in your API key scope. Be aware that history depth and granularity depend on your Ably plan tier and configured retention settings.

Prompt

@ably subscribe device token 'fcm:dGhpc19pc19hX3Rva2Vu' to push notifications for channels 'alerts' and 'system-updates'

Output

Successfully subscribed device 'fcm:dGhpc19hX3Rva2Vu' to push notifications for 2 channels. The device will now receive push notifications for messages published to 'alerts' and 'system-updates'. Subscription is active immediately for new messages. Note: This operation modified your push notification configuration — the device will receive notifications even when not actively connected via realtime. To verify, check the push subscriptions list or test by publishing a message to either channel.

Notes

This write operation showcases Ably's push notification management, allowing server-side subscription control without client SDK involvement. Requires push.subscribe permission. Important: This creates a persistent subscription that continues sending notifications until explicitly deleted, which can impact your push notification quota and user experience if not managed carefully.

Prompt

@ably get our application stats for the last 24 hours and summarize which channels had the highest message throughput

Output

Retrieved hourly statistics for the past 24 hours. Your application processed 1.2M messages across 340 active channels. Top 5 channels by message volume: 'live-feed-main' (284K messages, 23.7% of total), 'chat-global' (156K), 'game-state-prod' (98K), 'notifications' (71K), and 'analytics-events' (52K). Peak hour was 18:00-19:00 UTC with 89K messages. Connection count averaged 2,400 concurrent connections with a peak of 3,100. This analysis suggests 'live-feed-main' may benefit from channel sharding if latency becomes an issue at scale.

Notes

This synthesis example pairs Ably's stats API with AI reasoning to identify usage patterns and potential optimizations. The stats endpoint provides granular metrics (messages, connections, channels) that are invaluable for capacity planning and cost management. Requires stats.read permission. Stats are typically delayed by 5-10 minutes, so this isn't suitable for real-time monitoring.

Use-case deep-dives

Live customer support chat history

When Ably beats building your own chat audit trail

A 6-person support team needs to review chat transcripts from the last 30 days when a customer escalates. Ably's channel history tool pulls message logs without you writing retention logic or running a database. The catch: Ably's free tier keeps 2 minutes of history; paid plans go to 24-72 hours depending on tier. If your compliance window is longer than 72 hours, you'll need to pipe messages to your own store anyway, which makes the MCP less useful. For teams inside that window, this MCP turns a 3-day engineering project into a 10-minute Switchy workflow. You authenticate once with an API key, then any teammate can query chat logs by channel ID without touching the Ably dashboard. If your support volume is under 500 conversations a month and you're on a paid Ably plan, this is the fastest path to searchable chat history.

Mobile app push notification audit

Debugging push subscriptions without SSH-ing into prod

A 3-person mobile team ships an iOS app with Ably push notifications. Users report they're not getting alerts for specific channels. The team needs to verify which devices are subscribed to which channels without deploying debug builds or tailing server logs. Ably's list and delete subscription tools let you inspect and prune subscriptions in real time. The MCP gives your PM or QA lead direct access to subscription state without waiting on an engineer to write a one-off admin script. The limit: if you have 10,000+ active devices, pagination gets tedious and you'll want a bulk export instead. For teams under 5,000 devices, this MCP turns a 2-hour investigation into a 5-minute Switchy query. Authenticate with your Ably API key, search by channel or device ID, and fix subscription drift before your next sprint.

Multiplayer game session monitoring

When presence history matters more than message logs

A 4-person game studio runs a turn-based multiplayer prototype on Ably. Players drop mid-session and the team needs to know if it's a network issue or a bug. Ably's presence history tool shows who joined, left, or timed out of a channel in the last hour. The MCP lets your designer or producer pull session timelines without writing SQL or parsing server logs. The trade-off: presence history is capped at 2 hours on most plans, so if you need forensics beyond that window, you'll need to stream presence events to your own database. For early-stage teams iterating on session stability, this MCP is faster than building observability from scratch. Authenticate once, then anyone on the team can query presence by channel ID and timestamp. If your sessions are under 100 concurrent users and you're debugging connection patterns, this is the right tool.

Frequently asked

What does the Ably MCP do in Switchy?

The Ably MCP connects your Switchy workspace to Ably's real-time messaging infrastructure. Your team can create channels, retrieve message history, check presence events, manage push subscriptions, and pull application stats — all from Switchy's AI interface. It's designed for teams building or monitoring real-time features who want to query Ably data without switching to the dashboard or writing API scripts.

Do I need admin access to connect Ably?

You need an Ably API key with appropriate capabilities for the operations you want to run. Ably uses capability-based auth, so your key must grant permissions like channel read, write, presence, or stats access depending on which tools you use. Generate a key in your Ably dashboard under API Keys, then paste it into Switchy's MCP setup. No OAuth flow — just the key.

Can the Ably MCP publish messages to channels?

No. The MCP can create or retrieve channels and read message history, but it doesn't include a publish tool. If you need to send messages, use Ably's REST API directly or the realtime client libraries. The MCP is optimized for monitoring and querying existing data, not for acting as a message producer in your application's data flow.

How is this different from using Ably's dashboard or REST API?

The dashboard is click-heavy for repetitive queries; the REST API requires writing scripts. The MCP sits in between: you ask Switchy's AI to "show me presence history for channel X" or "get stats for the last hour", and it calls the right Ably endpoints. Faster than scripting for ad-hoc questions, more flexible than the dashboard's fixed views.

Who on the team should connect the Ably MCP?

Whoever manages your Ably account or has access to API keys. Typically a backend engineer or DevOps lead. Once connected in Switchy, any workspace member can query Ably data through the AI — they don't need their own keys. The MCP doesn't count against Ably's connection or message limits; it just makes REST calls on your behalf.

Data last verified 608 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.