Add batch operation support to MCP server#73
Merged
titouanmathis merged 4 commits intomainfrom Feb 27, 2026
Merged
Conversation
Add a batch resource with run action that executes multiple read operations in a single MCP call. Operations run in parallel with Promise.allSettled, max 10 per batch. Only read actions allowed. Closes #68 Co-authored-by: Claude <claude@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
- Coverage 99.82% 99.80% -0.03%
==========================================
Files 218 219 +1
Lines 3462 3519 +57
Branches 799 827 +28
==========================================
+ Hits 3456 3512 +56
- Misses 6 7 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add test for non-object operation validation and e2e batch test through the full executeToolWithCredentials pipeline. Co-authored-by: Claude <claude@anthropic.com>
Add tests for: non-object operation, results without structuredContent, non-Error rejection reason, batch via forge_write rejection, and full e2e pipeline coverage. Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude <claude@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #68 — adds a
batchresource withrunaction to execute multiple read operations in parallel.Changes
Core
batchtoRESOURCESconstantMCP
handleBatch()handler with validation (max 10 ops, read-only, required fields)Promise.allSettledwith per-operation error isolation_batchsummary with total/succeeded/failed countsoperationsparameter toforgetool input schemahelpandschemahandlers for batch resourceUsage
{ "resource": "batch", "action": "run", "operations": [ { "resource": "servers", "action": "list" }, { "resource": "sites", "action": "list", "server_id": "123" }, { "resource": "databases", "action": "list", "server_id": "123" } ] }Closes #68