Model Context Protocol (MCP) Server

Connect your AI tools and agents to Network as Code using the Model Context Protocol (MCP). Once connected, your AI assistants can interact with Network as Code APIs, query your applications, and help you build programmable mobile network features.

What is MCP?header link

The Model Context Protocol (MCP) is an open standard that enables Large Language Models (LLMs) to securely connect to external platforms and APIs. With the Network as Code MCP server, you can use AI agents in editors like Cursor, VS Code, and Claude to access network capabilities, manage applications, and interact with our APIs through agents.

Installationheader link

To install the Network as Code MCP server:

  1. Navigate to the API playground
  2. Click the MCP Playground button on the left sidebar
  3. Copy the configuration snippet and add it according to the installation instructions of your AI tool (Cursor, VS Code, Windsurf, Claude Desktop, etc.)

Available toolsheader link

Once connected, the Network as Code MCP server provides AI agents with direct access to network capabilities through MCP tools. These tools map directly to the Network as Code APIs, allowing your AI assistant to directly interact with mobile network features.

The MCP server exposes tools that enable AI agents to:

Network Quality Management

Device Status & Connectivity

Location Services

Security & Verification

Network Slicing

Know Your Customer (KYC)

Congestion Insights

Using the MCP serverheader link

Getting startedheader link

After installation, verify the connection by asking your AI agent to interact with Network as Code APIs. For example:

Check if device with phone number +1234567890 is currently roaming

The AI agent will use the appropriate MCP tools to query the device status and provide you with the information.

Example promptsheader link

Here are some useful prompts to try with your AI agent:

Quality on Demand:

Create a Quality on Demand session for my device to ensure low latency
for the next 30 minutes

Device verification:

Verify the location of device with phone number +1234567890
using Network as Code APIs

SIM Swap detection:

Check if there was a SIM swap for phone number +1234567890
in the last 7 days

Network Slicing:

Show me all available network slices and their current status

Geofencing:

Create a geofencing subscription to notify me when device +1234567890
enters or exits the area around latitude 40.7128, longitude -74.0060
with a radius of 1km

Best practicesheader link

When using the Network as Code MCP server:

Security considerationsheader link

Protecting your dataheader link

Prompt injection risksheader link

AI agents can be vulnerable to prompt injection attacks. To mitigate risks:

Troubleshootingheader link

Connection issuesheader link

If your MCP client can't connect to the Network as Code server:

  1. Verify your internet connection
  2. Check that your API key is correctly configured in the MCP settings
  3. Restart your editor or MCP client
  4. Check your MCP client logs for error messages

Authentication failuresheader link

If authentication fails:

  1. Verify your API key is valid and active in the Console
  2. Check that you've copied the API key correctly (no extra spaces)
  3. Try generating a new API key from your application dashboard
  4. Ensure you have the necessary permissions on your account

Last updated January 22, 2026