AI Assistants (MCP)

Run LoadFocus from your AI assistant (MCP)

The LoadFocus MCP server lets an AI assistant such as Claude operate your LoadFocus account directly. You ask in plain language ("load test my checkout page from Europe", "set up an API monitor for this endpoint", "how did my Core Web Vitals trend this week?") and the assistant uses LoadFocus tools to create tests, run them, read results, and report back.

It works across every LoadFocus service through a single connection:

  • Cloud, k6 and JMeter load testing (loadfocus.com/load-testing)
  • Page Speed monitoring with Lighthouse and Core Web Vitals (loadfocus.com/page-speed-monitoring)
  • API monitoring with scheduled checks, assertions and alerts (loadfocus.com/api-monitoring)

Everything runs inside your account and your active team, with your plan limits enforced by the LoadFocus backend exactly as they are in the dashboard. The assistant cannot do anything you could not do yourself in the UI.

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external tools and data. LoadFocus exposes its platform as an MCP server, so any MCP-capable client (Claude Desktop, the Claude web connectors, and other MCP clients) can call LoadFocus tools on your behalf once you authorize it.

  • Server URL: https://mcp.loadfocus.com/api
  • Sign-in: your normal LoadFocus account (OAuth)
  • Scope of access: the team you are currently working in

Connect your assistant

Connect to Claude from the LoadFocus MCP page at loadfocus.com/mcp

You can connect in two ways: an interactive OAuth sign-in (best for Claude), or an API key (best for scripts).

Option A: OAuth (recommended, for Claude and interactive clients)

This is the easiest path and never exposes a long-lived key.

  1. In your MCP client, add a custom connector / MCP server with the URL:

    https://mcp.loadfocus.com/api
  2. The client opens a LoadFocus sign-in page. Log in with your normal LoadFocus account.

  3. Review and approve the access request. LoadFocus asks for:

    • Read access (mcp:read) so the assistant can list and read your tests, monitors and results.
    • Write access (mcp:write) so it can create and run tests and monitors when you ask.
  4. You are returned to your client and the LoadFocus tools become available.

The connection uses standard OAuth 2.0 with PKCE. Access tokens last 30 days and refresh automatically, so you only sign in occasionally. You can revoke a connection at any time from your LoadFocus account.

Option B: API key (for scripts and non-interactive clients)

If your MCP client supports a bearer token instead of an interactive login, you can authenticate with a LoadFocus API key.

  1. Create or copy an API key from loadfocus.com/account/api-keys.

  2. Configure your client to send the header:

    Authorization: Bearer YOUR_LOADFOCUS_API_KEY
  3. To target a specific team, also send a Team-Id header with the team id. Without it, your default team is used.

An API key grants full read and write access, so treat it like a password.

Plans: what is free and what needs an upgrade

The MCP server respects the same plan rules as the dashboard:

  • Free plans can create and run cloud URL load tests, browse results, and use the read tools, Page Speed and API monitoring features within their normal limits.
  • k6 and JMeter test creation and execution require a paid plan.
  • AI test analysis consumes AI credits from your plan.
  • Page Speed checks and other usage are capped per plan. Ask the assistant to "check my plan limits" at any time.

When a tool needs a higher plan, it returns a clear upgrade_required message rather than failing silently.

Tools available

Tools are grouped by service below. Read tools are safe to call anytime. Write tools change your account (create, run, delete), and a few are marked costs money (they start a real test or check) or destructive (they delete data permanently).

Account and discovery

ToolWhat it does
search_toolsSearch the tool catalog by keyword, category or intent. Useful for finding the right tool.
list_teamsList the teams you belong to, with the active one marked.
set_current_teamSwitch the active team for following actions.
get_planShow your plan and account status.
get_plan_limitsShow current usage and remaining quota (Page Speed usage and AI credits).
get_ai_creditsShow your AI analysis credit balance.
list_test_locationsList the AWS regions available for tests and monitors.

Load testing (cloud, k6, JMeter)

Read

ToolWhat it does
list_load_testsList saved load tests for a type (cloud, k6 or jmeter), optionally filtered by name.
get_test_configRead a saved test's configuration (clients, duration, regions, scripts).
get_test_run_statusCurrent state of a run (pending, running, finished, aborted).
get_test_results_summaryAggregate result for a finished run (response times, throughput, error rate).
get_test_results_timeseriesTime-series metrics over a window, for charts and trends.
get_test_labelsThe per-request labels (samplers) recorded for a run.
get_test_baselineA stored baseline so you can compare "is this run faster than before?".

Write

ToolWhat it does
create_cloud_load_testCreate a cloud test that hits a URL with N clients for a duration, from one or more regions. Runs on any plan.
create_k6_testCreate a k6 test from an inline script (paid plan).
create_jmeter_testCreate a JMeter test from an inline .jmx script (paid plan).
run_load_testStart a saved test. Costs money.
stop_load_testStop a running k6 or JMeter test.
analyze_test_resultsRun AI analysis on a finished run and explain bottlenecks. Uses AI credits.

