How to integrate Ably MCP with Codex

Connect Codex to Ably MCP. List all active channels and their details, get message history from 'support-chat' channel, and more using natural language, with authentication handled for you.

Ably logoAbly
Api Key

Ably is a real-time messaging platform for live chat and data sync in modern apps. It offers global scale and rock-solid reliability for seamless, instant experiences.

25 Tools

Introduction

Codex is one of the most popular coding harnesses out there. And MCP makes the experience even better. With the Ably MCP integration, Codex can publish messages to channels, read channel history and presence, send push notifications, manage push devices, and check app stats, all without leaving the terminal or the app, whichever you prefer.

Also integrate Ably with

Why use Composio?

Apart from a managed and hosted MCP server, you will get:

  • CodeAct: A dedicated workbench that allows GPT to write its code to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Large tool responses: Handle them to minimise context rot.
  • Dynamic just-in-time access to 20,000 tools across 1700+ other Apps for cross-app workflows. It loads the tools you need, so GPTs aren't overwhelmed by tools you don't need.

How to install Ably MCP in Codex

Run the setup command

Run this command in your terminal to add the Composio MCP server to Codex.

Terminal

It will initiate the authentication in a browser window, authorize Codex to access your Composio account.

Composio authentication page

(Optional) Authenticate with OAuth

To authenticate manually, run the login command to open a browser window and authorize Codex to access your Composio account.

bash
codex mcp login composio

Verify the connection

Run codex mcp list to confirm Composio appears as a registered MCP server.

bash
codex mcp list

Codex App

Codex App follows the same approach as VS Code.

  1. Click ⚙️ on the bottom left → MCP Servers → + Add servers → Streamable HTTP:
  2. Fill the header and Key fields with { "x-consumer-api-key" = "ck_*******" }.
  3. The Key is the Composio API key, that you can find on dashboard.composio.dev
  4. Click on Authenticate and authorize Codex to your Composio account and you're all set.
Codex App MCP setup
  1. Restart and verify if it's there in .codex/config.toml
bash
[mcp_servers.composio]
url = "https://connect.composio.dev/mcp"
http_headers = { "x-consumer-api-key" = "ck_*******" }

Try it

Ask Codex for a Ably task. The first time, Composio asks you to connect your Ably account.

For example, ask it to:

  • "List all active channels and their details"
  • "Get message history from 'support-chat' channel"
  • "Show presence history for 'live-event' channel"

What is the Ably MCP server, and what's possible with it?

The Ably MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Ably account. It provides structured and secure access to your channels, messages, presence data, application statistics, and push notifications, so your agent can publish messages, inspect active channels, review channel history, monitor presence, and manage push notifications on your behalf.

  • Channel messaging: Have your agent publish a message to one channel or send batches of messages across multiple channels.
  • Channel activity and history: Let the agent list active channels, retrieve channel details, review message history, and inspect earlier versions of a message.
  • Presence monitoring: Direct your agent to check who is currently present in one or more channels and review past presence activity.
  • Push notification management: Instruct your agent to send individual or batch push notifications, manage channel subscriptions, and register, update, inspect, or unregister receiving devices.
  • Application insights: Have your agent retrieve Ably service time and review application usage statistics.

Conclusion

You've successfully integrated Ably with Codex using Composio's MCP server. Now you can interact with Ably directly from your terminal, VS Code, or the Codex App using natural language commands.

Key benefits of this setup:

  • Seamless integration across CLI, VS Code, and standalone app
  • Natural language commands for Ably operations
  • Managed authentication through Composio
  • Access to 20,000+ tools across 1700+ apps for cross-app workflows
  • CodeAct workbench for complex tool chaining

Next steps:

  • Try asking Codex to perform various Ably operations
  • Explore cross-app workflows by connecting more toolkits
  • Build automation scripts that leverage Codex's AI capabilities
TOOLS

Supported Tools

Every Ably action and event your agent gets out of the box.

Query Batch Presence

Queries the presence states of multiple Ably channels in a single request, retrieving member presence details for the specified channels.

Query Batch Presence History

Query presence history for multiple Ably channels, with optional start and end times and forwards or backwards ordering.

Delete Channel Subscription

Unsubscribes a device or client from push notifications for a specified channel, or across all channels if no channel is provided.

Get Channel Details

Retrieves status and occupancy metadata for a specific Ably channel, including connection, presence, publisher, and subscriber metrics.

Get Channel History

Retrieves a page of message history for a specified Ably channel, with time range, limit, and direction filters.

Get Channel Presence

Tool to obtain the set of members currently present for a channel.

Get Message Versions

Retrieves a page of historical versions of a specific Ably channel message, including the original and subsequent updates or deletes.

Get Channel Presence History

This tool retrieves the history of presence messages for a specified channel in Ably.

Get Push Device Registration

Retrieves a device's push registration by device ID, including available platform, state, recipient, and metadata fields.

Get Ably Service Time

This tool retrieves the current server time from Ably's service in milliseconds since the epoch.

Get Application Stats

Retrieve a page of Ably application usage statistics by minute, hour, day or month, with optional time range, direction and limit.

List Channels

Tool to enumerate all active channels in the Ably application.

List Push Channels

Lists a page of Ably channels with at least one subscribed device for push notifications.

List Push Channel Subscriptions

Lists a page of push channel subscriptions filtered by channel, client ID, or device ID, with pagination links; at least one filter is required.

List Registered Push Devices

List a page of Ably push device registrations, optionally filtered by device ID or client ID.

Patch Push Device Registration

Partially update an existing Ably push device registration.

Batch Publish Messages

Tool to batch publish messages to multiple channels in parallel.

Publish Message to Channel

Publishes a message to a specified Ably channel with a string or JSON object payload and an optional event name and client ID.

Publish Push Notification

Tool to publish a push notification directly to device(s) via Ably's Push Notifications API.

Batch Publish Push Notifications

Tool to batch publish push notifications directly to specific recipients.

Register Push Device

Register an iOS, Android, or browser device with Ably to receive push notifications.

Request Access Token

Request an Ably access token with optional capabilities, client ID and lifetime.

Unregister All Push Devices

Unregister matching Ably push devices, optionally filtering by device ID or client ID, but not both.

Unregister Push Device

Unregister a single Ably push device by device ID.

Update Push Device Registration

Upsert an Ably push device registration, creating it or replacing an existing registration.

FAQ

Frequently asked questions

With a standalone Ably MCP server, the agents and LLMs can only access a fixed set of Ably tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Ably and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Codex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Ably tools.

Yes, absolutely. You can configure which Ably scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Ably data and credentials are handled as safely as possible.

Start with Ably.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Ably tool your agent needs.Free to start.

Start building