Skip to content

Feature: Mcp Gateway Improvements#3688

Merged
gorkem-bwl merged 9 commits intodevelopfrom
feature/mcp-gateway-operational-improvements
Apr 7, 2026
Merged

Feature: Mcp Gateway Improvements#3688
gorkem-bwl merged 9 commits intodevelopfrom
feature/mcp-gateway-operational-improvements

Conversation

@Br0wnHammer
Copy link
Copy Markdown
Member

Describe your changes

  • Breadcrumbs: Added route labels and icons for all 7 MCP Gateway pages so breadcrumbs render as AI gateway > MCP Gateway > Audit log instead of AI gateway / Mcp / Audit
  • Audit log retention: Batched DELETE (5K rows/iteration) to prevent table locks at scale, capped arguments JSONB to 10KB
  • Approval cleanup: Added retention cleanup for decided/expired approval requests with batched deletes
  • Approval workflow: Replaced hard error with approval request creation, polling endpoint (GET /v1/mcp/approvals/{id}/status), and approved-request bypass on re-submission
  • Scheduled job: Added BullMQ mcp_audit_cleanup job (daily 3AM) that purges both audit logs and approval requests
  • Build fixes: Fixed TypeScript errors in MCPAuditLog and MCPApprovals (Select onChange types, Chip sx→backgroundColor/textColor, CustomizableButton label→text, PageHeaderExtended children, unused imports)

Please ensure all items are checked off before requesting a review:

  • I deployed the code locally.
  • I have performed a self-review of my code.
  • I have included the issue # in the PR.
  • I have labelled the PR correctly.
  • The issue I am working on is assigned to me.
  • I have avoided using hardcoded values to ensure scalability and maintain consistency across the application.
  • I have ensured that font sizes, color choices, and other UI elements are referenced from the theme.
  • My pull request is focused and addresses a single, specific feature.
  • If there are UI changes, I have attached a screenshot or video to this PR.

@Br0wnHammer Br0wnHammer added this to the 2.3 milestone Apr 7, 2026
@Br0wnHammer Br0wnHammer requested a review from gorkem-bwl April 7, 2026 16:57
@Br0wnHammer Br0wnHammer self-assigned this Apr 7, 2026
@Br0wnHammer Br0wnHammer added enhancement New feature or request ai-feature AI-powered feature labels Apr 7, 2026
## Changes
- Extract shared batch_delete_expired() utility to eliminate duplicate
  batched-delete logic in mcp_audit.py and mcp_approvals.py
- Reuse existing callAIGateway() helper in automationWorker.ts instead
  of duplicating fetch calls with inline headers
- Parallelize audit + approval cleanup calls with Promise.all()
- Remove dead code (unreachable return in get_approved_request)
- Make PageHeaderExtendedProps.children optional to remove >{null}</ hack
- Prevent duplicate pending approval requests: reuse existing pending
  request for same agent+tool instead of creating duplicates on retry

## Benefits
- Less duplicated code across Python CRUD and TypeScript worker
- Cleaner approval queue (no flood of identical pending requests)
- Faster cleanup job execution via parallel HTTP calls
…ages

Take develop's structure (children inside PageHeaderExtended, updated
Select ids and onChange types). Drop size="small" on Chip per develop.
@gorkem-bwl gorkem-bwl merged commit 826c82f into develop Apr 7, 2026
6 of 7 checks passed
@gorkem-bwl gorkem-bwl deleted the feature/mcp-gateway-operational-improvements branch April 7, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-feature AI-powered feature enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants