Last checked 2026-09-26
Add the server
Gemini CLI adds a remote MCP server with gemini mcp add. Run this in your terminal:
gemini mcp add --transport http --scope user compliance https://demo.mvdm.io/compliance/mcp
With --scope user, the server goes in ~/.gemini/settings.json and works in every project. Leave it out to add the server to the current project only, in .gemini/settings.json.
You can also edit settings.json yourself. Use httpUrl for the address, because url means the older SSE transport in Gemini CLI:
{
"mcpServers": {
"compliance": {
"httpUrl": "https://demo.mvdm.io/compliance/mcp"
}
}
}
Run gemini mcp list to check the server.
Sign in
- Start Gemini CLI. When it connects to the server, it finds that the server needs a sign-in and opens your browser at Auth, the mvdm.io sign-in service. You can also start the sign-in with
/mcp auth compliance. - Sign in, if you are not signed in already.
- Auth shows a consent page. It names the Agent and warns that the Agent gets all your power, in every Account you belong to, billing and the License included. It asks which Account the Agent starts in.
- Press Allow, then go back to Gemini CLI and ask it something about your Compliance work.
Gemini CLI stores the sign-in in ~/.gemini/mcp-oauth-tokens.json and refreshes it on its own. To sign in again, run /mcp auth compliance again.
The browser sign-in needs a browser on the same computer. It does not work over SSH without a display, or in a container. Use a Personal token there.
You can see and end every connection on API & Agent Access. An ended connection fails on its next call.
A Personal token instead
A Personal token works in Gemini CLI. Use one when a browser sign-in is not possible:
- Open API & Agent Access and create a Personal token. Choose its name, the Account it starts in, and when it expires.
- Copy the token. It is shown only once.
- Add the server with the token as a header:
gemini mcp add --transport http --scope user \ --header "Authorization: Bearer <token>" \ compliance https://demo.mvdm.io/compliance/mcp
Gemini CLI writes the token into settings.json as it is. Keep that file private, and do not add the token to a project's settings that you commit.
A Personal token acts as you, like a browser sign-in does. Keep it secret, and end it on API & Agent Access when you no longer need it.
Notes for Gemini CLI
- Gemini CLI loads every tool definition up front, at the start of each session. For Compliance that is roughly 30,000–40,000 tokens of your context, before you ask anything.
- Gemini CLI also runs shell commands, so the Compliance CLI is a lighter way in. See the last section.
- Gemini CLI asks before its Agent uses an MCP tool. You can allow the call once, or always allow that tool or the whole server.
- To stop using Compliance for a while, run
gemini mcp disable compliance. Turn it back on withgemini mcp enable compliance.
What to expect
- Browser handoff. Some acts need you in the browser, such as anything that costs money or accepting the Legal terms. Your Agent then shows you a link. Open it, check what is filled in, and confirm. If you do not open the link, nothing happens.
- Upload link. A tool call cannot carry a file, so your Agent asks Compliance for an Upload link, a one-time address for one file. The Agent sends the file there itself, often with
curl, or it shows you the link so that you can pick the file in your browser. The link expires after a few minutes. - One Account at a time. Your Agent starts in the Account you chose on the consent page, or the one you chose for your Personal token. Every answer says which Account it acted in. Ask your Agent to switch, and it moves to another Account you belong to.
- Rate limit. Each User has a limit on calls per minute, shared by all of your Agents and scripts. Over the limit, a call fails and says how many seconds to wait.
Another way in
Compliance also has a command-line tool, the Compliance CLI. Gemini CLI can run it as a shell command. See the CLI guide.