MCP Server

Explore your TrafficPeak data using natural language prompts with the TrafficPeak MCP server. This server allows large language model (LLM) clients to interact with TrafficPeak databases through the Model Context Protocol. Claude, GPT, and other LLMs can query data, explore databases, and analyze tables.

📘

What's the Model Context Protocol?

MCP isn't the LLM application itself, but rather the bridge between the LLM application and your data. The LLM application handles reasoning and natural language, while the MCP server handles authentication, query execution, and data access.

Choose your deployment mode

TrafficPeak MCP supports two deployment modes: a remotely hosted MCP server and a local one. They provide identical capabilities and use the same authentication.

Remote MCP (HTTP/SSE)Local MCP (stdio)
How it runsServer-side in a TrafficPeak environmentOn a local machine
InstallationNone. Connect using a URL.Requires Python 3.13+ and the uv package manager
Best forWeb-based AI tools, teams that require centralized accessLocal development
Works withAny client that supports the Model Context ProtocolAny client that supports the Model Context Protocol

Remote MCP (HTTP/SSE)

Remote MCP runs in a TrafficPeak environment. Local installation isn't required. MCP-compatible AI tools connect to the remote MCP server URL using one of two supported transport modes:

  • HTTP: Remote access over HTTP
  • SSE: Server-Sent Events for streaming responses

Quickstart

Connect to the MCP server at https://<your-trafficpeak-hostname>/mcp, authenticating with a service account token. See the Authentication section for details.

Find your TrafficPeak hostname

If you're a Grafana admin, find your hostname in the Grafana data source configuration:

  1. In the Grafana left sidebar, select Connections > Data sources, or go directly to https://<your-grafana-domain>/connections/datasources.
  2. Select the name of your TrafficPeak data source.
  3. Read the hostname from the Server address field near the top of the configuration page.

If you don't have Grafana admin access, contact your ​Akamai​ account team.

Remote client configurations

Remote Claude Code

For Claude Code CLI, use the claude mcp add command with header authentication.

claude mcp add --transport http mcp-trafficpeak https://<your-trafficpeak-hostname>/mcp --header "Authorization: Bearer <your-service-account-token>"

Remote ChatGPT

ChatGPT supports HTTP mode only. Follow the instructions in ChatGPT Developer mode, use the URL https://<your-trafficpeak-hostname>/mcp, and provide a service account token. Note that some lower ChatGPT subscription levels disallow MCP.

Other HTTP-capable clients

Point any HTTP-capable MCP client at https://<your-trafficpeak-hostname>/mcp and pass your service account token in the HTTP Authorization header.

Local MCP (stdio)

Local MCP runs as a process on your machine and uses the stdio (Standard input/output) transport mode.

Before you begin

Before configuring the TrafficPeak MCP server, make sure you have these prerequisites:

Install uv

The uv package manager is required to run the TrafficPeak MCP server in the stdio mode. The uvx launcher used in the configuration examples ships with uv. Install it using one of these methods.

curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
pip install uv

After installation, verify that uvx is available:

uvx --version

For more installation options and details, see the uv documentation.

Environment variables

The TrafficPeak MCP server requires certain environment variables to connect to your environment.

  • Required: HYDROLIX_HOST: The hostname of your TrafficPeak environment.
  • Optional: Additional configuration options control port settings, SSL verification, default database, transport method, and server binding preferences. Refer to the mcp-hydrolix GitHub repository for the complete list of optional variables.
📘

Why "HYDROLIX_" in the variable names?

The TrafficPeak MCP server is built on the open-source mcp-hydrolix binary. The variable names are part of the underlying binary and aren't TrafficPeak-specific.

Local client configurations

These configuration examples cover popular MCP clients. Consult your preferred client documentation for specific instructions on how to configure an MCP server.

Local Claude Desktop

To configure the MCP server for Claude Desktop, add this entry to your claude_desktop_config.json file:

{
  "command": "uvx",
  "args": [
    "--python",
    "3.13",
    "--refresh-package",
    "mcp-hydrolix",
    "mcp-hydrolix"
  ],
  "env": {
    "HYDROLIX_HOST": "<your-trafficpeak-hostname>",
    "HYDROLIX_TOKEN": "<your-service-account-token>"
  }
}

