Gemini CLI Setup
Massive's remote MCP server connects Gemini CLI to live U.S. market data: dividends, trades, quotes, options chains, and the rest of our catalog. It queries our REST API under the hood, so Gemini can pull data and verify response shapes while building against it.
Note on Gemini products: This page targets the open-source Gemini CLI, not Gemini Code Assist or the Gemini web app. The CLI is a distinct product with its own configuration and MCP support.
This guide walks through installing the CLI, adding the remote server, and authenticating over OAuth. Setup takes about three minutes and requires Node.js plus a Massive account.
What You Can Do
Once connected, Gemini CLI can:
- Pull live market data inline in a chat session, like the latest trade or quote for any ticker.
- Inspect the real response shape of an endpoint before writing code against it.
- Confirm a field name exists instead of guessing, avoiding hallucinated keys.
- Discover which Massive endpoint returns the data shape you need.
Because the server makes the calls itself, Gemini can check real responses as it works, which keeps generated integrations accurate.
Setup
Two steps. Allow about three minutes start to finish.
1. Install Gemini CLI
If you don't have it, install the CLI via npm:
Confirm it works:
2. Add the Massive Remote MCP Server
Add Massive to Gemini CLI's config at ~/.gemini/settings.json:
Restart the CLI. The first time Massive's tools are used, the CLI discovers the OAuth endpoints, opens your browser to sign in to your Massive account, and stores the tokens (refreshing them automatically). There is no API key to copy or store. A free Basic account is enough to start.
Your MCP access mirrors your Massive entitlements. You can query any asset class your plan includes. If you have Stocks access, stocks data is available through MCP. Requesting data you are not entitled to (for example, Options without an Options plan) returns an access-denied error.
Test the Integration
Now that the connection is live, put it through its paces. A few prompts to start with:
- "Show me the latest trade for AAPL." (Trades)
- "Is the U.S. market open right now?" (Market Status)
- "When is the next market holiday?" (Market Holidays)
- "What dividends has AAPL paid this year?" (Dividends)
- "Give me a snapshot of today's biggest gainers." (Snapshots)
When you're ready to go deeper, hand Gemini CLI a full brief and let it chain several calls together:
Pull all dividends declared in the last 30 days, filter to U.S. equities with a market cap over $50 billion, rank them by yield, and summarize the top five with their pay dates.
Gemini CLI will search for the right endpoints, make the live calls, and stitch the results into a single answer.
Troubleshooting
Massive doesn't appear in the tool list. Restart Gemini CLI after editing ~/.gemini/settings.json, and confirm the JSON parses cleanly.
Authentication didn't complete. Trigger a Massive query again to re-open the browser sign-in, and make sure you granted access.
Gemini answers without calling Massive. It's drawing on training data. Prompt it explicitly to "use the Massive MCP server" before the question.
Brand confusion: Gemini CLI vs Gemini Code Assist. Gemini Code Assist is a separate product that integrates into IDEs like VS Code. This page covers the standalone CLI only.
Access-denied errors. You're querying an asset class your plan doesn't include. Check your entitlements in the Dashboard.