stock-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_HOST | No | MySQL host | 127.0.0.1 |
| DB_NAME | No | MySQL database name | stock_mcp |
| DB_PORT | No | MySQL port | 3306 |
| DB_USER | No | MySQL user | stock |
| USER_AGENT | No | Request user-agent string | Chrome 148 UA |
| DB_PASSWORD | No | MySQL password | stock123 |
| DATABASE_URL | No | MySQL connection string, e.g. mysql://user:pass@host:3306/stock_mcp | |
| BARS_PROVIDER | No | Provider for K-line data: yahoo or investing | yahoo |
| BARS_START_DATE | No | Start date for full sync, format YYYY-MM-DD | 2000-01-01 |
| REQUEST_DELAY_MS | No | Request delay in milliseconds for rate limiting | 300 |
| INVESTING_TRANSPORT | No | Transport mode for investing.com: node, go, or auto | auto |
| GQLPROXY_COOKIE_FILE | No | File path for sidecar cookie session | .cache/gqlproxy_cookies.txt |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_symbolA | Search locally stored instruments by symbol or name. |
| get_quoteA | Get latest quote for a stock: price, 52-week range, key ratios, dividend summary. |
| get_barsA | Get historical OHLCV bars from the database (1d/1wk/1mo). |
| get_profileA | Get company profile: business summary, sector, industry, employees, address, contact info. |
| get_financialsB | Get financial statements (income statement, balance sheet, cash flow) from the database. |
| get_ratiosB | Get valuation and financial ratios (PE, PS, PB, margins, ROE, beta, etc.). |
| get_dividendsB | Get dividend history and dividend summary for a stock. |
| get_analyst_forecastB | Get analyst consensus, buy/hold/sell counts and price targets. |
| get_earningsB | Get earnings history and forecasts (EPS and revenue, actual vs estimate). |
| get_holdersB | Get institutional holders and ownership data. |
| get_newsC | Get recent news for a stock. |
| get_optionsB | Get the latest options chain snapshot for a stock (from Yahoo). |
| get_option_quoteA | Fetch live options quotes for a stock directly from Yahoo (on-demand, no DB sync needed): underlying quote, available expirations/strikes, and per-contract bid/ask/last/volume/open interest/IV. |
| get_company_eventsA | Get forward-looking company events: next earnings date, earnings call, ex-dividend and dividend payment dates. |
| get_insider_transactionsB | Get insider (officer/director) buy/sell transactions. |
| get_analyst_actionsB | Get analyst upgrades, downgrades and price-target changes. |
| get_earnings_trendA | Get quarterly earnings estimate trend: EPS/revenue estimates, growth and recent revisions. |
| get_recommendation_trendB | Get analyst recommendation trend (strong buy/buy/hold/sell/strong sell) by period. |
| get_fund_holdersC | Get mutual fund / fund ownership positions. |
| get_short_interestB | Get short interest snapshot: shares short, short ratio, % of float, days to cover. |
| get_holder_breakdownA | Get ownership structure: insider % and institutional % held, float % and count. |
| get_intraday_barsA | Get intraday OHLCV bars (1m/5m/15m/30m/60m) stored in the database. Run sync_stock with mode=intraday_15m etc. to populate. |
| list_sectorsA | List the GICS sector catalog (11 sectors + S&P 500 benchmark), each mapped to its SPDR sector ETF. |
| get_sector_performanceA | Sector rotation view: latest price and 1d/5d/20d returns for every GICS sector ETF, ranked by 1-day change, plus the SPY benchmark. |
| get_sector_membersA | Get a sector's top constituents with weights (from the sector ETF's topHoldings). |
| sync_sectorsA | Sync all GICS sector ETFs (quote, ~30d bars) and their top-holding constituents into the database. members=false skips constituent refresh. |
| sync_stockA | Sync a stock from providers into the local MySQL database. full = complete history from 2000; incremental = only new data. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 27 tools
Most retrievals map cleanly to distinct data slices (quote, bars, profile, financials), but there are several closely grouped families: get_holders/get_fund_holders/get_holder_breakdown, get_analyst_forecast/get_recommendation_trend/get_analyst_actions/get_earnings_trend, and get_options/get_option_quote. The descriptions help, but an agent could easily select the wrong endpoint within these clusters.
All tools follow a clear snake_case verb_noun pattern: get_* for data retrieval, search_symbol for lookup, sync_* for data population, and list_sectors for catalog access. The only minor variation is the mix of verbs, but each verb maps consistently to an action category, so the set is predictable.
At 27 tools, the server exceeds the comfortable 15-tool range and is just past the 25 threshold. While the stock-data domain is broad, several endpoints (e.g., owner/analyst families) could be consolidated without losing clarity.
The surface covers the core stock lifecycle: symbol search, quotes, daily/intraday bars, financial statements, dividends, analyst data, ownership, news, options, and sector performance. Minor gaps exist such as batch quote support or historical options chains, but agents can complete typical research workflows without dead ends.