CONNECT GEMINI
There are two ways in. The Gemini app can add QuantGPT as a custom app if you are in the US, 18 or over, and signed in with a personal Google Account. Gemini CLI, Google's open-source terminal agent, connects from anywhere with a QuantGPT key. Everyone else can use the setup prompt.
Updated September 2026 · Gemini facts from its maker's own docs, linked under Sources
// WHAT YOU GET
Once connected, Gemini can search QuantGPT's strategy library, run backtests on decades of US market history, grade a stock and query the research warehouse, in the middle of a conversation. The work runs on QuantGPT's side, and Gemini gets the numbers back, losing years included. The connection uses MCP (Model Context Protocol), the open standard AI apps use to reach outside tools.
// BEFORE YOU START
- A QuantGPT account. QuantGPT ($49 a month) allows 500 AI calls a day and QuantGPT Pro ($149 a month) allows 1,500, each with a 3-day free trial. QuantGPT can issue three keys and QuantGPT Pro five. The plans.
- For the Gemini app: Google's requirements are that you are 18 or over and in the US, signed in with a personal Google Account (not a work or school one), with Keep Activity on. Custom apps are available in English only. Google's help page lists no paid plan for them.
- For Gemini CLI: Gemini CLI installed, for example with
npm install -g @google/gemini-cliorbrew install gemini-cli. Signed in with a personal Google account, its free tier allows 60 requests a minute and 1,000 a day.
// ROUTE A · THE GEMINI APP
- Open Gemini on a computer. Go to gemini.google.com. Custom apps can only be added in the web app; once connected, they work in the Gemini mobile app too.
- Open Connected Apps. At the bottom, click Settings, then Connected Apps. If Connected Apps is not there, click Personal Intelligence first, then Connected Apps.
- Add a custom app. Under Custom apps, click the Add a custom app field (or the Add a custom app button if you already have one).
- Enter QuantGPT's address. Enter the MCP server URL
https://terminal.quantgpt.co/mcp. Leave Advanced features closed: it is for servers without dynamic client registration, and QuantGPT supports it, so there are no credentials to enter. Click Next. - Sign in to QuantGPT. Follow the on-screen instructions. Gemini sends you to QuantGPT's sign-in: sign in, read the approval page, and press CONNECT.
- Use it in a chat. Type @ and select QuantGPT, so Gemini uses it for that prompt.
// ROUTE B · GEMINI CLI, WITH A KEY
- Issue a key. Sign in at terminal.quantgpt.co and open your account page. Under Keys for your AI, type a label (for example
gemini cli) and press Issue key. Copy theqg_sk_...key right away: it is not stored and will not be shown again. - Add QuantGPT for your user. Run this, with your key in place of
qg_sk_YOUR_KEY:gemini mcp add -s user --transport http --header "Authorization: Bearer qg_sk_YOUR_KEY" quantgpt https://terminal.quantgpt.co/mcp
The-s userflag saves it in~/.gemini/settings.jsonin your home folder. Without it, Gemini CLI saves to the current project's.gemini/settings.json, where a key can end up in a git repository. - Check the connection. Run
gemini mcp list. QuantGPT should show asquantgpt: https://terminal.quantgpt.co/mcp (http) - Connected. - See the tools. Start
geminiand type/mcp. Gemini CLI names QuantGPT's toolsmcp_quantgpt_plus the tool's name, for examplemcp_quantgpt_run_backtest. - Ask the first prompt. Gemini CLI asks before each call: proceed once, always allow this tool, always allow this server, or cancel.
Prefer to edit the file yourself? This is the entry the command writes to
~/.gemini/settings.json. Older setups name the address httpUrl
instead of url with "type": "http"; current versions of Gemini CLI
read both.
{
"mcpServers": {
"quantgpt": {
"url": "https://terminal.quantgpt.co/mcp",
"type": "http",
"headers": {
"Authorization": "Bearer qg_sk_YOUR_KEY"
}
}
}
}
The key sits in that file as plain text. Keep it out of shared folders, and if it leaks, revoke it on your account page: a revoked key stops working on its next call.
// CHECK IT WORKED
Ask: Call QuantGPT's describe_capabilities tool and tell me what data it
covers. In the Gemini app, start the message with @ and pick QuantGPT. A connected
app answers with QuantGPT's own map: the data it holds, the factors, the benchmarks and the
method.
On the app route, your QuantGPT account page also
shows the connection under Keys for your AI, as a key labelled
connector: plus the app's name.
// YOUR FIRST PROMPT
Backtest a 200-day moving average rule on SPY and show the losing years
In the Gemini app, type @ and select QuantGPT first. In Gemini CLI, you can name the
tool if Gemini does not reach for it: use mcp_quantgpt_run_backtest.
Your AI picks the tool and the settings. It may test the rule on SPY itself, or on the S&P 500 index with the closest built-in rule (the 10-month average, or the 50-day and 200-day golden cross). Ask it to say which tool it called and with what settings, so you know exactly what was tested.
// WHAT COMES BACK
A backtest answers with the numbers behind it, not a summary. Your AI receives:
- The rule as the engine read it, the dates covered and the number of periods.
- For the rule and for its benchmark side by side (for a timing rule, the benchmark is buy and hold): growth per year, the worst fall from a peak, volatility, the Sharpe ratio, the share of winning periods, and a luck check (the probabilistic Sharpe ratio).
- The same statistics split at a cut year (2015 unless you pick another), so the years after the cut read on their own.
- A table by decade.
- Every period's return, for the rule and for the benchmark. That is how your AI finds the losing years: it adds the returns up by calendar year.
- For stock-picking backtests, a cost model: the measured turnover and the results net of 5, 10, 25 and 50 basis points a side.
- One of three findings (DATA VALIDATED, TRADE-OFF or NO EDGE) with the sentence that says what it means.
- Often, links to share-ready PNG charts, one of them year by year. Those links are public: anyone who has one can open it.
- A slow run answers with a job id first; your AI collects the result with
fetch_job.
Two limits travel with the numbers. Companies that later delisted are in the market-wide backtest universe from 1998 and earlier years hold survivors only, so a backtest across the whole market that starts before 1998 leans toward survivors; backtests start in 1998 unless you pick another year. And a backtest shows what happened in the past, not what will happen. QuantGPT's server instructions ask your AI to say so when it reports a market-wide result.
// THE TOOLS GEMINI SEES FIRST
On connect, QuantGPT lists 19 tools: 14 research tools, and 5 that switch on the rest by
category (equities, portfolio, macro,
alt_markets, events, charts and desk).
The server also sends your AI instructions when it connects: what the data holds, the method,
and how the tools fit together.
| TOOL | WHAT IT DOES |
|---|---|
search, fetch | Find and open QuantGPT's own records to cite: library strategies, study write-ups, forum threads, your saved studies and glossary terms, each with a link. |
describe_ | The full map: every factor, benchmark and timing rule, the library's categories, what each result label means, and the method. Your AI should call it first. |
guide, get_ | A step-by-step course for new users, and ready-made prompts matched to the tools that answer them. |
search_ | Search 175 documented strategies, 55 of them runnable. |
run_ | Backtest criteria (up to 8 filters and a ranking, or a list of tickers you choose), or up to 100 variants in one call. |
challenge_ | The skeptic pass: eleven checks that try to break a result, strongest objection first. |
fetch_ | Collect a slow run that answered with a job id. |
grade_ | One stock's grades on six dimensions against the market, and a read that puts the strongest objection first. Never an order. |
query_ | Read-only SQL over every research database, and the map of its tables. |
available_ | See the other categories, switch them on for your key, or run any tool by name. |
Every tool can be called at any time. If Gemini does not see a tool, ask it to run the tool
by name through call_tool. Gemini CLI reads the tool list when it starts, so after
your AI switches on a category, restart gemini to see the new tools listed.
// TROUBLESHOOTING
- No Connected Apps or Custom apps in the Gemini app. Check Google's requirements: 18 or over, in the US, a personal Google Account, Keep Activity on, English. Look under Personal Intelligence too, and add custom apps from gemini.google.com in a browser.
- The Gemini app's sign-in does not finish. Sign in at terminal.quantgpt.co in the same browser first, then try again. If it still fails, use Gemini CLI with a key and tell us at desk@quantgpt.co.
- Gemini CLI opens a browser, then shows
Missing issuer parameter in response. QuantGPT was added without the key header, so Gemini CLI tried an OAuth sign-in, and QuantGPT's sign-in does not send the issuer parameter Gemini CLI checks for. Remove it withgemini mcp remove -s user quantgptand add it again with the header, as in Route B. gemini mcp listshows Disconnected. Check the address is exactlyhttps://terminal.quantgpt.co/mcpwith"type": "http", the header reads exactlyAuthorization: Bearer qg_sk_..., and the key is still active on your account page. Rungemini --debugfor details.- Gemini answers without calling QuantGPT. In the app, type @ and select
QuantGPT. In the CLI, name the tool, for example
mcp_quantgpt_run_backtest. - An error mentions the daily cap, HTTP 429 or HTTP 402. Your plan's AI calls are used up for now. The count is per account, across every key and connection; only tool calls count, not connecting or listing tools; and it resets at midnight UTC. HTTP 402 means the 3-day trial's 5 AI calls are used: start the plan from your account page. A message that starts with
slow downmeans the limit of 120 requests a minute per account: wait a minute. - The answer says the engine is busy. QuantGPT runs backtests in a fair queue. Wait a few seconds and ask again.
- To disconnect. In the Gemini app: Settings → Connected Apps, then under
Custom apps turn QuantGPT off, or choose More details → Disconnect, or More details
→ Remove app. In Gemini CLI:
gemini mcp remove -s user quantgpt. Then revoke the key on your QuantGPT account page.
// THE SETUP PROMPT, FOR PLANS WITHOUT CONNECTORS
Outside the US, on a work or school account, or without a terminal, open QuantGPT's setup prompt, copy all of it, and paste it as the first message of a new Gemini chat. Gemini then knows what QuantGPT holds, the method and the first steps, and walks you through them. It cannot run studies itself: you run them in the terminal and bring the numbers back.
// LIMITS AND BOUNDARIES
AI calls are counted per account, across all your keys and connections: 500 a day on QuantGPT and 1,500 a day on QuantGPT Pro, the 3-day trial included. Only tool calls count toward those; connecting and listing tools do not. Daily counts reset at midnight UTC. Separately, each account can make at most 120 requests a minute.
No QuantGPT tool can place, change or cancel an order. A few save things to your own QuantGPT account, such as a saved study or an alert. QuantGPT is research software: it reads market history and reports what happened, losing years included. Nothing here is investment advice.
Google says the Gemini app asks you to confirm write actions, and Gemini CLI asks before every tool call unless you allow the tool or the server.
// FAQ
Does Gemini support MCP servers?
Yes, two ways. The Gemini app accepts custom apps by MCP server URL, for people in the US, 18 or over, signed in with a personal Google Account, with Keep Activity on, in English. Gemini CLI connects to MCP servers over stdio, SSE or streamable HTTP, and QuantGPT's endpoint speaks streamable HTTP.
Do I need a paid Gemini plan?
Google's help page for custom apps lists no paid plan; its requirements are the ones above. Gemini CLI has a free tier with a personal Google account: 60 requests a minute and 1,000 a day, per Google's own README.
Can I use a work or school Google Account?
Not for custom apps in the Gemini app: Google says they need a personal Google Account for now. Gemini CLI signs in separately (with a Google account, a Gemini API key or Vertex AI, per its README) and reaches QuantGPT with a QuantGPT key either way. The setup prompt can be pasted into any chat.
Why does the Gemini CLI route use a key instead of a sign-in?
Gemini CLI can sign in to MCP servers through OAuth, but once it knows the server's issuer it rejects a sign-in reply that does not name it (RFC 9207), and QuantGPT's sign-in does not send that today. A key in the header skips the sign-in, and you can revoke it on your account page at any time.
What does QuantGPT cost?
QuantGPT is $49 a month with 500 AI calls a day, and QuantGPT Pro is $149 a month with 1,500 a day. Both start with a 3-day free trial on the plan's full daily limits.
Can Gemini place trades through QuantGPT?
No. No QuantGPT tool can place, change or cancel an order. QuantGPT is research software: it reads market history and reports what happened, losing years included. What you do with a result is your decision, at your own broker.
What data does QuantGPT cover?
US stocks and indexes (the S&P 500 from 1928, single stocks thin before 1980), fundamentals joined by filing date (about 9% of quarters carry an estimated filing date, none the quarter-end), crypto with funding rates, commodities, FRED macro series, prediction markets, sports odds and weather, plus a library of 175 documented strategies, 55 of them runnable. Companies that later delisted are in the market-wide backtest universe from 1998; earlier years hold survivors only.
// SOURCES
Facts about Gemini come from its maker's own public pages, as of September 2026, and may have changed since:
- Google: Connect and manage custom apps for Gemini Apps: who can add custom apps, the steps, the @ mention, disconnecting, and confirmation of write actions
- Google: MCP servers with Gemini CLI: settings.json and headers, gemini mcp add and its scopes, gemini mcp list, /mcp, tool names, tool confirmations, and the OAuth issuer check
- Google: gemini mcp add, source code: the url and type entry the command writes
- Google: Gemini CLI MCP client, source code: that current versions read both url with type and the older httpUrl
- Google: Gemini CLI: installation and the free tier
Facts about QuantGPT come from QuantGPT's own server and plans.
GEMINI IS A TRADEMARK OF ITS OWNER; NO AFFILIATION OR ENDORSEMENT IS IMPLIED. QUANTGPT IS A RESEARCH TOOL, NOT INVESTMENT ADVICE. BACKTESTS ARE NOT PROMISES. THE TERMS GOVERN.