How to Use the GoHighLevel MCP in Mastra AI
Build resilient, multi-step GoHighLevel automation workflows using Mastra AI agents with zero-trust execution.
Works with every AI agent you already use
…and any MCP-compatible client
Connect GoHighLevel MCP to Mastra AI
Create your Vinkius account to connect GoHighLevel to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Build self-healing GoHighLevel workflows with Mastra AI
The `list_opportunities` tool gives your Mastra AI agent deep visibility into your sales pipelines to trigger automated follow-up steps. If a pipeline stage change fails, Mastra's workflow engine retries the action using exponential backoff automatically. This MCP Server integration allows you to build complex conditional branches based on real-time CRM data. For instance, you can check if a lead exists with `get_contact` before deciding to trigger a new campaign.
Automate drip campaigns with human approval gates
The `list_campaigns` tool allows your agent to audit active marketing sequences and enroll contacts based on behavioral triggers. Mastra's built-in human-in-the-loop feature ensures no contact is added to a campaign without manual verification. By calling `list_contacts` alongside your campaign lists, your agent identifies stale leads and queues them for re-engagement. You set the rules, and the agent executes the steps. It's completely hands-off.
Multi-channel message routing and dispatch
The `send_message` tool enables your agent to route critical updates via SMS or email based on the recipient's preferred channel. Your agent inspects historical interactions using `list_conversations` to determine the best communication strategy. If an SMS delivery fails, Mastra branches the workflow to try email dispatch or alerts a sales rep. This ensures your high-value pipeline opportunities never fall through the cracks due to silent API failures.
Set up GoHighLevel MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All GoHighLevel tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "gohighlevel-mcp-client",
servers: {
"gohighlevel-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "GoHighLevel Agent",
model: openai("gpt-4o"),
instructions: "You have access to GoHighLevel tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent GoHighLevel transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by GoHighLevel. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about GoHighLevel MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the GoHighLevel MCP today
We host it, we monitor it, we maintain it. You just paste one token.