Explore

Build

Join the Megaport Community
Join the Megaport Community
The community for network engineers, IT leaders, and partners to swap ideas and build what’s next.
Join Community

Get in touch

Corporate Info

Partners

It's official: Megaport x Latitude.sh
It's official: Megaport x Latitude.sh
Latitude.sh dedicated compute meets Megaport private connectivity so you can launch fast and run anywhere.
Press Start
How to Manage Services From Your AI Assistant With the Megaport MCP Server

How to Manage Services From Your AI Assistant With the Megaport MCP Server

By Cameron Daniel, Chief Technology Officer

Use the Megaport MCP Server to diagnose faults, check connection pricing, and manage Port, MCR, MVE, and NAT Gateway settings from your AI assistant.

You run your network from more places than you used to. The Megaport Portal when you want to see it. Terraform when you want it in code. The CLI when you want to script it. And, more and more, an AI assistant that overlays everything, drafting configs, reading logs, and answering questions.

The Megaport MCP Server connects all of these so you can do more with your network. Point your assistant at the Megaport MCP Server, sign in with your Megaport login, and ask what is broken, what a connection would cost, or where the nearest on-ramp is. It answers from your live account, and when a service setting needs changing, it makes the change under your login and reports the result.

What is the Megaport MCP Server?

Whether you’re a network engineer on shift, an architect sizing a connection, or a partner answering a customer’s reach question, the Megaport MCP Server puts the answer where you are working.

This hosted Model Context Protocol endpoint at mcp.megaport.com speaks Streamable HTTP in stateless mode, and exposes the Megaport platform as a set of typed tools with descriptions written for tool routing. It works with any MCP-compatible client including Claude Desktop, Cursor, ChatGPT desktop, VS Code, and Copilot CLI.

Simply add the endpoint and the tools appear on the next list call — nothing to run, no client-side integration to write.

What you can ask the MCP Server with your AI assistant

Once you connect your AI assistant, everything your account can see in the Portal is also visible in conversation. One question gives you a live read across every service, whether you are starting a shift or responding to an alert.

Inventory

“List every service we have in Sydney, with status."
“Which of our Ports have VXCs attached, and to what?”

The answer is your account as it stands right now, not an export from last week.

Locations and on-ramps

“Where can I land an AWS Direct Connect in Ashburn?”

The assistant returns the Megaport locations in that metro and the partner ports available at each, so you know where a VXC can terminate before you design it.

Pricing

“What would a 1 Gbps VXC from our Ashburn Port to Azure ExpressRoute cost on a 12-month term, and what on 36?”

Monthly rate, setup fee, and per-Mbps charges come back per term, ready to paste into a design review.

Telemetry

“Show me peak throughput on our ten largest services over the last 30 days.”

Ports return traffic, errors, and optical readings. VXCs return A-End and B-End traffic. Ask for a different window or a different subset and it re-pulls.

Health

“What’s broken right now?”

One call scans every Port, VXC, MCR, MVE and IX in the account and returns only the problems, such as services down, VXC ends down, or BGP peers in a down state.

Diagnostics

“Why is this VXC flapping?”

Status, VLANs, cloud connection details, BGP state, and the last hour of traffic arrive in one answer. Where an MCR is involved, follow up with “show me its BGP peers and routes” and the assistant pulls them. For an IX, ask who is peering and how much traffic they carry.

What you can change

Grant read-write access and your assistant can change the settings on services you already run, like Ports, Megaport Cloud Router (MCR), Megaport Virtual Edge (MVE), and NAT Gateway.

Service settings

“Rename this MCR to syd-core-01, set the service level reference to NETOPS, and turn auto-renew off.”

Include the name, service level reference, and auto-renew on any of your active products. On an MCR or NAT Gateway with no VXCs attached yet, “set the ASN to 64512 and start BGP in shutdown” works too. On an MVE, “rename vNIC 2 to management” renames an interface already configured. Each call names only the fields you asked for, while everything else keeps its current value.

Resource tags

“Show me the tags on this Port” reads them.
“Add cost-centre:4410 to every service in Ashburn” writes them.

The assistant reads the existing set first because the tags endpoint replaces the full set on every write, then writes the merged result back.

Add-ons

“Add IPSec to this MCR with 20 tunnels” turns IPSec on.
“Take it to 30” resizes it.
“Remove IPSec” turns it off.

On a Port that is still being configured, “add a cross-connect” works where the location offers one. A live Port refuses.

Contract term

“Extend this Port to 24 months.”

Terms only go up, within each product’s rules. Where a change needs partner or marketplace approval, the API returns it as pending and the assistant tells you, rather than reporting it as applied. If the API refuses a change, you’ll see the reason the API gave.

How a change is made

When you connect your AI assistant to your MCP Server, the assistant does the work you would otherwise do in the Portal. Standard permissions are applied, so the agent is only permitted to do the same things the user driving the session is permitted to do.

