Configure Google Gemini to connect to the CloudBees Unify MCP Server so you can work with CloudBees Unify conversationally from Gemini. For an overview of the CloudBees Unify MCP Server, refer to Understanding the CloudBees Unify MCP Server.

Prerequisites

Complete the following before you begin:

  • Enable MCP support in Google Gemini.

  • Have an active CloudBees Unify account.

  • Have a web browser available 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. Manually add the CloudBees Unify MCP Server configuration to Gemini’s settings.json file.

For more 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 MCP servers configured, add the unify-mcp-server entry to the existing mcpServers object.

    The 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.

Filter tools using toolset headers

To request specific toolsets, add a headers field alongside the oauth block:

{ "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"] }, "headers": { "X-MCP-Toolsets": "workflows,application-security" } } } }

To restrict to read-only tools:

"headers": { "X-MCP-Toolsets": "workflows,application-security", "X-MCP-Readonly": "true" }

To opt in to all tools:

"headers": { "X-MCP-Toolsets": "all" }

Omit headers entirely to use the default toolset.

For the full list of toolsets, refer to CloudBees Unify MCP Server tool reference.

Toolset filtering using X-MCP-Toolsets and X-MCP-Readonly headers is supported for all MCP clients, including Antigravity, Cursor, Claude Code, and Gemini.

After editing the headers field, save the file and restart Gemini. If prompted, reauthenticate with /mcp auth unify-mcp-server.

Authenticate with CloudBees Unify

After adding the server configuration, 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, the organizations you have access to are listed. Be sure your Root Organization is selected. Only organizations you have access to are listed.

Verify the connection

For example, ask Gemini:

What CloudBees Unify components do I have access to?

Gemini calls the CloudBees Unify MCP Server and returns your component list.

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. For file location, refer to Add the CloudBees Unify MCP Server.

  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. For file location, refer to Add the CloudBees Unify MCP Server. Remove the unify-mcp-server entry from the mcpServers object and then save the file.

Troubleshooting

If you encounter connection or authentication issues, refer to Troubleshoot common issues with the CloudBees Unify MCP Server.