action.skip

Getting Started with the Megaport MCP Server

This topic describes the prerequisites and required setup steps to get started using the Megaport MCP Server.

Prerequisites

This section describes the basic setup steps and provides the necessary links to start using the Megaport MCP Server. Before using the Megaport MCP Server, you need to:

  1. Understand Megaport’s services – Understand the process of creating services and the features of each service.

  2. Understand Megaport Portal environments – Megaport provides two Portal environments, the production environment and the staging environment. You can test any action in the staging environment. All actions mirror the production system, but services will not be deployed and you will not be billed for any activity. For more information, see Testing Configurations in the Staging Environment.

  3. Create a Megaport account – If you have not already created one, see Creating an Account.

  4. Add and modify users – Any user role can access the Megaport MCP Server. For more information, see Adding and Modifying Users.

  5. Install your AI command line interface (CLI) tool – such as Claude Code, Codex, Gemini CLI, and so on. For more information, see each AI tool provider’s website.

Available environments to use the Megaport MCP Server

You can access the Megaport MCP Server at the following URLs.

  • Staging: https://mcp-staging.megaport.com/mcp
  • Production: https://mcp.megaport.com/mcp

User authentication is managed via OAuth 2.1, allowing you to log in securely using your Megaport Portal credentials. Most MCP clients handle this authentication flow automatically, ensuring a seamless setup. For more information about OAuth 2.1, see OAuth 2.1.

Setting up the Megaport MCP Server

Configuration and authentication methods for MCP servers vary by AI assistant. The following guides provide step-by-step integration examples for some common platforms.

Claude Code

  1. Run the following command.

    claude mcp add --transport http -s user megaport https://mcp.megaport.com/mcp
    
  2. Authenticate your access.

  3. Start Claude Code (claude).

  4. Type /mcp to open the MCP server list.
  5. Select the megaport server.
  6. Choose Authenticate.
    This opens your browser.

    Portal authentication

  7. Log in with your Megaport Portal credentials. authorization successful

  8. After successfully logging in, return to Claude Code.
    The server should show as connected.

Note

Authentication tokens are cached, so you only need to do this once, or when your token expires.

Copilot CLI

  1. Run the following command.

    copilot mcp add --transport http megaport https://mcp.megaport.com/mcp
    
  2. Start Copilot CLI (copilot).
    It should automatically open a login authentication browser window.

  3. Enter your Megaport Portal credentials in the browser.

  4. After successfully logging in, return to Copilot CLI.
    The server should show as connected.

Gemini CLI

  1. Run the following command.

    gemini mcp add -t http megaport https://mcp.megaport.com/mcp --scope user
    
  2. Authenticate your access.

  3. Start Gemini CLI (gemini).

  4. Type /mcp auth megaport.

  5. Choose Yes.
    It should automatically open a login authentication browser window.

  6. Log in with your Megaport Portal credentials.

  7. Enter your Megaport Portal credentials in the browser.

  8. After successfully logging in, return to Gemini CLI.
    The server should show as connected.

Codex

  1. Run the following command.

    codex mcp add megaport --url https://mcp.megaport.com/mcp
    
  2. Run the following command.

    codex mcp login megaport
    
  3. It should automatically open a login authentication browser window.

  4. Log in with your Megaport Portal credentials.

  5. Enter your Megaport Portal credentials in the browser.

  6. After successfully logging in, return to Codex.
    The server should show as connected.

Helpful references