MCP server
The Thesma MCP server lets AI assistants — Claude Desktop, Claude.ai, Cursor, ChatGPT — call Thesma tools directly. Connect it once, then ask your assistant real business questions in natural language and it composes the right tool calls and returns structured data.
This is the surface most of Thesma’s agent-use value rides on. If you’re integrating Thesma into an AI workflow, start here.
Two ways to use
Section titled “Two ways to use”1. Hosted — mcp.thesma.dev
Section titled “1. Hosted — mcp.thesma.dev”Connect mcp.thesma.dev as an integration in your AI client. The server is hosted; you don’t run anything locally.
Claude Desktop / Claude.ai / Cursor — add a new MCP integration, point it at https://mcp.thesma.dev. The client walks through an OAuth sign-in with your Thesma account. Your API key is the OAuth access token — there are no separate MCP credentials. Rate limits and scope match your API plan exactly.
ChatGPT — enterprise/team plans that support MCP integrations follow the same OAuth flow.
This is the recommended path for most users.
2. Self-host — pip install thesma-mcp
Section titled “2. Self-host — pip install thesma-mcp”For teams that prefer a local MCP server pointed at their own API key — maybe you’re running it inside a VPC, or you want to pre-filter tool responses, or you need custom logging.
pip install thesma-mcpexport THESMA_API_KEY="gd_live_..."thesma-mcp serve # stdio (for Claude Desktop local config)thesma-mcp serve --http --port 8080 # HTTP transportPoint your AI client at the local process. Same tool surface, same behavior, your hardware.
Tool surface (40+ tools)
Section titled “Tool surface (40+ tools)”Every public HTTP endpoint has a corresponding MCP tool. Tool descriptions are tuned for agent consumption — natural-language summaries, not raw JSON field dumps — so the model picks the right tool without needing to read the OpenAPI spec.
get_company— company identity, industry, exchange, enriched with labor + lending contextsearch_companies— by ticker, name, SIC, exchange, state, countyget_financials— income statement, balance sheet, cash flow for a periodget_financial_metric— single-metric time seriesget_ratios— profitability, returns, leverage, growth YoYget_ratio_history— single-ratio time seriesget_events— 8-K events, filterable by categoryget_insider_trades— Form 4 transactionsget_institutional_holders— 13F holders of a companyget_holding_changes— period-over-period position changesget_executive_compensation— pay breakdown + CEO-to-median ratioget_board_members— DEF 14A board compositionsearch_filings— filing-level searchscreen_companies— multi-factor screener across all three datasetsget_fund_holdings— 13F filer’s holdingssearch_funds— 13F filer directory
US Census
Section titled “US Census”search_census_places— look up geographies by name or FIPSget_census_place— geography detailget_census_place_metrics— all 26 metrics for one placeget_census_place_metric_series— single-metric time seriesget_census_place_breakdown— sub-population breakdownsexplore_census_metrics— catalogue browserexplore_census_geographies— level cataloguecompare_census_metric— multi-place comparisonget_census_metric_detail— metric definition and vintage coverage
US BLS
Section titled “US BLS”get_industry_employment— CES monthly series by NAICSget_industry_turnover— JOLTS by NAICSget_industry_detail— industry catalogue entrysearch_industries— NAICS browserget_county_employment— QCEW by countyget_county_wages— QCEW wage totals by countyget_county_unemployment— LAUS by countyget_state_unemployment— LAUS by stateget_state_turnover— JOLTS by stateget_regional_turnover— JOLTS by regionget_occupation_wages— OEWS wage distributionsearch_occupations— SOC browserexplore_bls_metrics— catalogue browsercompare_county_unemployment/compare_state_unemployment— multi-place comparison
US SBA
Section titled “US SBA”get_county_lending— SBA 7(a) aggregates for one countyget_state_lending— state aggregatesget_industry_lending— NAICS aggregatesget_lender/get_lenders— lender detail and directoryget_lending_characteristics— loan-size, term, guarantee-pct distributionsget_lending_outcomes— charge-off aggregates
Agent framing
Section titled “Agent framing”The tools are designed for questions, not API calls. Try these with your assistant:
“What’s Apple’s 5-year revenue trend, and how does it compare to the semiconductor industry’s employment growth over the same period?”
The assistant picks get_financial_metric for AAPL revenue and get_industry_employment for NAICS 3344 (semiconductors), aligns the time axes, and summarises.
“Which S&P 500 companies headquartered in Texas had the highest ROE last fiscal year?”
Assistant picks screen_companies with state_fips=48 + an ROE filter, then ranks.
“How concentrated is small-business lending in Los Angeles County, and what’s the charge-off rate trend?”
Assistant picks get_county_lending for FIPS 06037 with a time range, optionally get_lending_characteristics for the concentration story.
“Pull the latest insider trades for NVDA and flag any unusually large sales.”
Assistant picks get_insider_trades for NVDA, filters by value, summarises.
Rate limiting
Section titled “Rate limiting”MCP requests consume your API plan’s daily rate limit exactly like HTTP requests. Every tool call == one API call under the hood. The assistant sees 429s as structured errors and can back off.
Watch the portal’s Usage page for MCP usage — it’s indistinguishable from direct API usage in the rollup.
- Hosted endpoint: mcp.thesma.dev
- PyPI (self-host): pypi.org/project/thesma-mcp
- Source: github.com/thesma-dev/thesma-mcp
- MCP spec: modelcontextprotocol.io
See also
Section titled “See also”- Python SDK — same data surface, programmatic
- CLI — same data surface, shell-scriptable
- Authentication — your API key IS the MCP access token