Skip to main content
Glama
tamasPetki

HeadlessTracker

by tamasPetki

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_holdingsA

Returns current portfolio holdings across all connected accounts. Use this when the user asks: 'what do I own', 'show my portfolio', 'current positions', 'what's my balance', 'show my holdings', 'how much BTC do I have', or wants any snapshot of crypto/stock/prediction-market positions. Each holding includes: symbol, asset class (crypto / stock / prediction / cash), quantity, current price, USD value, and connector-specific metadata (e.g. chain for EVM, market title for Polymarket, accountType for Bybit). Inputs (all optional): - account_id: scope to one account, e.g. 'metamask:0xabc123...' or 'bybit:UNIFIED'. Omit to query ALL configured accounts. - asset_class: scope to one of 'crypto' / 'stock' / 'prediction' / 'cash'. 'prediction' = Polymarket conditional tokens. Omit for all classes. - currency: 'USD' | 'EUR' | 'GBP' | 'HUF'. Default 'USD'. When set to anything other than USD, value/currentPrice/avgCost are converted via live FX rates (free API + fallback). The conversion source and fetchedAt are surfaced in meta.fx. Underlying connector data is unchanged — this is a display-layer convenience for users thinking in EUR/HUF/GBP. Results are cached per-connector (crypto wallets 60s, exchanges 120s, Polymarket 30s). Use 'refresh_data' tool first if the user explicitly asks for fresh / latest data. Returns position data only. Not financial advice.

refresh_dataA

Invalidates the PORTFOLIO TRACKER cache (Bybit/Binance/MetaMask/Polymarket/Solana holdings + transactions) and forces a fresh fetch from upstream APIs on the next call. Use this when the user asks: 'refresh my portfolio', 'update my holdings', 'get the latest portfolio prices', 'fetch fresh portfolio data', 'check current crypto prices', or implies real-time freshness is required FOR THE TRACKER. Optionally scope to a single connector (bybit, binance, metamask, polymarket, solana). Without a scope, invalidates everything tracker-related. DO NOT call this tool when the user means: refreshing a webpage, refreshing an OAuth token, refreshing browser cache, refreshing data from a non-tracker MCP server. It only invalidates the headless-tracker SQLite cache. After calling this, follow up with get_holdings or another data tool to actually fetch the fresh data — refresh_data only marks the cache as stale, it does not trigger fetches on its own.

get_pnlA

Returns aggregate profit/loss across all configured accounts. Use this when the user asks: 'how am I doing', 'what's my P&L', 'am I up or down', 'show profit', 'show losses', or wants any portfolio performance summary. Returned fields per account and across the total: - currentValue (USD) — current portfolio value - costBasis (USD) — sum of avgCost * quantity (where the connector tracks it) - unrealizedPnl (USD) — currentValue - costBasis (for positions still held) - realizedPnl (USD) — already-closed P&L from connector metadata - notes — caveats per connector (e.g. MetaMask doesn't track cost basis) Inputs (optional): - account_id: scope to one account. - timeframe: '24h' | '7d' | '30d' | 'ytd' | 'all'. When set to anything other than 'all', the result includes a windowDelta block computed from CoinGecko historical prices. APPROXIMATION CAVEAT: it values your CURRENT basket at historical prices vs current prices — it does NOT account for trades within the window. Communicate this honestly to the user. Polymarket positions and tokens without a CoinGecko mapping are skipped (counted in skippedSymbols). CoinGecko free-tier historical is daily granularity, so '24h' = 'yesterday's close'. - include_history (boolean, default false): also pulls transactions and runs a cost-basis ledger over them, returning realizedFromHistory per account + total. Costs an extra round-trip per account but unlocks honest realized PnL on tokens born on-chain (LP rewards, swaps, native airdrops). Tokens that arrived via wallet transfer-in (no price) get unknownSalesCount not inflated knownRealized — explicit honesty about what cost basis we know. POLYMARKET-SPECIFIC: when include_history=true, the Polymarket account's realizedPnl is replaced by the cost-basis-from-/trades number. Default mode leaves Polymarket realizedPnl null because the connector's cashPnl mixes realized + unrealized — set include_history=true to get the real realized number. - method ('fifo' | 'average', default 'fifo'): cost basis method used when include_history=true. FIFO consumes oldest lot first per sell; Average Cost pools all priced acquisitions and sells out at the running average. If the user mentions 'average cost' / 'avg cost' / 'weighted', use 'average'. Both methods preserve the 'honest unknown' rule: any sell drawing from an unpriced deposit/transfer returns realizedPnl=null, NOT a fabricated number. Has NO effect when include_history=false. - currency ('USD' | 'EUR' | 'GBP' | 'HUF', default 'USD'): when set to anything other than USD, ALL numeric fields (currentValue, costBasis, realizedPnl, unrealizedPnl, windowDelta numbers, realizedFromHistory.knownRealized) are converted via live FX rates. The fx.source + fetchedAt are surfaced in meta.fx. Use this for currency-consistent rendering when the user asked their dashboard to be in HUF/EUR/GBP — otherwise per-tab currencies will mismatch. Returns position data only. Not financial advice.

