Add context action for rich single-call resource fetching#71
Merged
titouanmathis merged 2 commits intomainfrom Feb 27, 2026
Merged
Add context action for rich single-call resource fetching#71titouanmathis merged 2 commits intomainfrom
titouanmathis merged 2 commits intomainfrom
Conversation
Add a context action to servers and sites resources that fetches all related sub-resources in parallel via Promise.all, returning a comprehensive snapshot in a single MCP call. - Server context: server + sites + databases + db users + daemons + firewall rules + scheduled jobs - Site context: site + deployments (last 5) + certificates + redirect rules + security rules Closes #69 Co-authored-by: Claude <claude@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 218 219 +1
Lines 3462 3487 +25
Branches 799 807 +8
=======================================
+ Hits 3456 3481 +25
Misses 6 6
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-array deployments data to cover the else branch in handleSiteContext. 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 #69 — adds a
contextaction toserversandsitesresources.Changes
Core
contexttoACTIONSconstantMCP
handleServerContext()— fetches server + 6 sub-resources in parallelhandleSiteContext()— fetches site + 4 sub-resources in parallel (deployments limited to last 5)handleServersandhandleSiteshandlerscontexttoREAD_ACTIONShelpandschemahandlersUsage
{"resource": "servers", "action": "context", "id": "725393"}Returns:
{ "server": { ... }, "sites": [ ... ], "databases": [ ... ], "database_users": [ ... ], "daemons": [ ... ], "firewall_rules": [ ... ], "scheduled_jobs": [ ... ] }Closes #69