Take this prompt as an example — “Re-term the following IDs to 12-month terms and turn auto-renew off” — followed by five short service IDs.

  1. The assistant resolves the short IDs against your account. It lists your services, matches four of the five, and tells you the fifth is not among your live or configured services before it changes anything.
  2. It calls reterm_service once per matched service. Each call carries your login and your api:write scope, and names only the two fields you asked for.
  3. The Megaport API applies each change under the same rules the Portal enforces. Three services move from month-to-month to 12 months, with auto-renew off. One was already on a 12-month term, so only auto-renew changes. The VXC is rejected, because it is on a 24-month contract and a running term can only go up. The assistant quotes the API’s reason and explains when a shorter term would be allowed.
  4. It offers the next sensible step — turning auto-renew off on the VXC and leaving its term alone — and waits. Say “leave it” and it does.
  5. Open the Portal and the four changed services show their new term and auto-renew setting.

The server holds no copy of the field rules and builds no preview of its own; it simply sends your requested change to the Megaport API and reports the response. There is no confirmation step on the server side. If you want one, ask the assistant to list the calls before it makes them.

MCP Server with Claude Code

Your login, your permissions

The MCP Server runs on the access controls your security team has already reviewed with nothing new to issue, rotate, or audit.

  • Authentication: OAuth 2.1 against the same identity provider as the Megaport Portal with no API keys.
  • Consent: Per client, per user. On first connection you approve the client in your browser and choose read-only or read-write, revocable at any time.
  • Authorization: Every tool call carries your identity and scope. The server calls the Megaport API under your own Portal permissions. If your role cannot change a service, neither can your assistant.
  • Data: The MCP Server keeps none of your data. Nothing is stored between requests, and every answer is read live from your Megaport account.

Get started in three steps

  1. Add https://mcp.megaport.com/mcp as an MCP server in your client. Most clients auto-detect the transport and the OAuth challenge.
  2. Sign in with your Megaport login and pick your access level.
  3. Ask the first question.

Three things to try with the MCP Server

1. Diagnose a fault

If you have Megaport Webhooks configured, you already have alerts landing in your tools. With the MCP Server you can go straight from the alert to the cause. Ask your assistant, “What’s broken on my Megaport estate right now?” and you get back only the faults. Ask for detail on one and it pulls the diagnostics for that service, including BGP peer state where an MCR is involved.

MCP server diagram

2. Tag a whole site in minutes

Tags are how you search an estate by cost center, owner, region, or environment, and they’re usually applied after the fact, one service at a time. With MCP Server, name a site and a tag and the assistant finds every service there, reads what each one already carries, and writes the new tag alongside.

Three things keep the process safe:

  1. Tags are key-value pairs, so a value without a key gets a question back before anything is written.
  2. The tags endpoint replaces the full set on every call, so the assistant reads first and merges rather than overwrites.
  3. Your client asks before the first write.

Try it on a site with nothing tagged. Start with, “List all services in Frankfurt with tags.” Then ask, “Tag all as emea”. When the assistant asks which key to use, reply “region”. Then, ask it to “Tag all as production” and the first tag will remain in place.

Finally, ask it to “Remove all tags.” Four services go from no tags, to two tags each, and back to none in about two minutes.

3. Ask for something it should refuse

Write access to a production network is only useful if you trust what the assistant will not do. The quickest way to find out is to ask for something that should fail and watch what happens.

Pick an MCR with a VXC attached and ask the assistant to change its ASN. An ASN cannot change while connections depend on it, and that rule lives in the Megaport API, not in the assistant.

Before it sends anything, the assistant reads the service, sees the attached VXC, sees the service is locked, and tells you it will not make the change and why. It then lays out what the change would take, in order: Unlock the MCR, move or terminate the VXC, change the ASN, rebuild the VXC and its BGP peering, and update the peer on the far end. It also tells you it has no tool to delete a VXC, so that step is yours in the Portal.

Nothing was written and the current ASN is untouched.

One network, more ways to work

The MCP Server joins a set of tools you already know. The Megaport Portal is still the right tool when you want to see your network and work through a considered change; Terraform is still the right tool for infrastructure you want in version control; the Megaport CLI, released earlier this year, is the right tool for scripting and pipelines.

The MCP Server adds a conversational way to work with your network. Ask it what the Portal would show you, then tell it what you want to change. Every one of these tools runs on the same API under the same permissions. Use whichever fits the moment.

Get full MCP Server tool reference and client setup guides here.

Related Posts

Megaport Success Stories: Mick Smith

Megaport Success Stories: Mick Smith

Mick gives us a behind-the-scenes look at how he’s using data to help Megaport push the boundaries of innovation.

Read More
What Is S3-compatible Backup Storage?

What Is S3-compatible Backup Storage?

Learn what S3-compatible backup storage is, how it works, and why teams use it for scalable, flexible cloud backup.

Read More
Why Brazil is Your Key to Unlocking Business Growth in Latin America

Why Brazil is Your Key to Unlocking Business Growth in Latin America

Discover why Brazil’s growing tech industry and booming economy make it a prime destination for businesses looking to expand into Latin America.

Read More