Install Bitrise MCP Server in Google Gemini CLI
PrerequisitesClick to copy link
- The latest version of Google Gemini CLI installed (see official Gemini CLI documentation)
- A Bitrise account
- For local setup: Go (>=1.25) installed and a Bitrise PAT
Bitrise MCP Server ConfigurationClick to copy link
MCP servers for Gemini CLI are configured in its settings JSON under an mcpServers key.
- Global configuration:
~/.gemini/settings.jsonwhere~is your home directory - Project-specific:
.gemini/settings.jsonin your project directory
You may need to restart the Gemini CLI for changes to take effect.
Method 1: Gemini Extension (Recommended)Click to copy link
The simplest way is to use Bitrise's hosted MCP server via our Gemini extension:
gemini extensions install https://github.com/bitrise-io/bitrise-mcp
The extension handles the OAuth flow automatically on first use — you'll be prompted to sign in to Bitrise in your browser.
Method 2: Remote ServerClick to copy link
You can also connect to the hosted MCP server directly:
// ~/.gemini/settings.json
{
"mcpServers": {
"bitrise": {
"httpUrl": "https://mcp.bitrise.io"
}
}
}
On first tool use, Gemini CLI will open your browser for the Bitrise OAuth sign-in.
Fallback: PAT-based authenticationClick to copy link
For Gemini CLI builds that don't yet support MCP OAuth, create a Bitrise PAT and pass it as a header:
// ~/.gemini/settings.json
{
"mcpServers": {
"bitrise": {
"httpUrl": "https://mcp.bitrise.io",
"headers": {
"Authorization": "Bearer $BITRISE_PAT"
}
}
}
}
Storing Your PAT Securely
For security, avoid hardcoding your token. Create or update ~/.gemini/.env (where ~ is your home or project directory) with your PAT:
# ~/.gemini/.env
BITRISE_PAT=your_token_here
Method 3: Local Server Setup (Go Required)Click to copy link
The local server uses stdio with a Personal Access Token:
// ~/.gemini/settings.json
{
"mcpServers": {
"bitrise": {
"command": "go",
"args": [
"run",
"github.com/bitrise-io/bitrise-mcp/v2@v2"
],
"env": {
"BITRISE_TOKEN": "$BITRISE_PAT"
}
}
}
}
VerificationClick to copy link
To verify that the Bitrise MCP server has been configured, start Gemini CLI in your terminal with gemini, then:
-
Check MCP server status:
/mcp listℹ Configured MCP servers:🟢 bitrise - Ready (62 tools)- abort_build- abort_pipeline- add_member_to_group... -
Test with a prompt
List my Bitrise appsThe first tool call will trigger the OAuth sign-in flow if you're using the remote server without a PAT.
Advanced configurationClick to copy link
See Tools for enabling/disabling specific API groups.
You can find more MCP configuration options for Gemini CLI here: MCP Configuration Structure. For example, bypassing tool confirmations or excluding specific tools.
TroubleshootingClick to copy link
Authentication IssuesClick to copy link
- OAuth flow doesn't open: Update Gemini CLI to a recent build, or fall back to PAT-based auth
- Token expired (PAT): Generate a new Bitrise token
Configuration IssuesClick to copy link
- Invalid JSON: Validate your configuration:
cat ~/.gemini/settings.json | jq .
- MCP connection issues: Check logs for connection errors:
gemini --debug "test command"