get_polymarket_positionsA

Returns Polymarket prediction-market positions, grouped by event when possible. Use this when the user asks about their Polymarket bets specifically: 'show my Polymarket positions', 'how am I doing on Polymarket', 'what bets do I have', 'show my prediction market positions', 'election bets', 'sports bets', etc. For general portfolio queries that mention Polymarket alongside crypto/stocks, prefer get_holdings (with optional asset_class='prediction' filter). Each position includes: - market title (human-readable question, e.g. 'Will X win the 2024 election?') - outcome ('Yes' / 'No' / specific candidate name) - quantity (conditional tokens held, each worth 0-1 USDC) - currentPrice (0-1, market's current implied probability) - currentValue (USD), avgCost (USD per token), cashPnl (realized + unrealized) - redeemable (true if market resolved and you can claim payout) - mergeable (true if you can merge Yes+No tokens for guaranteed USDC) - endDate (when the market resolves) Inputs (optional): - account_id: scope to one Polymarket account (if you have multiple). - group_by_event: 'true' (default) groups Yes+No outcomes for the same market; 'false' returns one row per asset. - resolved_only: 'true' returns only redeemable positions (markets that have resolved). Default 'false' returns everything. Returns position data only. Not financial advice.

get_transactionsA

Returns transaction history (trades, deposits, withdrawals, fees, ERC-20 token transfers) across configured accounts. Use this when the user asks: 'what trades did I make', 'show my transactions', 'transaction history', 'recent buys', 'recent sells', 'show my deposits', 'when did I buy X', 'what did I do this week', etc. Each transaction includes: - type: trade / buy / sell / deposit / withdraw / fee / interest / reward / transfer / resolve - symbol, quantity, price (per-unit at time of transaction) - fee + feeCurrency - timestamp (ISO 8601) - metadata (connector-specific: chain, hash, market, etc.) Inputs (optional): - account_id: scope to one account. - since: shorthand ('24h', '7d', '30d', '90d') OR epoch ms (e.g. 1700000000000). Default: ~last 50 transactions per account regardless of date. Coverage caveats (V0): - Bybit: full transaction log - MetaMask: native chain transfers + ERC-20 token transfers (USDC, USDT, etc.) - Polymarket: BUY/SELL trades from the /trades endpoint (up to ~1000 most recent). Returns transaction data only. Not financial advice.

get_allocationsA

Returns portfolio allocation breakdown — current USD value grouped by a chosen dimension. Use this when the user asks: 'how is my portfolio split', 'allocation breakdown', 'what % is in crypto', 'chain breakdown', 'show my biggest position', 'concentration'. Groups available: - 'asset_class' (default): crypto / stock / prediction / cash - 'connector': bybit / metamask / polymarket - 'account': one row per configured account - 'chain': EVM chain (Ethereum / Polygon / etc.) — only meaningful for MetaMask holdings - 'symbol': BTC / ETH / individual market — best for top-N concentration analysis Each group row includes: label, currentValue (USD), percentOfTotal, holdingCount. Sorted descending by currentValue. Inputs: - by: which dimension to group by (see above). Default 'asset_class'. - top: limit to top N rows (e.g. top: 10 for biggest positions). Default no limit. Returns position data only. Not financial advice.

list_accountsA

Lists configured PORTFOLIO TRACKER accounts (Bybit exchange / Binance exchange / MetaMask wallets / Polymarket / Solana wallets) without exposing credentials. Use when the user asks: 'what tracker accounts are configured', 'show my portfolio accounts', 'list my exchange connections', 'which crypto exchanges are linked'. Returns: id, connectorId (bybit | binance | metamask | polymarket | solana), label, createdAt, and connector-specific public metadata (e.g. chainIds and addresses for MetaMask, accountType for Bybit, address for Solana, key fingerprint for Binance). Credentials are NEVER returned — they stay in the OS keychain. DO NOT call this tool when the user means: email accounts, social media accounts, GitHub accounts, cloud accounts, OS user accounts, or any 'accounts' from a different domain or MCP server. It's specifically the headless-tracker exchange/wallet connections.

setup_connectorA

Creates a new account by writing READ-ONLY credentials to the OS keychain. Use when the user asks: 'add a Bybit account', 'connect Binance', 'connect my MetaMask wallet', 'set up Polymarket', 'connect my Solana wallet', 'add new exchange'. BEHAVIOR CONTRACT FOR YOU (the LLM): - After this tool succeeds, confirm ONLY the account label and account_id back to the user. - NEVER echo, log, paraphrase, or repeat the credential values (apiKey, apiSecret, etherscanApiKey) in your response. - If the user pastes credentials inline in chat, suggest they use the Settings UI (render_settings tool) form instead — the form keeps secrets out of the conversation transcript. Credentials are validated against the upstream API before they're persisted; if validation fails, nothing is written. Storage: OS keychain (macOS Keychain / Linux Secret Service / Windows Credential Vault) via @napi-rs/keyring. Same path as the CLI setup flow. All five connectors use READ-ONLY credentials by design (Bybit 'Read' only, Binance 'Enable Reading' only, Etherscan is a public-data rate-limit token, Polymarket proxy wallet is already public, Solana addresses are public on-chain identifiers). Inputs (one of bybit / binance / metamask / polymarket / solana required): - connector: 'bybit' | 'binance' | 'metamask' | 'polymarket' | 'solana' - bybit: { apiKey, apiSecret, accountType: 'UNIFIED'|'CONTRACT'|'SPOT'|'FUND' (primary, also the account ID), accountTypes?: array of additional types to fan out across (e.g. ['FUND'] alongside UNIFIED so funding-wallet balances are tracked too) } - binance: { apiKey, apiSecret, includeFutures (optional bool, default false), recvWindow (optional ms) } - metamask: { address, etherscanApiKey, chainIds (number[]), trackCommonTokens (bool), hasEtherscanPro (bool) } - polymarket: { proxyWallet (0x...), sizeThreshold (default 0.01) } - solana: { address (base58), rpcUrl (optional premium RPC), dustThresholdUsd (optional, default 0.5) }

add_wallet_addressA

Adds an additional wallet address to an existing MetaMask or Solana account. Use when the user asks: 'add another wallet', 'track a second address', 'add MetaMask address', 'add Solana address'. The new address shares the parent account's settings (Etherscan key + chains for MetaMask; RPC URL for Solana). Wallet addresses are public on-chain identifiers — NO new secrets are stored. Just updates the keychain entry's addresses[] field. Inputs: - account_id: id of the existing account (e.g. 'metamask:0xabc...' or 'solana:Abc...') - address: EVM 0x-hex address (40 hex chars) for MetaMask accounts, or base58 (32-44 chars) for Solana accounts

remove_accountA

Deletes an account from the AccountStore AND its credentials from the OS keychain. ONE-WAY operation. The Settings UI requires explicit user confirmation before calling this. Use when the user asks: 'remove the Bybit account', 'disconnect Polymarket', 'forget that wallet'. Inputs: - account_id: id of the account to remove (e.g. 'bybit:UNIFIED', 'metamask:0xabc...'). Returns: ok, removedAccountId; or error if the account was not found.

add_custom_tokenA

Adds a project-specific ERC-20 token to a MetaMask account's tracked-tokens list. The bundled common tokens (USDC, USDT, WETH, WBTC, LINK, DAI) are tracked by default; this is for additional tokens like project / governance tokens. Use when the user asks: 'track ARB token', 'add UNI to my wallet', 'monitor a custom ERC-20'. Token data is PUBLIC on-chain (contract + symbol + decimals) — NO secrets, NO keychain involved. Inputs: - account_id: target MetaMask account (e.g. 'metamask:0xabc...') - chain_id: numeric (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, 42161=Arbitrum, 10=Optimism) - contract: 0x-prefixed contract address (40 hex) - symbol: 1-20 chars - decimals: 0-36 integer

remove_custom_tokenA

Removes a custom ERC-20 token from a MetaMask account's tracked-tokens list. Public on-chain data, no keychain involvement. Use when the user asks: 'stop tracking ARB', 'remove that token from MetaMask', 'untrack a project token'. Inputs: - account_id: target MetaMask account (e.g. 'metamask:0xabc...') - chain_id: numeric (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, 42161=Arbitrum, 10=Optimism) - contract: 0x-prefixed contract address (40 hex) Returns ok or a not_found error if the token wasn't tracked under that account+chain.

list_custom_tokensA

Lists custom ERC-20 tokens tracked by MetaMask accounts. Public data; no secrets involved. Use when the user asks: 'which custom tokens am I tracking', 'show my project tokens'. Inputs (optional): account_id to filter to one account.

render_dashboardA

Render an interactive PORTFOLIO TRACKER dashboard as an MCP App (live UI panel) — for crypto holdings, P&L, prediction markets, on-chain wallets. Use this when the user asks: 'show my portfolio dashboard', 'open my dashboard', 'render the portfolio panel', or wants a live interactive view of holdings / weekly portfolio review / risk audit. Three tabs (Portfolio / Weekly / Risk) with currency switcher (USD/EUR/GBP/HUF) and refresh button. The iframe makes its own tool calls (get_holdings / get_pnl / get_allocations / get_transactions / get_polymarket_positions / refresh_data) as the user clicks tabs and refresh — no extra prompting from you needed once it's open. If the host doesn't render MCP Apps, the tool still returns a textual confirmation but the user won't get the live UI. DO NOT call this tool when the user means a different kind of dashboard (Vercel deploys, Sentry errors, Grafana metrics, GitHub activity, analytics events, etc.). It's specifically the headless-tracker portfolio dashboard. If the request is ambiguous, ask the user to clarify which dashboard they mean. Inputs (both optional): - currency: 'USD' | 'EUR' | 'GBP' | 'HUF'. Initial display currency. User can switch live. - tab: 'portfolio' | 'weekly' | 'risk'. Initial active tab. User can switch live.

render_settingsA

Render the PORTFOLIO TRACKER Settings panel as an MCP App (live UI panel) — the GUI alternative to the CLI setup flow for headless-tracker (Bybit / MetaMask / Polymarket connections). Use when the user asks: 'open my portfolio settings', 'add a Bybit account', 'connect my MetaMask wallet to the tracker', 'show my tracker accounts', 'remove this exchange connection', 'add a custom ERC-20 token', 'add another wallet address to track'. Four tabs: - Accounts: read-only list of configured tracker accounts with Remove buttons (one-way confirm dialog). - Add Account: forms for Bybit / MetaMask / Polymarket with explicit security disclosure. - Wallets: add an additional wallet address to an existing MetaMask tracker account. - Custom Tokens: list + add/remove ERC-20 tokens per chain. DO NOT call this tool when the user means: app settings (Claude Desktop / VS Code / browser), system preferences, OS settings, account settings on websites, profile settings, notification settings, theme/appearance, or any settings UI from a different MCP server. It's specifically the headless-tracker portfolio-tracker setup panel. If the request is ambiguous (just 'open settings'), ask which settings. BEHAVIOR CONTRACT FOR YOU (the LLM): If the user pastes credentials directly in chat, prefer pointing them at this Settings UI rather than calling setup_connector with the inline values — the form keeps secrets out of the conversation transcript. After the user uses the form, the tool result is cosmetic confirmation; do NOT echo or paraphrase any credential values that may appear in the conversation. Inputs (optional): - tab: 'accounts' | 'add-account' | 'wallets' | 'tokens' — initial active tab.

Prompts

Interactive templates invoked by user choice

NameDescription
portfolio-dashboardGenerate a complete multi-section portfolio dashboard. Calls get_holdings, get_allocations, get_pnl, and get_polymarket_positions in parallel and synthesizes the result.
weekly-review7-day portfolio review: window delta, biggest movers, recent trades, observations. Calls get_pnl with timeframe=7d, get_holdings, and get_transactions with since=7d.
risk-checkConcentration and risk audit: largest positions, venue exposure, stablecoin reserves, asset-class mix. Flags portfolio-level risks like single-position dominance or no stablecoin buffer.

Resources

Contextual data attached and managed by the client

NameDescription
ui://headless-tracker/dashboard
ui://headless-tracker/settings

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tamasPetki/HeadlessTracker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server