Page Speed monitoring (Lighthouse and Core Web Vitals)

ToolWhat it does
list_pagespeed_monitorsList your Page Speed monitors.
create_pagespeed_monitorCreate a monitor for a URL (mobile or desktop, region, schedule, custom headers).
run_pagespeed_checkRun a check now and wait for the result (up to about two minutes). Costs money.
get_pagespeed_resultsLatest scores and Core Web Vitals for a monitor.
get_pagespeed_trendsAverage score and pass/fail trend over a window (for example the last 7 days).
set_pagespeed_scheduleTurn scheduled checks on or off for a monitor.
create_pagespeed_alertAlert when a category score (performance, accessibility, best practices, SEO, PWA) drops below a threshold.
delete_pagespeed_monitorDelete a monitor and its results. Destructive.

API monitoring

ToolWhat it does
check_api_endpointRun a one-off check against any endpoint right now (method, headers, body, basic auth, assertions, regions). No saved monitor needed. Costs money.
list_api_monitorsList your saved API monitors.
create_api_monitorCreate a scheduled monitor (request plus assertions plus schedule).
run_api_monitorRun a saved monitor now. Costs money.
set_api_monitor_scheduleTurn scheduled checks on or off.
get_api_monitor_resultsLatest results, or the current run state.
create_api_alertAlert on a threshold, for example response time over N milliseconds or a status code condition.
get_alert_historyList a monitor's alerts, or the firing history of one alert.
delete_api_monitorDelete a monitor, its results and its schedule together. Destructive.

Resources and prompts

Beyond tools, the server publishes resources (read-only context the assistant can pull in automatically) and prompts (ready-made multi-step workflows you can trigger by name).

Resources

  • account-summary: your identity, plan, status and active team.
  • current-team: the team this connection is scoped to.
  • locations: the regions available for tests and monitors.
  • recent-tests: your most recent tests and monitors across all services, in one list.

Prompts

  • run-load-test: create and run a load test against a URL, recommend a config within your plan, run it, poll to completion, and summarize the results. Confirms before spending.
  • analyze-last-run: find your most recent finished load test, pull results, run AI analysis, and explain bottlenecks and next steps.
  • setup-api-monitor: turn an endpoint or a curl command into a scheduled monitor: test it once, propose assertions, then create it with a schedule and optional alert.
  • weekly-performance-report: a cross-service weekly summary of load tests, Core Web Vitals trends and API uptime, with regressions called out.

Example conversations

You do not need to know tool names. Just describe what you want. Here are typical flows.

Run a cloud load test

"Load test https://example.com/checkout with 200 users for 5 minutes from US East and Frankfurt, then tell me the p95 and error rate."

The assistant checks your plan and locations, proposes a config and asks you to confirm (running a test costs money), creates the test, runs it, polls until it finishes, and reports the summary. You can then say "analyze this run" for an AI breakdown of bottlenecks.

Set up an API monitor from a curl command

"Here is a curl command for my API. Test it once, then set up a monitor every 5 minutes that alerts me if it is slower than 800 ms or returns a non-200."

The assistant parses the request, runs a one-off check_api_endpoint, proposes assertions, and after you confirm creates the monitor, schedule and alert.

Track Core Web Vitals

"Create a mobile Page Speed monitor for my homepage, run it now, and alert me if performance drops below 80."

Weekly health check

"Give me this week's performance report across all my tests and monitors, and call out anything that regressed."

Permissions, safety and limits

  • Read vs write. Read tools never change anything. Write tools require the mcp:write permission you granted at sign-in. If you connect with read-only access, the assistant can browse but not create or run.
  • Spending is explicit. Tools that start a real test or check are marked as costing money, and the built-in prompts confirm with you before spending.
  • Destructive actions. Deleting a monitor removes its results permanently. The assistant should confirm before deleting.
  • Team scoping. Every action runs inside your active team. Use list_teams and set_current_team (or just ask "switch to team X") to change it.
  • Your plan is the boundary. Plan limits are enforced server-side. A free account asking to run a JMeter test gets a clear upgrade message, not a broken result.

Troubleshooting

  • The assistant says it needs to sign in again. Tokens refresh automatically, but if a connection is revoked or expires you simply re-authorize through the same connector flow.
  • A tool says "upgrade required". That feature needs a paid plan. Ask "what plan am I on?" and upgrade at loadfocus.com/pricing.
  • A tool says "insufficient scope". You connected with read-only access. Reconnect and approve write access to create or run tests.
  • Wrong account or team. Ask the assistant to "list my teams" and "switch to team X", or check the account-summary resource.

Related LoadFocus services

LoadFocus is a cloud testing platform that offers: