Advanced

MCP server

Give Claude Code, Codex, Cursor, or any MCP client Gloom's research tools, and with Terminal control your open Gloom app.

Gloom Cloud hosts a Model Context Protocol server at https://api.gloom.sh/mcp. It gives an agent the research tools Gloom's own assistant uses, and with the right access your notes, teams and connected brokers. Part of Gloom Pro.

The same keys work for the REST API and Google Sheets. With Terminal control the same server also drives your open desktop or TUI; for one-off reports, use the CLI.

Connect

Sign in from the client. OAuth clients (Claude Code, claude.ai, Cursor and most recent clients) only need the endpoint. The first call opens a browser tab where you choose what the client may reach.

bash
claude mcp add --transport http gloom https://api.gloom.sh/mcp

Use a key. For scripts and clients without a browser, create a key in Cloud settings, Agents and send it as a bearer token (x-api-key also works). Keys are shown once; you can hold up to 10.

bash
claude mcp add --transport http gloom https://api.gloom.sh/mcp \
  --header "Authorization: Bearer gloom_mcp_..."
bash
export GLOOM_MCP_KEY=gloom_mcp_...
codex mcp add gloom --url https://api.gloom.sh/mcp --bearer-token-env-var GLOOM_MCP_KEY
json
{
  "mcpServers": {
    "gloom": {
      "url": "https://api.gloom.sh/mcp",
      "headers": { "Authorization": "Bearer gloom_mcp_..." }
    }
  }
}

Raw HTTP is stateless: one JSON reply per POST, and GET and DELETE return 405.

Access

AccessReaches
Market dataMarket, company, filing, macro, news and research tools
ReadPlus teams, notes, collections and the broker tools
Read and writePlus notes.save, collections.add_symbol, collections.remove_symbol
Terminal controlAdds the `terminal.*` tools to any level: your open Gloom app. Off unless you tick it

A key's access, Terminal control and optional team pin are fixed at creation. Signed-in clients get the same levels through the mcp:read, mcp:write and mcp:terminal scopes; the consent page leaves Terminal control unticked. tools/list returns only what the caller may call.

Tools

Read-only unless marked write. Most take limit; ? marks an optional argument. tools/list has the full schema. Start with market.search when a ticker is ambiguous.

Market

ToolArguments
market.searchquery
market.quotessymbols, exchange?
market.historysymbol, exchange?, interval?, startDate?, endDate?
market.screenercategory
market.options_chainsymbol, exchange?, expiration?
market.short_interestsymbol, years?
market.options_flowsymbol?, days?, minPremium? (a filter searches recorded prints, not the live tape)

Company

ToolArguments
company.profile, company.financials, company.holders, company.analyst_research, company.corporate_actionssymbol, exchange?
company.statementssymbol, exchange?, period?
equity.diagnosticsymbol, exchange?, mode?

Filings and ownership

ToolArguments
sec.filingsticker, offset?
sec.insider_transactionsticker
sec.thirteenf_holdersticker, quarter? (YYYYQn), offset?
sec.thirteenf_crowdingquarter?, rank? (new, exits, increases, decreases), funds?
congress.house_trades, congress.senate_tradesyear?, member?, ticker?, side?, owner?, assetType?, minAmount?

Macro and news

ToolArguments
macro.calendar, macro.yield_curvenone
macro.seriesseriesId, startDate?, endDate?
news.storiesquery?, feed?, tickers?, topics?
social.ticker_poststicker, hours?, includeReplies?
social.search_postsquery, queryType?, hours?

Events and credit

ToolArguments
market.catalystssymbol?, type?, agency?, country?, sector?, source?, status?, search?, from?, to?, dateField?, upcoming?, changed?, offset?
company.litigationsymbol, offset?
catalysts.eventid, offset?
catalysts.changessince, cursor?
credit.documentssymbol
credit.instrumentsymbol, instrumentId
credit.screenheadroomBelow?, springingWithinMonths?

Company data

ToolArguments
company.kpis, company.guidancesymbol, metric?, basis?, from?, to?, asOf?, includeRevisions?
company.awardsticker?, jurisdiction?, agency?, sector?, awardType?, from?, to?, fiscalYear?, query?, minAmount?, cursor?
company.award_evidenceid, revisionsCursor?
company.hiringticker, roles?
market.hiring_moversnone
hiring.momentumsymbol?, offset?
apps.attentionsymbol?, country?, chart?, days?, offset?
apps.rank_historystore, appId, country?, chart?, days?, offset?

Markets and compute

ToolArguments
market.attentionsymbol?, window?
perps.boardbaseAsset?, underlyingSymbol?, assetClass?
perps.comparebaseAsset
perps.historymarketId, from?, to?, resolution?
perps.rankings, gpu.boardnone
gpu.historygpuModel?, seriesId?, basis?, from?, to?
gpu.changesgpuModel?

Supply chain and power

ToolArguments
company.supply_chain_graphfrom, depth?, direction?, roles?, tiers?, minPct?, minConfidence?, asOf?
company.supply_chain_pathsfrom, to, plus the graph arguments
company.supply_chain_evidencesymbol, tiers?, includeLeads?
power.board, power.historycountry?, region?, fuel?, status?, kind?, symbol?, search?, loadClass?, historical?, offset?
power.summarythe same filters, plus section
power.projectid, offset?
power.coveragenone

Notes and teams

ToolArguments
teams.listnone
notes.listscope (user or team), teamId?, kind? (ticker or quick)
notes.getid
notes.save (write)scope, teamId?, kind, key, title?, content, expectedRevision?
collections.listteamId?
collections.getteamId?, collectionId
collections.add_symbol (write)teamId?, collectionId, symbol, exchange?, quantity?, note?
collections.remove_symbol (write)teamId?, collectionId, symbol, exchange?

notes.save replaces the whole note, so read it first and pass expectedRevision; a newer edit returns revision_conflict. quantity applies to portfolios only.

Portfolio

ToolArguments
portfolio.accountsnone
portfolio.positionsbroker?
portfolio.performancebroker?, accountId?, since? (YYYY-MM-DD)
portfolio.exposureholdings, depth?, cashWeight?, scenario

Brokers

Connect a broker in Gloom and every client with read access reaches it through Gloom. The portfolio.* tools cover every connected broker in one call and need no Pro.

With no connection they return no rows and a note; a broker that fails adds an error row and the result is partial. They read brokerage accounts, not team portfolios (use collections.get).

BrokerToolsWrites (read and write access)
Interactive Brokersibkr.*: positions, balances, trades, orders, contract search, prices, alerts, watchlistsOrder instructions, alerts and watchlists, when trading instructions are enabled
Robinhoodrobinhood.*: accounts and equity positionsNone

An IBKR order instruction is not an order: IBKR returns a link where you review and submit it yourself.

Terminal control

Terminal control reaches everything the remote API does in your open, signed-in desktop or TUI: read the screen, open and arrange panes, navigate tickers, switch and edit layouts, semantic UI actions and plugin capabilities. The app asks once before an assistant takes over; plugin capabilities, button presses, commands and anything that reaches an outside service (orders, transfers, messages) ask you in the app on every call, and an unanswered one is denied after 60 seconds.

Claude Code ──MCP──> api.gloom.sh/mcp ──Cloud socket──> your Gloom app ──> panes, layouts, tickers
                                                             │
                                          asks you: once per assistant, every call that leaves the app
ToolDoes
terminal.devicesOpen terminals, the most recently used first
terminal.snapshotLayouts, panes, focused pane, command bar, open form
terminal.pane_contentOne pane's settings, state and drawn UI (paneId)
terminal.pane.screenshotOne pane of the desktop app as a PNG image, as it looks on screen (paneId?, width?). A read: it runs once you approved the assistant, without asking each call. Up to 1600 px on the long side and 512 KB; the TUI answers unsupported
terminal.get_resource, terminal.patch_resourceAny remote API resource; configuration arrives without credentials
terminal.pane.*, terminal.ticker.*, terminal.layout.*, terminal.view.*, terminal.app.*, terminal.desktop.*, terminal.command_bar.*, terminal.ui.*, terminal.capability.invokeOne tool per remote API operation, generated from the app's schema
terminal.call_resultThe outcome of a call that answered pending

Each tool takes device? (an id or name from terminal.devices). Descriptions carry the operation's tier and whether you confirm each call. A call that waits on you longer than 45 seconds answers pending with a callId; read the outcome with terminal.call_result. With no app open, tools answer no_terminal. Revoke an assistant in the app (Account Management, Agents), or revoke its key or disconnect it here, and its next call stops.

Results and limits

Each call returns text plus structuredContent with status (ok, partial when a limit removed rows, or error), rowCount, truncated, asOf and data. Results are capped at 256 KB. A failed source returns status: "error" with data.error = { code, source, reason }. terminal.pane.screenshot returns the same JSON as text plus an image block, and no structuredContent, since some clients read only that and would drop the image.

Creating keys needs Pro. Any valid key can initialize and tools/list; tool calls need Pro, except portfolio.*, and get real-time quotes and the live news wire.

Keys allow 120 requests a minute and 5,000 a day; over the limit returns 429 with Retry-After. If Pro lapses, keys stay but tool calls are refused. Revoking a key applies on the next request; a disconnected client's token expires within two hours, and its terminal calls stop at once.