paygate-mcp 8.66.0 → 8.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +35 -0
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -14,6 +14,7 @@ Monetize any MCP server with one command. Add API key auth, per-tool pricing, ra
14
14
  - [API Reference](#api-reference) — All 150+ endpoints
15
15
  - [CLI Options](#cli-options)
16
16
  - [Deployment](#deployment) — Docker, docker-compose, systemd, PM2
17
+ - [Load Testing](#load-testing) — k6 benchmarking for production
17
18
  - [Error Codes](#error-codes) — Complete error code reference
18
19
  - [Feature Reference](#persistent-storage) — Detailed docs for every feature
19
20
  - [Storage & Billing](#persistent-storage) · [Stripe](#stripe-integration) · [ACL](#per-tool-acl-access-control) · [Rate Limits](#per-tool-rate-limits)
@@ -5034,6 +5035,40 @@ pm2 start ecosystem.config.js
5034
5035
  - [ ] Scrape `/metrics` with Prometheus for observability
5035
5036
  - [ ] Back up state file regularly (or use Redis persistence)
5036
5037
 
5038
+ ## Load Testing
5039
+
5040
+ A [k6](https://k6.io) load test script is included for production benchmarking:
5041
+
5042
+ ```bash
5043
+ # Install k6
5044
+ brew install k6 # macOS
5045
+ # or: https://k6.io/docs/getting-started/installation
5046
+
5047
+ # Start server (example: echo backend)
5048
+ npx paygate-mcp wrap -- echo '{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"ok"}]}}' \
5049
+ --port 3000 --credits-per-call 1
5050
+
5051
+ # Run with admin key (from server startup output)
5052
+ K6_ADMIN_KEY=admin_xxxx k6 run load-test.js
5053
+
5054
+ # Custom VUs and duration
5055
+ K6_ADMIN_KEY=admin_xxxx k6 run --vus 100 --duration 60s load-test.js
5056
+
5057
+ # Against remote deployment
5058
+ K6_PAYGATE_URL=https://paygate.example.com K6_ADMIN_KEY=admin_xxxx k6 run load-test.js
5059
+ ```
5060
+
5061
+ **Scenarios:**
5062
+ - **mcp_traffic** — Simulates agent tool calls (ramp 0→50 VUs over 10s, sustain 30s)
5063
+ - **admin_reads** — Dashboard/analytics reads (5 constant VUs)
5064
+ - **health_checks** — Load balancer probes (10 req/s constant rate)
5065
+
5066
+ **Thresholds:**
5067
+ - p(95) response time < 200ms
5068
+ - p(99) response time < 500ms
5069
+ - Error rate < 5%
5070
+ - Request rate > 100 req/s
5071
+
5037
5072
  ## Error Codes
5038
5073
 
5039
5074
  ### HTTP Status Codes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paygate-mcp",
3
- "version": "8.66.0",
3
+ "version": "8.68.0",
4
4
  "description": "Pay-per-tool-call gating proxy for MCP servers. Wrap any MCP server with API key auth, per-tool pricing, rate limiting, and usage metering.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,6 +30,7 @@
30
30
  "build": "tsc -p tsconfig.build.json",
31
31
  "test": "jest --verbose --forceExit",
32
32
  "test:coverage": "jest --verbose --forceExit --coverage",
33
+ "test:load": "echo 'Run: k6 run load-test.js (requires k6: brew install k6)'",
33
34
  "prepublishOnly": "npm run build"
34
35
  },
35
36
  "dependencies": {},