mcpField
P
perf

perf

Local
github.com/rog0xDeveloper Tools0Updated 32w ago

About perf

An MCP server offering performance-analysis tools for AI agents working with JavaScript, Node.js, bundles, and HTTP services. It includes benchmarks, memory trend analysis, empirical Big O estimates, bundle inspection, and load testing.

Key features

  1. 01Benchmark JavaScript execution
  2. 02Analyze Node.js memory trends
  3. 03Estimate Big O from timing data
  4. 04Inspect JavaScript bundles
  5. 05Load-test HTTP endpoints

Use cases

  1. 01Compare two code implementations
  2. 02Investigate memory growth over time
  3. 03Estimate algorithm complexity from measurements
  4. 04Find large modules in a bundle
  5. 05Measure endpoint latency and throughput under load

MCP support

Exposes benchmarking, memory, complexity, bundle, and HTTP load-testing tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"rog0x-perf": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-perf-tools"
]
}
}
}
Run commandnpx -y @rog0x/mcp-perf-tools

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@rog0x/mcp-perf-tools1.0.2

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
codestringYesJavaScript code to benchmark
labelAstringNoLabel for the first implementation
labelBstringNoLabel for the second implementation
iterationsintegerNoNumber of iterations to run
compareCodestringNoOptional second implementation to compare against

Details

From the project README

mcp-perf-tools

Performance analysis tools for AI agents, exposed via the Model Context Protocol (MCP).

Tools

benchmark

Benchmark JavaScript code execution. Run a snippet N times and measure min/max/avg/median/p95/p99 latency and operations per second. Optionally compare two implementations side by side.

Parameters:

  • code (string) — JavaScript code to benchmark
  • iterations (number, default 1000) — Number of iterations
  • compareCode (string, optional) — Second implementation to compare
  • labelA / labelB (string) — Labels for comparison output
memory_analyze

Analyze Node.js memory usage: heap used/total, RSS, external memory, and array buffers. Takes snapshots over time and uses linear regression to detect trends and potential memory leaks.

Parameters:

  • action — "snapshot" | "analyze" | "clear"
big_o_estimate

Estimate Big O complexity from empirical timing data. Fits measurements against O(1), O(log n), O(n), O(n log n), O(n^2), O(n^3), and O(2^n) using R-squared scoring. Includes an ASCII growth curve visualization.

Parameters:

  • inputSizes (number[]) — Array of input sizes
  • executionTimesMs (number[]) — Corresponding execution times in ms
bundle_analyze

Analyze a JavaScript bundle file: raw size, gzip compressed estimate, detected module count, largest modules, and tree-shaking opportunities (side effects, duplicates).

Parameters:

  • filePath (string) — Absolute path to the bundle file
load_test

Simple HTTP load tester. Sends N requests at a given concurrency level and reports response time percentiles, error rate, throughput (req/sec), and status code distribution.

Parameters:

  • url (string) — Target URL
  • totalRequests (number, default 100) — Total requests to send
  • concurrency (number, default 10) — Concurrent request count
  • method (string, default "GET") — HTTP method
  • headers (object, optional) — HTTP headers
  • body (string, optional) — Request body
  • timeoutMs (number, default 30000) — Request timeout

Setup

npm install
npm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "perf-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-perf-tools/dist/index.js"]
    }
  }
}

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.