Set up Gemini CLI

Connect Gemini CLI to the Amperity MCP server by adding it as a remote MCP server and signing in with your Amperity credentials.

Important

Gemini CLI only works for organizations on a Gemini Code Assist Standard or Enterprise license.

Requirements

Connecting Gemini CLI to the MCP server requires:

  • An active Amperity account with access to at least one tenant.

  • Gemini CLI installed and signed in.

Add the Amperity MCP server

Register the Amperity MCP server in your Gemini CLI configuration.

  1. Add the server:

    gemini mcp add --transport http --scope user amperity https://mcp.amperity.com
    
  2. Add Amperity’s OAuth client ID to the server entry. Open ~/.gemini/settings.json and add an oauth block to the amperity server so it matches the following:

    {
      "mcpServers": {
        "amperity": {
          "httpUrl": "https://mcp.amperity.com",
          "oauth": {
            "clientId": "nwbd0MGCyh1VysmYQM05UoDXIuVPdGEs",
            "authorizationUrl": "https://mcp.amperity.com/authorize",
            "tokenUrl": "https://mcp.amperity.com/oauth/token"
          }
        }
      }
    }
    

    Important

    The oauth.clientId field is required. Without it, Gemini CLI cannot authenticate to the Amperity MCP server.

Authenticate

  1. Start Gemini CLI, or restart it if it was already running, so it reloads settings.json:

    gemini
    
  2. Trigger the OAuth flow:

    /mcp auth amperity
    

    A browser tab opens. Sign in with your Amperity OAuth credentials. Gemini CLI reports a successful authentication and reloads the Amperity tools.

  3. Verify the server is connected:

    /mcp
    

    The amperity server appears with its available tools.

Start interacting with Gemini CLI

In a Gemini CLI session, ask:

"Tell me about my Amperity tenant."

Gemini CLI calls the tenant_info tool and returns details about your current Amperity tenant.