Repository navigation
feat(mcp): add hosted site write tools - #254
Merged
Merged
Conversation
Add create_site, update_site_content, set_site_visibility, extend_site, and delete_site to the Lifecycle MCP server under a new manage-hosted-sites capability. Content is a single text file passed as a string; ZIP archives and binary files are rejected.
vigneshrajsb
force-pushed
the
mcp-site-write-tools
branch
from
October 9, 2026 15:37
76f22a8 to
7b5a1fb
Compare
vigneshrajsb
marked this pull request as ready for review
October 9, 2026 16:42
This was referenced Oct 9, 2026
vmelikyan
approved these changes
Oct 9, 2026
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.
Description
create_site,update_site_content,set_site_visibility,extend_site, anddelete_site. Before this, MCP could only list and read sites..html,.md,.markdown,.txt,.json,.csv,.xml,.svg). ZIP archives, multiple files, and binary files are rejected with aninvalid_bodyerror that says they are not supported.manage-hosted-sitescapability. They only appear when MCP changes are allowed (allowChanges) and Sites hosting is enabled.delete_siteandset_site_visibilityrequireexpectedAccessRevisionfromget_site, so the agent has to read the site before making a destructive or exposure change. Revision conflicts return a newsite_changederror.Test plan
Unit tests cover each tool, rejection of ZIP and binary files, error mapping, and catalog gating. Lint, server typecheck, and the full Jest suite pass.
To test locally with Tilt, enable Sites and turn on MCP with changes allowed, connect an MCP client to
/mcp, then:create_sitewith a small HTML document returns a private site, and its URL opens for the owner.create_sitewithfilename: "site.zip"or"logo.png"returns an "is not supported" error and creates no site.update_site_contentkeeps the same site id and URL and serves the new content; a staleexpectedContentRevisionreturnssite_changed.set_site_visibilityto public makes the URL open without signing in;extend_sitemovesexpiresAtlater.delete_sitewithoutexpectedAccessRevisionis rejected; with the current revision it deletes the site and the URL stops serving.Notes
manage-hosted-sites(follow-up).