Local Claude Code

For Claude Code CLI, use the claude mcp add command to add an MCP server.

claude mcp add --transport http mcp-trafficpeak \
  https://<your-trafficpeak-hostname>/mcp --header \
  "Authorization: Bearer <your-service-account-token>"
claude mcp add --transport stdio mcp-trafficpeak \
  --env HYDROLIX_TOKEN=<your-service-account-token> \
  --env HYDROLIX_HOST=<your-trafficpeak-hostname> \
  --env HYDROLIX_MCP_SERVER_TRANSPORT=stdio \
  -- uvx --python 3.13 --refresh-package mcp-hydrolix mcp-hydrolix

Local Cursor IDE

To configure the MCP server for Cursor, add this entry to your Cursor mcp.json settings file:

{
  "command": "uvx",
  "args": [
    "--python",
    "3.13",
    "--refresh-package",
    "mcp-hydrolix",
    "mcp-hydrolix"
  ],
  "env": {
    "HYDROLIX_HOST": "<your-trafficpeak-hostname>",
    "HYDROLIX_TOKEN": "<your-service-account-token>"
  }
}

Local ChatGPT

For ChatGPT follow the instructions in ChatGPT Developer mode.

ChatGPT only supports HTTP mode. Note that some lower ChatGPT subscription levels disallow MCP.

Other clients

For other LLM platforms that support MCP integration, follow the client's specific MCP configuration instructions.

The general pattern for stdio mode requires:

  • The uvx command (which ships with uv) as the server executor
  • Arguments that install and launch the package at runtime: --python 3.13 --refresh-package mcp-hydrolix mcp-hydrolix
  • Environment variables for HYDROLIX_HOST and a service account token

Consult the platform's MCP documentation for the exact configuration file location and format.

Authentication

The TrafficPeak MCP server authenticates with service account tokens. A service account token is scoped per-customer, is read-only, and is managed by ​Akamai​.

Obtain a service account token

Service account tokens for TrafficPeak customers are issued through ​Akamai​ support. To request a token, open a support case at the ​Akamai​ Control Center and include:

  • Your name and email address
  • Your TrafficPeak customer name

Authentication precedence

The MCP server supports multiple authentication methods with this precedence (highest to lowest):

  1. Header: Per-request service account token provided by the Authorization: Bearer <your-service-account-token> header. See Remote Claude Code or Local Claude Code for examples.
  2. Environment variable: A service account token configured using the HYDROLIX_TOKEN environment variable.
export HYDROLIX_TOKEN="<your-service-account-token>"

When multiple authentication methods are configured, the server uses the first available method in the previous precedence order.

The header method attaches a token to each individual request. It works only over HTTP or SSE. With the stdio method, the server reads the token once from HYDROLIX_TOKEN at startup.

Check token expiration

Service account tokens are JSON Web Tokens (JWTs) that contain an expiration timestamp in the exp field. Decode the token locally using any JWT decoder.

The following examples extract the issue and expiration times from a service account token stored in the environment variable HYDROLIX_TOKEN.

