GeminiGemini
Demo environmentGet API key
  • Overview
  • Crypto Trading
  • Prediction Markets
  • Perpetuals
  • Stocks
  • API Reference
  • SDKs & Tools
Changelog
Gemini logoGemini logo

© 2026 Gemini Space Station, Inc.

OverviewMCP server
SDKs & Tools

Gemini MCP server

The Gemini Model Context Protocol (MCP) server connects MCP clients to Gemini API tools. The open-source server runs locally over standard input and output (stdio).

Install the local server

Use Node.js 22.4 or later and npm. Clone the developer-platform repository, then build the server:

TerminalCode
git clone https://github.com/gemini/developer-platform.git cd developer-platform/packages/mcp-server npm install npm run build

Create an API key in Gemini API Settings. Add the server to Claude Code with the absolute path to the built entry point:

TerminalCode
claude mcp add gemini -s user \ -e GEMINI_API_KEY=YOUR_API_KEY \ -e GEMINI_API_SECRET=YOUR_API_SECRET \ -- node /absolute/path/to/developer-platform/packages/mcp-server/dist/index.js

The command registers the server for all projects. Remove -s user to register it for the current project only. Add GEMINI_ACCOUNT=primary when you use a Master API key. If your key uses time-based nonces, set GEMINI_API_NONCE_MODE=time-based. The default mode is incremental.

For Claude Desktop, ChatGPT, and all supported environment variables, follow the MCP server README. Do not put API secrets in source files, prompts, or logs.

Tools

Gemini MCP's OAuth-backed tool catalog exposes public market data and authenticated account tools. The local open-source server uses API keys and has a separate tool catalog. See its README for package-specific names and operations.

Tool groupMCP tool namesAccess
Market datagemini_get_ticker, gemini_get_ticker_v1, gemini_get_symbol_details, gemini_list_symbols, gemini_list_prices, gemini_get_order_book, gemini_list_candles, gemini_list_derivative_candles, gemini_list_market_tradesPublic read-only data.
Prediction marketsgemini_list_prediction_events, gemini_get_prediction_eventPublic read-only event and contract data. Use gemini_get_prediction_event for full event details and terms.
Networks and assetsgemini_get_network, gemini_get_assets_for_networkNetwork metadata is public. Asset lookup requires addresses:read.
Connection statusgemini_auth_statusReports authentication configuration without revealing secrets.
Account readsgemini_list_balances, gemini_list_orders, gemini_get_order_status, gemini_list_trades, gemini_list_derivative_positionsAuthenticated data. gemini_list_derivative_positions is for explicit derivatives or perpetuals position requests.
Sandbox Credit Card datagemini_sandbox_gemini_get_credit_card_balance, gemini_sandbox_gemini_get_credit_card_rewards, gemini_sandbox_gemini_list_credit_card_statements, gemini_sandbox_gemini_list_credit_card_transactionsSandbox only. Uses WebAPI Financial Data Exchange (FDX).

Tool availability depends on the server and environment you connect. Use your MCP client's tool list to confirm exact names and available operations.

The sandbox exposes the standard tools under gemini_sandbox_gemini_* names. It also exposes the FDX tools listed above.

Permissions and scopes

The local open-source server uses an API key and secret. It uses API-key roles, not OAuth scopes. The scope table applies to OAuth-backed Gemini MCP tools. Request only scopes needed for your workflow. See the OAuth scope reference for standard API scopes.

MCP toolsRequired OAuth scope
gemini_list_balances, gemini_list_derivative_positionsbalances:read
gemini_list_orders, gemini_get_order_statusorders:read
gemini_list_tradeshistory:read
gemini_get_assets_for_networkaddresses:read
gemini_sandbox_gemini_get_credit_card_balancefdx:accountdetailed:read
gemini_sandbox_gemini_get_credit_card_rewardsfdx:rewards:read
gemini_sandbox_gemini_list_credit_card_statementsfdx:statements:read
gemini_sandbox_gemini_list_credit_card_transactionsfdx:transactions:read; add fdx:rewards:read to include transaction rewards

The tools listed here are read-only. They do not place orders or move funds. The local server repository also documents state-changing tools. Give its API key only the roles those tools need.

Test with sandbox

Create a demo account and a sandbox API key in sandbox API Settings. Add these variables to your MCP client configuration.

Code
GEMINI_API_BASE_URL=https://api.sandbox.gemini.com GEMINI_SDK_ENV=sandbox GEMINI_WS_URL=wss://ws.sandbox.gemini.com

FDX tools are available only in the sandbox MCP tool set. Use sandbox OAuth authorization and request only needed FDX scopes. Do not use production credentials or hosts for sandbox tests.

For the local server's complete environment-variable reference, see its README.

Overview
On this page
  • Install the local server
  • Tools
  • Permissions and scopes
  • Test with sandbox