Before you start
- Connect Beacon Cloud MCP with
beacon mcp connect, or addhttps://mcp.beacon.shto your client by hand. See Beacon Cloud MCP. - Allow write access. When your client signs in, the Beacon approval page offers a checkbox to also let it create and publish lenses. Tick it, then select Allow read and write access. Read-only connections cannot see the lens tools that change anything.
- Give the agent a shell. The HTML file is uploaded with an HTTP request such as
curl, never pasted into a tool call.
Access tokens created with
beacon mcp token create are always read-only. To publish with a
token instead of browser sign-in, create one with Read + publish lenses access on the
MCP Access page.Lens tools
Publish a new lens
Ask your agent to build and publish a lens, for example:- Writes the HTML file, following the file rules.
- Creates the lens with
beacon_lenses_create. It is private unless you ask otherwise. - Calls
beacon_lenses_prepare_uploadwith a version such as1.0.0and gets an upload URL. - Uploads the file to that URL:
The response carries an
artifactId. - Calls
beacon_lenses_complete_uploadwith thatartifactId. - Releases the version with
beacon_lenses_release_versiononce you approve, and gives you the lens page link,https://beacon.sh/lenses/<key>.
Update an existing lens
Ask the agent to change the lens. It uploads the new file as a new version, such as1.0.1,
completes it, and releases it when you say so. Versions are immutable, so a version number cannot
be reused.
Uploading alone changes nothing for anyone using the lens. Only a release does.
Roll back
Ask the agent to release an earlier version:Change details or visibility
Ask the agent to rename the lens, change its description or icon, or make it public or private. It callsbeacon_lenses_update. The key cannot change.
Related
Beacon Cloud MCP
Connect your agent and see every tool.
Managing lenses
Versions, releases and visibility.