payload=$(echo "$HYDROLIX_TOKEN" | cut -d. -f2 | tr '_-' '/+')
payload=$payload$(printf '%*s' $(( (4 - ${#payload} % 4) % 4 )) '' | tr ' ' '=')
echo "$payload" | base64 -d 2>/dev/null \
  | jq '{issued: (.iat | floor | todate), expires: (.exp | floor | todate)}'
$payload = ($env:HYDROLIX_TOKEN -split '\.')[1]
$payload = $payload.PadRight($payload.Length + (4 - $payload.Length % 4) % 4, '=')
$payload = $payload.Replace('-', '+').Replace('_', '/')
$decoded = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($payload)) | ConvertFrom-Json
[PSCustomObject]@{
    Issued  = [DateTimeOffset]::FromUnixTimeSeconds($decoded.iat).ToString('u')
    Expires = [DateTimeOffset]::FromUnixTimeSeconds($decoded.exp).ToString('u')
}
import base64, json, os
from datetime import datetime, timezone

token = os.environ["HYDROLIX_TOKEN"]
payload = token.split(".")[1] + "=="
decoded = json.loads(base64.urlsafe_b64decode(payload))
issued = datetime.fromtimestamp(decoded["iat"], tz=timezone.utc)
expires = datetime.fromtimestamp(decoded["exp"], tz=timezone.utc)
print(f"Issued:  {issued.isoformat()}")
print(f"Expires: {expires.isoformat()}")

Revoke a token

To revoke a service account token, open a support case at the ​Akamai​ Control Center.

Available tools

The MCP server provides these tool descriptions to the LLM client.

  • run_select_query: Executes SQL queries
  • list_databases: Displays all databases in the TrafficPeak environment
  • list_tables: Shows tables within a specified database
  • get_table_info: Gets table metadata, such as the schema

Security and governance

The TrafficPeak MCP server constrains every query on the server side:

  • Read-only. Writes, schema changes, and administrative operations are blocked. Each tool is registered with a read-only attribute, and the server applies the TrafficPeak environment's readonly setting on every query.
  • Maximum 100,000 result rows per query.
  • Maximum 2 GiB of memory per query.
  • Maximum execution time of 30 seconds per query.
  • No automatic retries on query failure.

These limits apply in addition to any role-based access control on the service account token, and any query governance already configured for your TrafficPeak environment. The MCP server source code is open and auditable in the hydrolix/mcp-hydrolix repository.

📘

What a compromised token can do

A leaked token grants the same access as the service account it represents: read-only SQL access to the tables the role permits, capped by the limits in this section. There is no write path and no path to escalate access from a stolen token.

Usage tips

To use the MCP server, follow these recommended practices to improve query construction.

Take this basic prompt:

Query logs for all recent errors.

Specify the database and table names clearly in the request.

Query the cdn_request_logs and cdn_edge_logs tables from the logs database for all recent errors.

Include specific time ranges in queries to use primary key optimizations.

Query the cdn_request_logs and cdn_edge_logs tables from the logs database for all errors in the last hour.

Request timestamp-ordered output for better performance.

Query the cdn_request_logs and cdn_edge_logs tables from the logs database for all errors in the last hour, ordered by most recent timestamp.

The result is a more efficient query that returns only relevant data.

Architecture diagrams

The TrafficPeak MCP server has two deployment models: local (stdio) where it runs on the client machine, and remote (HTTP/SSE) where it runs within the TrafficPeak environment.

Local (stdio)

---
config:
  themeVariables:
    fontSize: 30px
---
graph LR
accTitle: Local MCP server deployment with stdio transport
accDescr {
A user sends a natural language prompt to an LLM client running on their
local machine. The LLM client forwards the request to the TrafficPeak MCP
server (also running locally) over the stdio transport. The MCP server
issues SQL queries to the remote TrafficPeak environment and returns
structured results to the LLM client, which composes an AI response back
to the user.
}

User[User]
LLM[LLM Client]
MCP[TrafficPeak MCP server]
Environment[TrafficPeak environment]

    User -->|Prompt| LLM
    LLM -->|"MCP request<br/>(_stdio_)"| MCP
    MCP -->|SQL Queries| Environment
    Environment -->|Query Results| MCP
    MCP -->|Structured Data| LLM
    LLM -->|AI Response| User

Remote (HTTP/SSE)

---
config:
  themeVariables:
    fontSize: 30px
---
graph LR
accTitle: Remote MCP server deployment with HTTP or SSE transport
accDescr {
A user sends a natural language prompt to an LLM client. The LLM client
forwards the request over HTTP or SSE to the TrafficPeak MCP server,
which runs inside the TrafficPeak environment alongside the Query Head.
The MCP server issues SQL queries to the Query Head and returns
structured results to the LLM client, which composes an AI response back
to the user.
}

    User[User]
    LLM[LLM Client]

    subgraph "TrafficPeak"
        MCP[MCP server]
        QueryHead[Query server]
    end

    User -->|Prompt| LLM
    LLM -->|"MCP request<br/>(_HTTP/SSE_)"| MCP
    MCP -->|SQL Queries| QueryHead
    QueryHead -->|Query Results| MCP
    MCP -->|Structured Data| LLM
    LLM -->|AI Response| User

Related resources