4,500+ servers built on MCP Fusion
Vinkius
Kong Gateway logo
Vinkius
Mastra AI logo

How to Use the Kong Gateway MCP in Mastra AI

Build resilient, self-healing API gateway workflows with Mastra AI and our Kong Gateway integration.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Kong Gateway MCP on Cursor AI Code Editor MCP Client Kong Gateway MCP on Claude Desktop App MCP Integration Kong Gateway MCP on OpenAI Agents SDK MCP Compatible Kong Gateway MCP on Visual Studio Code MCP Extension Client Kong Gateway MCP on GitHub Copilot AI Agent MCP Integration Kong Gateway MCP on Google Gemini AI MCP Integration Kong Gateway MCP on Lovable AI Development MCP Client Kong Gateway MCP on Mistral AI Agents MCP Compatible Kong Gateway MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Mastra AI

Connect Kong Gateway MCP to Mastra AI

Create your Vinkius account to connect Kong Gateway 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.

GDPR Free for Subscribers

Automated incident response with Mastra AI

The `get_status` and `update_plugin` tools let your workflows monitor gateway health and apply rate limits when traffic spikes. If a service experiences high error rates, Mastra AI triggers conditional branches to protect your backend. You can build workflows that automatically inject rate-limiting plugins when an endpoint is under load. The agent handles the detection and mitigation using the MCP server, keeping your APIs online without manual intervention.

Safe configuration rollbacks and retries

The `update_route` and `update_service` tools allow you to modify your API setup with built-in safety nets. If a route update fails or causes errors, Mastra's workflow engine automatically retries the operation or rolls back the changes. You do not have to write complex error-handling logic for API gateway failures. The integration handles the API calls, while the framework ensures that any failed configuration step triggers a fallback block to restore the previous state.

Human-in-the-loop gateway approvals

The `create_plugin` and `delete_route` tools on this MCP server can be locked behind manual confirmation steps. You configure the agent to draft the API gateway changes and pause for an engineer's sign-off before applying them. This setup gives you the speed of agentic configuration with the security of human oversight. Your team receives a Slack alert or dashboard notification, reviews the proposed change, and approves it with a single click.

Setup guide

Set up Kong Gateway MCP in Mastra AI

Prerequisites

  • Node.js 18+ and a TypeScript project
  • @mastra/mcp + @mastra/core packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install @mastra/mcp @mastra/core plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Configure the MCPClient

    Create an MCPClient with your Vinkius endpoint as a URL object. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and inject tools

    Call mcpClient.listTools() and spread the result into your agent's tools object. All Kong Gateway tools become native Mastra tools.

  4. 4

    Run with any model

    Swap openai("gpt-4o") for any AI SDK-compatible provider. Call agent.generate() and the agent routes tool calls through MCP automatically.

agent.ts
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";

const mcpClient = new MCPClient({
  id: "kong-gateway-mcp-client",
  servers: {
    "kong-gateway-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

const agent = new Agent({
  name: "Kong Gateway Agent",
  model: openai("gpt-4o"),
  instructions: "You have access to Kong Gateway tools.",
  tools: {
    ...(await mcpClient.listTools()),
  },
});

const result = await agent.generate(
  "List recent Kong Gateway 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 Kong Gateway. 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 Kong Gateway MCP in Mastra AI

Instantiate the `MCPClient` using `@mastra/mcp` and point it to the Vinkius URL. You then fetch the tool list using `mcpClient.listTools()` and pass them directly into your agent definition. This exposes tools like `create_service` and `create_route` to your agent.
The workflow engine uses built-in retries with exponential backoff when tool calls like `list_routes` hit rate limits. If the admin API returns a 429 status code, the agent pauses and retries the call automatically. This prevents your orchestration workflows from failing due to temporary API throttles.
Yes, you can set `requireToolApproval` on critical tools like `delete_service` or `delete_consumer`. Mastra AI halts the workflow and waits for external confirmation before sending the delete request to your gateway. This protects your production environment from accidental deletions.
You define a sequential workflow where the agent first runs `create_service`, grabs the resulting ID, and then passes it to `create_route`. Mastra AI manages the state between these steps, ensuring the route is correctly linked to the new service.
Your admin tokens and API gateway configurations are stored securely within your Vinkius environment variables. This MCP server only accesses the Kong admin endpoint to execute specific tool calls. Your sensitive configuration data is never cached or used for training models.

Start using the Kong Gateway MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 40 tools

We've already built the connector for Kong Gateway. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 40 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.