Repository navigation
Conversation
Adds integrations/gemini-cli: a Gemini CLI extension that adds Ansvisor's remote MCP server (streamable HTTP) and a GEMINI.md context file that says what each tool is for, which ones change data, and what the plans and roles allow. Gemini CLI signs in by itself when the server answers 401 with a WWW-Authenticate challenge (discovery, dynamic client registration, PKCE), so the extension declares no auth. An API key stays an option through a user-settings server of the same name, which takes the extension server's place; the extension has no key setting, because a header it declares would replace the sign-in token. Also a docs guide (docs/guides/gemini-cli.mdx, in the nav) and an unapproved Help article (help/settings/gemini-cli.md). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
9 of 13 tasks
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.
Summary
This stays a draft until
ansvisor/gemini-cli-extensionexists. The README, docs page and Help article all point their install command there. See "What someone must do outside the code".This adds a Gemini CLI extension for Ansvisor's MCP server. Gemini CLI users can install it with one command, and it can be listed in the Gemini CLI extensions gallery.
integrations/gemini-cli/gemini-extension.json: the manifest.ansvisor, athttps://app.ansvisor.com/api/mcp.urlwithtype: "http". That is the form current Gemini CLI writes, and the one its code doesn't mark deprecated.GEMINI.mdis the context file. The manifest declares no auth.integrations/gemini-cli/GEMINI.md: context for the model.list_*/get_*tools read.plan_requiredbelow Growth,subscription_inactiveon an ended plan, andoauth_plan_requiredfor a sign-in connection in the trial or on an ended plan. Also the shopping analytics and Improve features.subscription-gate.tsandrole-gate.ts.integrations/gemini-cli/README.md: install, sign in, API key, what you can ask, self-hosted, update and remove.docs/guides/gemini-cli.mdx: added to the Platform Guides nav after the MCP server guide.help/settings/gemini-cli.md: a new Help article withapproved: false. It isn't inapproved-articles.json, so Chat doesn't answer from it yet.Sign-in and API keys. Gemini CLI does OAuth for remote HTTP servers on its own. When the server answers 401 with
WWW-Authenticate: Bearer resource_metadata=…, it:token_endpoint_auth_method: none, ahttp://localhost:<random port>/oauth/callbackredirect);resourceparameter, and checksiss(RFC 9207);/mcp auth ansvisorstarts it by hand.Ansvisor's authorization server matches all of this:
issis sent.So the extension works:
ansvisorin the user's Gemini settings takes the extension server's place. The README and docs give agemini mcp add --scope user …command that keeps the key in an environment variable. Tested: the key reaches the server even though the variable's name containsTOKEN./mcp auth ansvisorcan't discover how to sign in, and the README says to use an API key.The extension has no API key setting on purpose. Gemini CLI sends a header the extension declares in place of the sign-in token, even when that header is empty, so a key setting would break signing in.
Why a second repository. Gemini CLI installs a GitHub extension only from
owner/repowithgemini-extension.jsonat the repository root; a subfolder URL is refused. The gallery needs the manifest at the root too.integrations/gemini-clistays the source, and a publicansvisor/gemini-cli-extensioncarries a copy (see below).Related issue
None. Builds on MCP over OAuth (#2141).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): not run, no web code changedyarn typecheckpasses (run fromweb/): not run, no web code changedyarn format:checkpasses (run fromweb/)help/(or no user-visible change) — see help/README.mdAlso run:
yarn test src/lib/help: 12 tests pass, including the new article.GEMINI.md, docs page andmint.json.gemini extensions validatewith Gemini CLI 0.67.0.How to test
From a checkout of this branch, with Gemini CLI installed (
npm install -g @google/gemini-cli):Validate the manifest:
Install it from the folder. Gemini CLI asks whether you trust the folder, then asks you to confirm the extension:
gemini mcp listshowsansvisor (from ansvisor): https://app.ansvisor.com/api/mcp (http).API key: create a key in Settings › MCP & API Keys, then:
Start
geminiin a trusted folder and run/mcp: the server is connected with its tools. Ask "List my Ansvisor brands". Ask for a change on Starter: the tool answersplan_required.Sign-in, on a deploy where MCP app sign-in is on:
gemini mcp remove --scope user ansvisor, startgeminiand accept the sign-in prompt (or run/mcp auth ansvisor).oauth_plan_required.Once the separate repository exists, the install command is:
What someone must do outside the code
ansvisor/gemini-cli-extension, MIT.gemini-extension.json,GEMINI.mdandREADME.mdfromintegrations/gemini-cli, and the repository'sLICENSE. A ready copy has been prepared.gemini-cli-extensiontopic in the repository's About section. The gallery's crawler finds extensions by this topic, through GitHub Code Search, once a day. There is no submission form.gh api 'search/code?q=repo:ansvisor/gemini-cli-extension+filename:gemini-extension.json' --jq .total_count.https://github.com/search?q=repo%3Aansvisor%2Fgemini-cli-extension+gemini-extension.json&type=codeuntil the manifest shows.v0.1.0and so on, and keep the manifest'sversionthe same as the tag, because Gemini CLI shows the manifest version.versionon every change.integrations/gemini-clifirst, then copy the three files to the extension repository. If the extension ever moves,migratedToin the old manifest sends users to the new repository.MCP_OAUTH_ENABLED=trueor use an API key.Generated by Claude Code