๐ BlazeMeter MCP Server
This project offers a Model Context Provider (MCP) server for seamless integration with BlazeMeter's API. It enables programmatic access to performance test data and management features. The server provides a suite of tools that MCP-compatible clients (such as Claude Desktop and Cursor) can use to interact with BlazeMeter resources.
๐ Quick Start
โจ Features
- Integrate with BlazeMeter's API programmatically.
- Provide tools for MCP-compatible clients to interact with BlazeMeter resources.
- Support Docker deployment for production.
- Enable Server-Sent Events (SSE) with a simple flag.
๐ฆ Installation
โ๏ธ Prerequisites
Before you start, make sure you have the following installed:
โ ๏ธ Important Note
If you run with a lower version of Node, fetch won't be available. The tools use fetch for HTTP calls. To work around this, you can modify the tools to use node-fetch instead. Make sure to install node-fetch as a dependency and import it as fetch in each tool file.
๐ฅ Installation Steps
1. Install dependencies
Run the following command from your project's root directory:
npm install
2. Check Node.js installation
3. Check Node.js version
node --version
4. Get the absolute path to mcpServer.js
๐ป Usage Examples
Connect the MCP Server to Claude Desktop or Cursor
You can connect your MCP server to any MCP client. Here are the instructions for connecting it to Claude Desktop and Cursor.
Claude Desktop
Step 1: Note down the full path to Node.js and the mcpServer.js from the previous steps.
Step 2: Open Claude Desktop โ Settings โ Developers โ Edit Config and add a new MCP server:
{
"mcpServers": {
"<server_name>": {
"command": "<absolute/path/to/node>",
"args": ["<absolute/path/to/mcpServer.js>"]
}
}
}
Restart Claude Desktop to apply the changes. Make sure the new MCP is enabled and has a green circle next to it. Once done, you can start a chat session using the connected tools.
Cursor
Step 1: Note down the full path to Node.js and the mcpServer.js from the previous steps.
Step 2: In Cursor, open the Command Palette and search for "MCP: Add Server" or go to Settings โ MCP Servers.
Step 3: Add a new MCP server with the following configuration:
- Command:
<absolute/path/to/node>
- Arguments:
<absolute/path/to/mcpServer.js>
Step 4: Save and enable the server. Cursor will show the MCP server as available, allowing you to use the BlazeMeter tools directly from the Cursor interface.
โ ๏ธ Important Note
For both clients, ensure you use the absolute paths and Node.js v18+. If you don't provide an absolute path to a Node.js version that is v18+, the client may use an older version on the system. In this case, the fetch API won't be available, and tool calls will fail. You can either install a newer version of Node.js and point to it in the command or import node-fetch into each tool as fetch and add the node-fetch dependency to your package.json.
Additional Options
๐ณ Docker Deployment (Production)
For production deployments, you can use Docker:
1. Build Docker image
docker build -t <your_server_name> .
2. Client Integration
Add the Docker server configuration to your MCP client (Claude Desktop or Cursor):
{
"mcpServers": {
"<your_server_name>": {
"command": "docker",
"args": ["run", "-i", "--rm", "--env-file=.env", "<your_server_name>"]
}
}
}
๐ก Usage Tip
Add your environment variables (API keys, etc.) inside the .env file.
The project comes with the following minimal Docker setup:
FROM node:22.12-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
ENTRYPOINT ["node", "mcpServer.js"]
๐ Server-Sent Events (SSE)
To run the server with Server-Sent Events (SSE) support, use the --sse flag:
node mcpServer.js --sse
๐ Documentation
๐ ๏ธ Additional CLI commands
List tools
List descriptions and parameters from all generated tools with the following command:
node index.js tools
Example output:
Available Tools:
Workspace: acme-workspace
Collection: useful-api
list_all_customers
Description: Retrieve a list of useful things.
Parameters:
- magic: The required magic power
- limit: Number of results returned
[...additional parameters...]
๐ฅ BlazeMeter API Tools
This project includes tools for interacting with the BlazeMeter API. You need to set the following environment variables in your .env file:
Example .env
BASE_URL=https://a.blazemeter.com
BZM_USERNAME=your_blazemeter_api_key
BZM_PASSWORD=your_blazemeter_api_secret
BZM_ACCOUNT_ID=your_blazemeter_account_id # (optional, used by workspace-list)
BZM_WORKSPACE_ID=your_blazemeter_workspace_id # (optional, used by project-list)
- For tools where the parameter is optional, the value will be read from
.env if not provided.
- For tools where the parameter is required, you must provide it in the request.
Supported BlazeMeter Endpoints
| Tool Name |
Endpoint & Description |
Required Parameter(s) |
| get_workspaces |
/api/v4/workspaces?accountId=... List workspaces for an account |
(optional) accountId |
| get_projects |
/api/v4/projects?workspaceId=... List projects for a workspace |
(optional) workspaceId |
| get_test_runs |
/api/v4/masters?testId=... List test runs (masters) for a test |
testId |
| get_test_run_summary |
/api/v4/masters/{masterId}/reports/default/summary Get summary for a test run |
masterId |
| get_test_run_aggregate_data |
/api/v4/masters/{masterId}/reports/aggregatereport/data Aggregate report data |
masterId |
| get_test_run_errors_data |
/api/v4/masters/{masterId}/reports/errorsreport/data Errors report data |
masterId |
| get_test_run_thresholds |
/api/v4/masters/{masterId}/reports/thresholds Thresholds report |
masterId |
| get_test_run_timeline_kpis |
/api/v4/masters/{masterId}/reports/timeline/kpis Timeline KPIs report |
masterId |