Blue Triangle Help Center
Auto Light Dark
Auto Light Dark

Blue Triangle MCP Server: Performance Endpoint

Overview

The Blue Triangle MCP (Model Context Protocol) Server gives AI assistants direct access to your Blue Triangle performance monitoring data. Use it to query site performance metrics in plain language, automate analysis, and generate insights—no manual API integration required.

Current Status: The Performance Endpoint MCP Server is now available. Additional MCP servers and expanded tool capabilities are actively in development.

Prerequisites

  • An BT MCP-compatible client (Cursor, Windsurf, Antigravity and any custom MCP client)

  • A Blue Triangle account with API access

  • Your API credentials: Site Tag Prefix, user API Key, and user API Email

Server Configuration

The Blue Triangle MCP Server uses HTTP transport with header-based authentication. We currently support Cursor, Windsurf, Antigravity and any custom MCP client. Support for Claude Desktop is currently in development. 

Add the following to your MCP client configuration, replacing the placeholder values with your actual credentials:

{
  "mcpServers": {
    "bluetriangle": {
      "transport": "http",
      "url": "https://mcp.bluetriangle.com/mcp",
      "headers": {
        "X-API-Key": "API KEY",
        "X-API-Email": "USER EMAIL",
        "X-Site-Prefix": "TAG PREFIX",
	      "Revenue-Enabled": "true/false"
  }
}
}

Note, Revenue-Enabled is optional.

Example Configuration for Cursor AI

Steps

  1. Go to Settings > Tools & MCP.

  2. Click New MCP Server. This opens an mcp.json file.

  3. Add the Blue Triangle MCP server configuration. Replace <YOUR_BLUE_TRIANGLE_EMAIL> and <YOUR_BLUE_TRIANGLE_API_KEY> with your own values, then save the file. 

   {
     "mcpServers": {
       "Blue Triangle": {
         "url": "https://mcp.bluetriangle.com/mcp",
         "headers": {
           "X-API-Email": "<YOUR_BLUE_TRIANGLE_EMAIL>",
           "X-API-Key": "<YOUR_BLUE_TRIANGLE_API_KEY>"
         }
       }
     }
   }
  1. Save and restart Cursor.

Example Configuration for Claude

Steps

  1. In Claude, click your name in the bottom-left corner.

  2. Open Settings (gear icon).

  3. Go to Connectors.

  4. Search for Blue Triangle MCP.

  5. Click Connect next to Blue Triangle MCP.

  6. A login portal will open. Log in with your Blue Triangle account (username/email and password, or Sign in with Google).

  7. On the authorization screen, click Authorize.

  8. You'll be redirected back to Claude. Ask Blue Triangle will now appear in your pins.

Result

Once connected, you can use the Ask Blue Triangle pin to query Blue Triangle data directly within Claude.

Available Tools

get_performance_data

Retrieve raw and aggregated performance and business data captured by Blue Triangle. Data can be broken down by minute, hour, or day, and grouped by dimensions such as country, region, or page name.

Required Parameters

Parameter

Type

Description

Default

startDate

integer

Start time as a Unix epoch timestamp in seconds

24 hours ago

endDate

integer

End time as a Unix epoch timestamp in seconds

Now

group

array

Group-by dimensions (e.g. country, pageName)

["country"]

columns

array

Metrics to return (e.g. onload, firstByte)

["onload", "firstByte"]

dataType

string

rum, native, synthetic, or basepage

rum

Note: The basepage dataType returns data for both base page measurements and advanced synthetic scripts.

Optional Parameters

Parameter

Description

avgType

Statistical method used for calculations

percentile

Percentile value if avgType is percentile (0-100)

bucketSize

Group data by minute, hour, or day

bucketValue

Size of each time bucket

urlSearch

Filter by URL substring; wildcards (*) supported

pageName

Filter by page name

pageGroup

Filter by page group

trafficSeg

Filter by traffic segment

browser

Filter by browser

device

Filter by device

os

Filter by operating system

country

Filter by country

region

Filter by region

netspeed

Filter by network speed

campaignSource

Filter by traffic source

campaignName

Filter by campaign name

campaignMedium

Filter by traffic medium

abSegment

Filter by A/B test segment

datacenter

Filter by data center

isp

Filter by Internet Service Provider

botTraffic

Filter by bot traffic type (bots excluded by default)

visitorType

Filter by new or returning visitors (both included by default)

resourceOnly

Limit to sessions with resource data captured (default: no)

salesType

Use standard sales or brand value (default: sales)

agentLocation

Synthetic agent location code (synthetic dataType only)

notAllPages

Set to 1 to exclude "All Pages" when grouping by page name

removeGetParams

Strip query parameters from URLs

excluded

Beacon type filter: standard (0), email (4), custom (20), or combination

customCategory

Configurable data collection category (1-5)

customVariable

Configurable data collection variable (1-5 or 11-15)

sessionID

RUM or Synthetic session ID

Sample Request

{"startDate": 1737000000,
 "endDate": 1737086400,
 "group": ["pageName"],
 "columns": ["largestContentfulPaint", "pageHits", "onload"],
 "dataType": "rum"}

compare_performance_data

Compare performance data between two date ranges. This tool calls the performance API twice and returns side-by-side comparison data—ideal for queries like 'this week vs. last week' or 'current month vs. previous month.'

Required Parameters

Parameter

Type

Description

Default

startDate1

integer

Start of first date range (Unix epoch, seconds)

7 days ago

endDate1

integer

End of first date range (Unix epoch, seconds)

Now

startDate2

integer

Start of second date range (Unix epoch, seconds)

14 days ago

endDate2

integer

End of second date range (Unix epoch, seconds)

7 days ago

group

array

Group-by dimensions

["country"]

columns

array

Metrics to return

["onload", "firstByte"]

dataType

string

rum, native, synthetic, or basepage

rum

Note: This tool accepts the same optional parameters as get_performance_data (see above).

Available Metrics

Core Web Vitals & User Experience

Metric

Description

Unit

largestContentfulPaint

Largest Contentful Paint (LCP) – loading performance

ms

intToNextPaint

Interaction to Next Paint (INP) – interactivity

ms

cumulativeLayoutShift

Cumulative Layout Shift (CLS) – visual stability

score

firstContentfulPaint

First Contentful Paint (FCP) – first content render

ms

totalBlockingTime

Total Blocking Time (TBT) – load responsiveness

ms

firstInputDelayDuration

First Input Delay (FID) – legacy metric

ms

Note: Current Core Web Vitals (as of March 2024) are LCP, CLS, and INP. FID is available for historical analysis only.

Page Load Timing

Metric

Description

Unit

onload

Page Onload Time – total load time

ms

firstByte

Time to First Byte (TTFB) – server response time

ms

dns

DNS Lookup Time

ms

tcp

TCP Connection Time

ms

ssl

SSL Handshake Time

ms

redirect

Redirect Time

ms

basePage

Base Page Time

ms

dom

DOM Processing Time

ms

timeToInteractive

Time to Interactive (TTI)

ms

fullyLoadedTime

Fully Loaded Time

ms

speedIndex

Speed Index – visual progress score

score

Business & Traffic

Metric

Description

Unit

visitors

Unique Visitors

count

pageHits

Page Views

count

revenue

Total Revenue

currency

orders

Total Order Count

count

Error & Status Tracking

Metric

Description

Unit

jsErrorCount

JavaScript Error Count

count

200_code

HTTP 200 (Success)

count

300_code

HTTP 300 (Redirects)

count

400_code

HTTP 400 (Client Errors)

count

500_code

HTTP 500 (Server Errors)

count

600_code

HTTP 600 (Custom Errors)

count

Example Queries

Core Web Vitals

  • "Show me Core Web Vitals (LCP, INP, CLS) for the last 7 days"

  • "What's our LCP performance by device type this month?"

  • "Show me 95th percentile LCP by country"

  • "Compare this week's performance to last week"

  • "Show me daily onload time trends for the last 30 days"

  • "How has First Byte time changed over the past month?"

Multi-Dimensional Analysis

  • "Break down page load times by browser, device, and country"

  • "Show me performance metrics by A/B test segment"

  • "Compare performance across page groups by visitor type"

Error Monitoring

  • "Show me JavaScript error counts by page for the last 24 hours"

  • "What's our HTTP error rate by status code this week?"

Important Notes

Timestamps & Time Ranges

  • All timestamps must be Unix epoch in seconds (e.g., 1737067739).

  • All timing metrics are returned in milliseconds.

  • Maximum date range per query: 90 days.

  • Rate limit: 60 calls per minute per user.

Data Aggregation

  • Geometric mean is used by default for performance metrics.

  • Use percentile aggregation for distribution analysis.

  • Maximum of 3 grouping dimensions per query.

Authentication

Authentication is handled automatically via the MCP configuration headers (X-API-Key, X-API-Email, X-Site-ID).

  • Never share credentials publicly.

  • Rotate API keys regularly.

  • Use separate credentials per environment.

  • Secure configuration files with appropriate file permissions.

Troubleshooting

Configuration Issues

  • Validate JSON syntax — no trailing commas.

  • Use "transport": "http" (not "url" or "sse").

  • Header names are case-sensitive.

Connection Issues

  • Verify your API credentials are active.

  • Confirm your Site ID is correct (must be numeric).

  • Restart your MCP client after any configuration changes.

  • Check firewall rules and network connectivity.

No Data Returned

  • Verify the time range and Unix timestamp conversion.

  • Confirm data collection was active during the queried period.

  • Check metric availability for your selected dataType.

  • Try a simpler query to isolate the issue.

Rate Limiting

  • If the rate limit is exceeded, wait 60 seconds before retrying.

  • Use time bucketing to retrieve more data in fewer queries.

Support & Resources