CreateBlogSupport
Log inSign up
Home
Create
  • Authentication
  • Login with Webex
  • AI Assistant for Developers
  • Agentic Apps
  • Bots
  • Embedded Apps
  • Integrations
  • Service Apps
  • Instant Connect
  • Workspace Integrations
  • Bring Your Own Datasource
  • Webex MCP Server
  • Suite Sandbox
  • Contact Center Sandbox
  • Guest to Guest Sandbox
  • Submit Your App
  • Tutorials

Create

Gemini CLI

Connect Gemini CLI to a Webex MCP server.

Before configuring, you'll need OAuth 2.0 credentials. See OAuth 2.0 setup instructions in the main guide.

anchorOAuth 2.0

anchor

To configure OAuth for an MCP server in the Gemini CLI, edit the ~/.gemini/settings.json file, then use the /mcp auth command in the CLI to complete authentication through a web browser.

1. Add the MCP server configuration to settings.json

Open or create your Gemini CLI configuration file at ~/.gemini/settings.json. Add an entry in the mcpServers block for your server:

{
  "mcpServers": {
    "<server-name>": {
      "url": "<MCP_SERVER_URL>",
      "oauth": {
        "enabled": true,
        "clientId": "YOUR_CLIENT_ID",
        "clientSecret": "YOUR_CLIENT_SECRET",
        "authorizationUrl": "https://webexapis.com/v1/authorize",
        "tokenUrl": "https://webexapis.com/v1/access_token",
        "scopes": ["spark:mcp", "required_scope_1", "required_scope_2"]
      }
    }
  }
}
  • enabled — Set to true to enable OAuth for the server
  • clientId and clientSecret — Your OAuth 2.0 client credentials from the Webex Integration
  • authorizationUrl and tokenUrl — The endpoints for the OAuth flow
  • scopes — An array of required OAuth scopes
2. Authenticate within the Gemini CLI

After saving the settings.json file, restart the Gemini CLI and authenticate the server:

  1. Run gemini to start the CLI session
  2. Initiate the authentication flow:
/mcp auth <server-name>

This will open a browser window for you to sign in and grant access. The Gemini CLI stores the access and refresh tokens locally in ~/.gemini/mcp-oauth-tokens.json for future use.

anchorVerify

anchor

In Gemini CLI, run /mcp to check connected servers.

In This Article
  • OAuth 2.0
  • Verify

Connect

Support

Developer Community

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2026 Cisco and/or its affiliates. All rights reserved.