Skip to content

feat(mcp): improve MCP docs and increase rate limit to 600 req/min#2262

Merged
kodiakhq[bot] merged 2 commits into
mainfrom
brandon/mcp-tweaks
May 12, 2026
Merged

feat(mcp): improve MCP docs and increase rate limit to 600 req/min#2262
kodiakhq[bot] merged 2 commits into
mainfrom
brandon/mcp-tweaks

Conversation

@brandon-pereira
Copy link
Copy Markdown
Member

Summary

  • MCP docs (MCP.md): Added v1/v2 compatibility note, clarified frontend vs backend endpoint paths, replaced outdated OpenCode CLI command with JSON config block, fixed code fence language, and improved wording throughout.
  • MCP rate limit: Increased from 100 to 600 requests/min (~10 req/s) per API key to support parallel agent workloads and power users without throttling during traffic spikes.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hyperdx-oss Ignored Ignored Preview May 12, 2026 3:39pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: 5a9f043

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/api Patch
@hyperdx/app Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 2
  • Branch: brandon/mcp-tweaks
  • Author: brandon-pereira

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

PR Review

✅ No critical issues found.

  • Docs-only changes in MCP.md look correct (v1/v2 note, frontend/backend clarification, valid OpenCode JSON config).
  • Rate limit bump 100 → 600 req/min in packages/api/src/mcp/app.ts is straightforward; per-API-key keyGenerator is already in place, so no abuse vector from a single noisy key.
  • Changeset (patch on @hyperdx/api) is appropriate for a config tweak.

Minor (non-blocking):

  • The OpenCode JSON snippet is a fragment, not a full document — consider wrapping the "mcp": {...} block in { ... } so users can copy-paste a valid file. Not critical since it matches OpenCode's own docs style.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Deep Review

✅ No critical issues found.

🟡 P2 -- recommended

  • packages/api/src/mcp/app.ts:21 -- mcpRateLimiter is mounted before validateUserAccessKey, so the new 600/min ceiling applies to unauthenticated traffic too — rateLimiterKeyGenerator falls back to req.ip (or the shared 'unknown' bucket when IP is absent), and the raised cap lifts the per-IP unauth request ceiling 6× through the auth middleware.
    • Fix: Place mcpRateLimiter after validateUserAccessKey so the raised cap only applies to successfully authenticated keys, or layer a tighter IP-keyed limiter ahead of auth for the unauthenticated path.
    • reliability, security
  • packages/api/src/mcp/app.ts:13-19 -- express-rate-limit's default fixed-window store lets a single key admit up to ~1200 requests across a 2-second window-roll boundary, and each authenticated MCP request runs an unbounded ClickHouse query through tool handlers with no per-key in-flight concurrency cap downstream.
    • Fix: Use a sliding-window or token-bucket store, or add a per-key concurrency cap around tool dispatch, so the documented 10 req/s ceiling reflects sustained rate rather than admissible burst.
    • performance, reliability

Reviewers (7): correctness, reliability, security, performance, testing, maintainability, project-standards.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

E2E Test Results

All tests passed • 175 passed • 3 skipped • 1243s

Status Count
✅ Passed 175
❌ Failed 0
⚠️ Flaky 4
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@kodiakhq kodiakhq Bot merged commit 694e3c9 into main May 12, 2026
30 of 31 checks passed
@kodiakhq kodiakhq Bot deleted the brandon/mcp-tweaks branch May 12, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants