Skip to main content
The Gemini CLI provides command-line access to Google’s Gemini AI models with MCP server support for enhanced capabilities.
Platform Support: macOS, Linux, Windows Transport Modes: Stdio (local) and HTTP (remote) Configuration: ~/.gemini/settings.json

Configuration File Location

Gemini CLI stores its MCP server configuration at:
Where ~ is your home directory.

Local (Stdio) Setup

Step 1: Install Gemini CLI (if not already installed)
Step 2: Edit settings file Open ~/.gemini/settings.json and add the following to the mcpServers object:
The --tools path must be an absolute path, not relative.

Remote (HTTP) Setup

For connecting to a remote IBM i MCP Server: Step 1: Start remote server
Step 2: Obtain access token
Step 3: Edit settings file Add to ~/.gemini/settings.json:
Production: Replace http://localhost:3010 with your production server URL and use HTTPS.

Testing the Connection

After configuration:

Multiple Servers

You can configure multiple MCP servers for different purposes:

Troubleshooting

Solutions:
  • Verify ~/.gemini/settings.json exists and has valid JSON
  • Check that npx -y @ibm/ibmi-mcp-server@latest works from terminal
  • Ensure Node.js and npm are in PATH
  • Restart Gemini CLI after configuration changes
Solutions:
  • Verify tools path is absolute: /full/path/to/tools
  • Check YAML files are valid
  • Ensure IBM i credentials are correct
  • Verify Mapepire is running on IBM i
Solutions:
  • Confirm server is running with auth enabled
  • Verify token hasn’t expired
  • Get fresh token: node get-access-token.js --verbose
  • Check Authorization header format

Custom Toolsets

Load specific toolsets for focused workflows:

Next Steps

SQL Tools

Create custom SQL operations

Configuration

Explore all configuration options

Quick Start

Basic server setup

Other Clients

Explore other MCP clients

Additional Resources