Connect Gemini

2 minute read

This guide shows you how to configure Google Gemini to connect to the CloudBees Unify MCP Server.

Before you begin

Complete the following prerequisites before you begin:

  • Google Gemini with MCP support enabled.

  • An active CloudBees Unify account.

  • A web browser for OAuth authentication.

Add the CloudBees Unify MCP Server

Gemini does not have a command-line tool to add your CloudBees Unify MCP Server with OAuth parameters. You need to manually add the CloudBees Unify MCP Server configuration to Gemini’s settings.json file.

For detailed information about configuring the CloudBees Unify MCP Server in Gemini, refer to MCP servers with Gemini CLI.
  1. Locate your Gemini settings file:

    • macOS/Linux: ~/.gemini/settings.json

    • Windows: %USERPROFILE%\.gemini\settings.json

  2. Open the file in a text editor.

  3. Add the CloudBees Unify MCP Server configuration to the unify-mcp-server section:

    { "security": { "auth": { "selectedType": "oauth-personal" } }, "mcpServers": { "unify-mcp-server": { "httpUrl": "https://mcp.cloudbees.io/v1/mcp", "authProviderType": "dynamic_discovery", "oauth": { "clientId": "public-mcp-client", "scopes": ["mcp:unify:connect", "basic", "profile", "openid"] } } } }

    If you already have other CloudBees Unify MCP Servers configured, add the unify-mcp-server entry to the existing mcpServers object.

    public-mcp-client is the shared OAuth client ID for the CloudBees Unify MCP Server. Use this exact value and do not register or generate a new client ID.
  4. Save the file.

Authenticate with CloudBees Unify

After adding the server configuration, you need to authenticate from the Gemini terminal.

  1. Start Gemini in your terminal:

    gemini
  2. Run the authentication command:

    /mcp auth unify-mcp-server
  3. Gemini opens a new browser window showing the CloudBees Unify sign-in page.

  4. Sign in using Google, GitHub, or your SSO provider.

  5. Select your Root Organization from the list.

  6. The browser shows "Authentication successful".

  7. Return to the Gemini terminal.

  8. Gemini confirms the connection.

If you’re already signed in to CloudBees Unify in your browser, you may only need to select your Root Organization. You only see organizations you have access to.

Verify the connection

Test the connection by asking Gemini a question that requires CloudBees Unify:

What CloudBees Unify components do I have access to?

Gemini should call the CloudBees Unify MCP Server and return your component list.

If you receive an error, refer to Troubleshooting.

Manage the connection

After connecting to the CloudBees Unify MCP Server, you can disconnect, reauthenticate, or remove the server configuration as needed.

Disconnect from the CloudBees Unify MCP Server

To temporarily disconnect from the CloudBees Unify MCP Server:

  1. Open your Gemini settings.json file (refer to the paths above).

  2. Comment out or remove the unify-mcp-server entry from the mcpServers object.

  3. Save the file.

You can reconnect by uncommenting or re-adding the configuration.

Reauthenticate the CloudBees Unify MCP Server

If your authentication expires or you need to switch organizations:

  1. Start Gemini in your terminal:

    gemini
  2. Run the following authentication command:

    /mcp auth unify-mcp-server
  3. Complete the OAuth flow in your browser.

  4. Select the desired organization.

Remove the CloudBees Unify MCP Server

To completely remove the CloudBees Unify MCP Server, run:

gemini mcp remove unify-mcp-server

Alternatively, open your Gemini settings.json file (refer to the paths above), remove the unify-mcp-server entry from the mcpServers object, and save the file.

Troubleshooting

If you encounter connection or authentication issues, refer to Troubleshooting.