Ably MCP Server for Mastra AIGive Mastra AI instant access to 14 tools to Batch Presence, Batch Publish, Batch Push Publish, and more
Mastra AI is a TypeScript-native agent framework built for modern web stacks. Connect Ably through Vinkius and Mastra agents discover all tools automatically. type-safe, streaming-ready, and deployable anywhere Node.js runs.
Ask AI about this MCP Server for Mastra AI
The Ably MCP Server for Mastra AI is a standout in the Communication Messaging category — giving your AI agent 14 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import { Agent } from "@mastra/core/agent";
import { createMCPClient } from "@mastra/mcp";
import { openai } from "@ai-sdk/openai";
async function main() {
// Your Vinkius token. get it at cloud.vinkius.com
const mcpClient = await createMCPClient({
servers: {
"ably": {
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
},
});
const tools = await mcpClient.getTools();
const agent = new Agent({
name: "Ably Agent",
instructions:
"You help users interact with Ably " +
"using 14 tools.",
model: openai("gpt-4o"),
tools,
});
const result = await agent.generate(
"What can I do with Ably?"
);
console.log(result.text);
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About Ably MCP Server
Connect your Ably account to any AI agent to orchestrate real-time communication infrastructure through natural language. This server provides full access to the Ably REST API for robust pub/sub messaging and presence management.
Mastra's agent abstraction provides a clean separation between LLM logic and Ably tool infrastructure. Connect 14 tools through Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution. deployable to any Node.js host in one command.
What you can do
- Messaging — Publish messages to single or multiple channels, retrieve message history, and update or delete existing messages.
- Presence Tracking — Monitor real-time member status and history within specific channels to see who is online.
- Push Notifications — Send direct push notifications to devices or client IDs for mobile and web engagement.
- Channel Management — List active channels, fetch metadata, and monitor usage statistics across your application.
- Security & Tokens — Revoke tokens before expiry to maintain tight control over your real-time infrastructure access.
The Ably MCP Server exposes 14 tools through the Vinkius. Connect it to Mastra AI in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 14 Ably tools available for Mastra AI
When Mastra AI connects to Ably through Vinkius, your AI agent gets direct access to every tool listed below — spanning pub-sub, real-time-messaging, push-notifications, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Batch presence on Ably
Get presence for multiple channels
Batch publish on Ably
Publish messages to multiple channels at once
Batch push publish on Ably
Publish batch push notifications
Get channel metadata on Ably
Get metadata for a specific channel
Get message on Ably
Get a specific message by serial
Get messages on Ably
Retrieve message history for a channel
Get presence on Ably
Get current presence members for a channel
Get presence history on Ably
Get presence history for a channel
Get stats on Ably
Retrieve application usage statistics
List channels on Ably
Enumerate all active channels
Publish message on Ably
Publish a message to a specific channel
Push publish on Ably
Publish a direct push notification
Revoke tokens on Ably
Requires revocableTokens: true on the API key. Revoke Ably tokens before their expiry
Update message on Ably
Update, delete, or append to a message
Connect Ably to Mastra AI via MCP
Follow these steps to wire Ably into Mastra AI. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
npm install @mastra/core @mastra/mcp @ai-sdk/openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the agent
agent.ts and run with npx tsx agent.tsExplore tools
Why Use Mastra AI with the Ably MCP Server
Mastra AI provides unique advantages when paired with Ably through the Model Context Protocol.
Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure. add Ably without touching business code
Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation
TypeScript-native: full type inference for every Ably tool response with IDE autocomplete and compile-time checks
One-command deployment to any Node.js host. Vercel, Railway, Fly.io, or your own infrastructure
Ably + Mastra AI Use Cases
Practical scenarios where Mastra AI combined with the Ably MCP Server delivers measurable value.
Automated workflows: build multi-step agents that query Ably, process results, and trigger downstream actions in a typed pipeline
SaaS integrations: embed Ably as a first-class tool in your product's AI features with Mastra's clean agent API
Background jobs: schedule Mastra agents to query Ably on a cron and store results in your database automatically
Multi-agent systems: create specialist agents that collaborate using Ably tools alongside other MCP servers
Example Prompts for Ably in Mastra AI
Ready-to-use prompts you can give your Mastra AI agent to start working with Ably immediately.
"Publish a message to the 'orders' channel with the event name 'new_order' and data '{"id": 123}'"
"Check who is currently online in the 'chat-room-1' channel."
"Show me the usage statistics for my Ably application."
Troubleshooting Ably MCP Server with Mastra AI
Common issues when connecting Ably to Mastra AI through Vinkius, and how to resolve them.
createMCPClient not exported
npm install @mastra/mcpAbly + Mastra AI FAQ
Common questions about integrating Ably MCP Server with Mastra AI.
How does Mastra AI connect to MCP servers?
MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.Can Mastra agents use tools from multiple servers?
Does Mastra support workflow orchestration?
Explore More MCP Servers
View all →
Kit (ConvertKit) Alternative
12 toolsAutomate your creator marketing — manage subscribers, tags, and forms via AI.

LeadSquared
10 toolsManage leads, sales activities, and opportunities via the LeadSquared CRM API.

Scopus
10 toolsAccess the world's largest abstract and citation database. Search for research papers, authors, and institutional profiles directly.

Microsoft Clarity
13 toolsSee exactly how users interact with your website through heatmaps, session recordings, and behavioral analytics that reveal UX insights.
