
Mit Gemini verbinden
Gemini CLI connected via MCP. In the Gemini app, support varies by account.
Dieser Inhalt ist auf Englisch verfügbar.
Welchen MCP möchten Sie verbinden? Die Befehle unten passen sich Ihrer Auswahl an.
- 1
Gemini CLI: add the server
The confirmed path is the Gemini CLI. Generate the key (next step) and register the server with a command, replacing YOUR_API_KEY with the key you generated:
gemini mcp add --transport http --header "Authorization: Bearer YOUR_API_KEY" NewAlgorithm-TOTVS https://totvs.mcp.newalgorithm.io/mcp - 2
Generate your API key
Sign in to app.newalgorithm.io with your account, open Keys & apps and generate a key. It is shown only once: copy it and store it somewhere safe.
Key formatna_live_xxxxxxxxxxxxxxxxx - 3
Or write the configuration directly
The user file is at ~/.gemini/settings.json. For Streamable HTTP, the field is httpUrl — url is reserved for SSE servers:
~/.gemini/settings.json{ "mcpServers": { "NewAlgorithm-TOTVS": { "httpUrl": "https://totvs.mcp.newalgorithm.io/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } - 4
No key: OAuth sign-in
If you register the server without the header, the CLI detects that NewAlgorithm requires sign-in and starts the OAuth flow in the browser. Inside the session, authenticate with:
/mcp auth NewAlgorithm-TOTVSErwartet: OAuth needs a local browser; in a headless environment, use the API Key.
- 5
Confirm
Inside the CLI session, list the servers and the loaded tools:
/mcpErwartet: NewAlgorithm-TOTVS — Connected na_prepare, na_search, na_route, na_specialists, na_version
- 6
What about the Gemini app?
Support for custom MCP apps in the Gemini app depends on account type and region. The Tax Specialist is also published as a Gem, a separate path from MCP, opened from the Specialist's page.
Never store the real key in versioned files. Prefer the user-level settings.json, outside the repository.
Details zu Authentifizierung und Tools in der Dokumentation.