Skip to content

Add a Gemini CLI extension for the MCP server - #335

Open
salmanfarisvp wants to merge 4 commits into
masterfrom
gemini-extension
Open

salmanfarisvp wants to merge 4 commits into
masterfrom
gemini-extension

Conversation

@salmanfarisvp

@salmanfarisvp salmanfarisvp commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

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): runs screenly mcp from PATH. 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 use edge_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 match Cargo.toml, if GEMINI.md is missing, or if API_TOKEN isn't a sensitive setting.
  • README: install instructions.

How the gallery and install work

  • The gallery indexes public repos that have the gemini-cli-extension topic and a gemini-extension.json at the root, and it crawls tagged repos daily. No submission is needed.
  • gemini extensions install https://github.com/Screenly/cli reads the release marked Latest. None of our assets are named {platform}.{arch}.*, so Gemini's findReleaseAsset returns nothing and it falls back to the release's source tarball, which includes this manifest. So this needs no release.yml changes, but it only works from the first release tagged after this merges.
  • Gemini compares the manifest version with the release tag. Releases bump Cargo.toml by hand, so the new check forces both to change together.

Design choices

  • The CLI must be installed; no bundled binary. This is the same approach InfoSlides.MCP takes. Shipping {platform}.{arch}.screenly.tar.gz archives 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).
  • The token is required. An empty API_TOKEN would override ~/.screenly (Authentication::read_token), so leaving it unset isn't useful.

Testing

  • The new check passes locally (gemini-extension.json 26.11.0 OK). actionlint is clean.
  • Not yet run: gemini extensions link . against a real Gemini CLI. Worth a quick manual try before merge.

After merge

  1. Add the gemini-cli-extension topic to this repo (Settings → About).
  2. Tag v26.11.0 from master. gemini-extension.json is already at 26.11.0 (Bump version to 26.11.0 #333 is merged here), and the new check-version job confirms the tag matches.
  3. The gallery should pick it up within a day of that release.

Note: per Gemini's docs, unpaid-tier and Google One users moved to Antigravity CLI on 2026-06-18.

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.
Copilot AI lite review requested due to automatic review settings November 25, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 mcp and securely configures API_TOKEN.
  • Added GEMINI.md with 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

Comment thread .github/workflows/gemini-extension.yml Resolved
…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.
Copilot AI lite review requested due to automatic review settings November 25, 2026 03:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Approval should be deferred because the extension’s real Gemini CLI install/link integration, release-source loading, keychain-backed settings, and PATH resolution remain unverified.

1 open issue

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@salmanfarisvp salmanfarisvp self-assigned this Nov 25, 2026
@salmanfarisvp salmanfarisvp added the enhancement New feature or request label Nov 25, 2026
Copilot AI lite review requested due to automatic review settings November 25, 2026 04:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Gemini CLI extension install/link flow and release-source-tarball behavior still require manual end-to-end validation, including token prompting, keychain injection, and PATH-based launching.

No open issues 🎉

Review effort: Lite

@renatgalimov renatgalimov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix

  1. 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 file GEMINI.md, MCP server screenly, 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: checkForExtensionUpdate compares only releaseData.tag_name !== releaseTag; findReleaseAsset matches {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.

Comment thread gemini-extension.json
@@ -0,0 +1,23 @@
{
"name": "screenly",
"version": "26.11.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0 after merge.
  • Problem: v26.11.0 already 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 be v26.11.1 or later (Release: don't cancel the matrix on one failure; pin Windows targets to Rust 1.98 #336 needs one too), and check-version will then fail the whole release unless this file and Cargo.toml are bumped together.
  • Fix: Bump Cargo.toml and this version to 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 !== releaseTag only, 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants