Repository navigation
Add a Gemini CLI extension for the MCP server - #335
salmanfarisvp wants to merge 4 commits into
Conversation
gemini-extension.json at the repo root runs `screenly mcp` from PATH and asks for the API token as a sensitive setting. GEMINI.md gives Gemini the content model and safety rules. A workflow keeps the manifest version in step with Cargo.toml, since Gemini compares it with the release tag.
There was a problem hiding this comment.
🟡 Changes recommended
The release workflow can pass while publishing a mismatched v* tag because it does not verify the tag against the manifest and Cargo versions, risking Gemini rejecting the extension.
1 open issue
What changed in this PR
Adds Gemini CLI extension support for the Screenly MCP server, including installation guidance, Gemini-specific context, authentication settings, and CI validation.
Changes:
- Added a Gemini extension manifest that runs
screenly mcpand securely configuresAPI_TOKEN. - Added
GEMINI.mdwith Screenly MCP concepts and safe-operation guidance. - Documented Gemini CLI installation and token configuration in the README.
- Added workflow checks for manifest metadata, required files, token sensitivity, and version alignment.
| File | Description |
|---|---|
| README.md | Documents Gemini CLI extension installation and API token configuration. |
| GEMINI.md | Provides Gemini-specific Screenly MCP usage context and safety guidance. |
| gemini-extension.json | Defines the Gemini extension, MCP server command, context file, version, and sensitive API token setting. |
| .github/workflows/gemini-extension.yml | Validates the extension manifest, required context file, sensitive token configuration, and version consistency with Cargo.toml. |
Review effort: Lite
…nsion.json Gemini CLI compares the manifest version with the release tag, so a stable v* tag must match both before anything is built. Prerelease tags are skipped because Gemini only installs the release marked Latest.
There was a problem hiding this comment.
🔵 Needs a closer look
Approval should wait for manual end-to-end validation of Gemini CLI installation, extension linking, keychain or environment-token resolution, release loading, and screenly mcp startup.
No open issues 🎉
1 resolved since last review
Review effort: Lite
renatgalimov
left a comment
There was a problem hiding this comment.
Should fix
- The install command in the README fails until a release after v26.11.0 exists, and the "After merge" plan tags a version that already exists (
gemini-extension.json:3, inline).
Nice to have
2. The "Gemini compares the manifest version with the release tag" comment is not what Gemini does (.github/workflows/release.yml:18, inline).
Verdict: fix 1 first (a version bump or a description change; the code works).
What I tested
In a node:22 container with @google/gemini-cli@0.71.1 and the screenly 26.9.0 linux-musl binary on PATH, this PR's tree copied in:
gemini extensions link /ext --consent, token fed on stdin: prompted for "Screenly API Token" (masked),Extension "screenly" linked successfully and enabled.gemini extensions list:screenly (26.11.0), context fileGEMINI.md, MCP serverscreenly,Screenly API Token: *** (User - Keychain).gemini mcp list:screenly (from screenly): screenly mcp (stdio) - Connected. So the manifest, the sensitive setting and the PATH launch all work; this covers the "not yet run" item in the description.gemini extensions install https://github.com/Screenly/cli --consent(Latest = v26.11.0):Configuration file not found at /tmp/gemini-extension…/gemini-extension.json(finding 1).git ls-remote --tags origin:v26.11.0->b12710b(the #333 merge), already on master.- Gemini source at v0.71.1:
checkForExtensionUpdatecompares onlyreleaseData.tag_name !== releaseTag;findReleaseAssetmatches{platform}.{arch}./{platform}.prefixes, so none of our assets match and the source tarball is used, as the description says. - Not run: the new workflows on a real tag; the gallery crawl.
Reviewed by an AI agent (Hermes) on behalf of @renatgalimov.
| @@ -0,0 +1,23 @@ | |||
| { | |||
| "name": "screenly", | |||
| "version": "26.11.0", | |||
There was a problem hiding this comment.
Should fix. 1. Install is broken until the next release, and v26.11.0 is already tagged
- What this is: Gemini installs from the source tarball of the release marked Latest, so the manifest must be inside a tagged release. The description's plan is to tag
v26.11.0after merge. - Problem:
v26.11.0already exists (b12710b, the Bump version to 26.11.0 #333 merge) and is Latest, and its tarball has no manifest. Running the README command now fails:Configuration file not found at /tmp/gemini-extension…/gemini-extension.json(tested with gemini-cli 0.71.1). The next tag will bev26.11.1or later (Release: don't cancel the matrix on one failure; pin Windows targets to Rust 1.98 #336 needs one too), andcheck-versionwill then fail the whole release unless this file andCargo.tomlare bumped together. - Fix: Bump
Cargo.tomland thisversionto the next release (e.g.26.11.1) in the release PR that ships Release: don't cancel the matrix on one failure; pin Windows targets to Rust 1.98 #336, and change "After merge" step 2 to that tag. Optionally hold the README section until that release is out. - If we skip it: The README tells users to run a command that fails, and the first person to follow "tag v26.11.0" finds the tag taken.
| - name: Checkout repository | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
|
|
||
| # Gemini CLI compares gemini-extension.json's version with the release tag, |
There was a problem hiding this comment.
Nice to have. 2. Gemini doesn't compare the manifest version with the tag
- What this is: This comment (and the description) says Gemini compares
gemini-extension.json's version with the release tag. - Problem: It doesn't. In gemini-cli 0.71.1, update detection for GitHub-release installs is
releaseData.tag_name !== releaseTagonly, and the docs (docs/extensions/releasing.md, "Sync manifest and tags") say the CLI ignores the manifest version and only shows it in the UI. So a mismatch is cosmetic; nothing gets rejected. - Fix: Reword to "Gemini shows the manifest version in its UI, so keep it equal to the tag and Cargo.toml." The check itself is fine to keep as hygiene.
- If we skip it: The next person treats a version mismatch as install-breaking and debugs the wrong thing.

What
Lists the Screenly MCP server in the Gemini CLI extensions gallery. Part of Screenly/hq#41, alongside #334 (MCP Registry).
gemini-extension.json(repo root): runsscreenly mcpfromPATH. The API token is a sensitive setting (envVar: API_TOKEN), so Gemini asks for it at install and stores it in the system keychain.GEMINI.md: context for Gemini covering how assets, playlists and labels fit together, when to useedge_app_publish_from_html, and to confirm before deletes. Predicate syntax isn't repeated here because the server's own instructions already cover it..github/workflows/gemini-extension.yml: fails if the manifest version doesn't matchCargo.toml, ifGEMINI.mdis missing, or ifAPI_TOKENisn't a sensitive setting.How the gallery and install work
gemini-cli-extensiontopic and agemini-extension.jsonat the root, and it crawls tagged repos daily. No submission is needed.gemini extensions install https://github.com/Screenly/clireads the release marked Latest. None of our assets are named{platform}.{arch}.*, so Gemini'sfindReleaseAssetreturns nothing and it falls back to the release's source tarball, which includes this manifest. So this needs norelease.ymlchanges, but it only works from the first release tagged after this merges.versionwith the release tag. Releases bumpCargo.tomlby hand, so the new check forces both to change together.Design choices
{platform}.{arch}.screenly.tar.gzarchives is possible as a follow-up, but Gemini falls back to any{platform}.*asset when the exact arch is missing, so a partial set could install the wrong binary.env: {"API_TOKEN": "${API_TOKEN}"}plus a setting. Extensions don't inherit the shell environment. Gemini fills${API_TOKEN}from the declared setting (extension-manager.ts,resolveEnvVarsInObject).API_TOKENwould override~/.screenly(Authentication::read_token), so leaving it unset isn't useful.Testing
gemini-extension.json 26.11.0 OK).actionlintis clean.gemini extensions link .against a real Gemini CLI. Worth a quick manual try before merge.After merge
gemini-cli-extensiontopic to this repo (Settings → About).v26.11.0from master.gemini-extension.jsonis already at26.11.0(Bump version to 26.11.0 #333 is merged here), and the newcheck-versionjob confirms the tag matches.Note: per Gemini's docs, unpaid-tier and Google One users moved to Antigravity CLI on 2026-06-18.