Skip to content

Connect Gemini CLI

Your address is on Account > AI Clients at my.nilear.com, under Your MCP URL for this PSA, in the form https://mcp.nilear.com/psa/<your PSA's id>/mcp. The page’s How to connect section has these same steps with your address already filled in. If the page shows no address, see Troubleshooting.

  1. Add this to ~/.gemini/settings.json, with your address. The client id gemini-cli is Nilear’s registration for Gemini CLI:

    {
    "mcpServers": {
    "nilearx": {
    "httpUrl": "https://mcp.nilear.com/psa/<your PSA's id>/mcp",
    "oauth": {
    "enabled": true,
    "clientId": "gemini-cli"
    }
    }
    }
    }
  2. In Gemini CLI, run /mcp auth nilearx. Your browser opens Nilear’s Connect an AI client page.

  3. Sign in if asked, check the details and click Approve (what the page shows).

To stop the connection, revoke it.