Thesma MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| THESMA_API_KEY | Yes | API key from portal.thesma.dev | |
| THESMA_API_URL | No | Override API base URL (default: https://api.thesma.dev) | https://api.thesma.dev |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_county_employmentA | Get quarterly employment data for a US county from the BLS QCEW program. FIPS is a 5-digit county code (e.g. '12086' for Miami-Dade County, FL). Industry defaults to '10' (all industries). Ownership defaults to 'private'. Omit year/quarter for all available data. |
| get_county_wagesA | Get a wage snapshot for a US county including location quotients. FIPS is a 5-digit county code (e.g. '06037' for Los Angeles County, CA). A location quotient above 1.0 means the county has a higher concentration of that industry than the national average. Industry defaults to '10' (all industries). |
| search_industriesA | Search BLS industries by name or list by NAICS level. Use this to find NAICS industry codes before querying employment data. Params: query is a text search (e.g. 'software'), level is NAICS hierarchy depth (1=sector, 2=subsector, up to 6=national industry). Returns up to 25 results. |
| get_industry_detailA | Get detailed information for a single BLS industry including child industries and data availability. Use this after search_industries to drill into a specific industry. Params: naics is the NAICS code (e.g. '5112' for Software Publishers). |
| get_industry_employmentA | Get employment data for a BLS industry. Shows the latest observation with year-over-year changes by default. Provide from_date and to_date (YYYY-MM format) for a time series. Params: naics is the NAICS code, adjustment is 'sa' (seasonally adjusted, default) or 'nsa', geo/state/metro narrow geography. |
| get_county_unemploymentA | Get monthly LAUS unemployment data for a single US county (never seasonally adjusted — county LAUS has no SA/NSA option). Without dates, returns the latest available observation. Provide both from_date and to_date (YYYY-MM) for a time series. Set annual_only=True to return only annual averages (M13 rows). Params: fips is a 5-digit county FIPS code (e.g. '06085' for Santa Clara County, CA). For comparing multiple counties in a single period, use compare_county_unemployment instead. Source: US Bureau of Labor Statistics, Local Area Unemployment Statistics (public domain). |
| compare_county_unemploymentA | Compare LAUS unemployment metrics across up to 10 US counties for a single period (never seasonally adjusted). Params: fips is a comma-separated list of 5-digit county FIPS codes (e.g. '06085,48201,17031' for Santa Clara CA, Harris TX, Cook IL). Maximum 10 counties per call. year and month are both optional, but if one is provided the other must be too (omit both to get the latest period the API can resolve). Use month=13 for the annual-average row. Source: US Bureau of Labor Statistics, Local Area Unemployment Statistics (public domain). |
| get_state_unemploymentA | Get monthly LAUS unemployment data for a single US state. Defaults to seasonally adjusted (adjustment='sa'); pass adjustment='nsa' for the not-seasonally-adjusted series. Without dates, returns the latest available observation. Provide both from_date and to_date (YYYY-MM) for a time series. Set annual_only=True to return only annual averages (M13 rows). Params: fips is a 2-digit state FIPS code (e.g. '06' for California, '48' for Texas). State observations include labor force participation rate and employment-population ratio. For comparing multiple states in a single period, use compare_state_unemployment instead. Source: US Bureau of Labor Statistics, Local Area Unemployment Statistics (public domain). |
| compare_state_unemploymentA | Compare LAUS unemployment metrics across up to 10 US states for a single period. Defaults to seasonally adjusted (adjustment='sa'); pass adjustment='nsa' for the NSA series. Params: fips is a comma-separated list of 2-digit state FIPS codes (e.g. '06,48,36' for CA, TX, NY). Maximum 10 states per call. year and month are both optional, but if one is provided the other must be too (omit both to get the latest period the API can resolve). Use month=13 for the annual-average row. Source: US Bureau of Labor Statistics, Local Area Unemployment Statistics (public domain). |
| explore_bls_metricsA | Discover available BLS metrics and what data the API offers. Use this to understand what labor market data is available before making specific queries. Filter by category ('employment', 'wages', 'derived'), source ('ces', 'qcew', 'oews'), or search by name. |
| search_occupationsA | Search BLS occupations by name. Use this to find SOC occupation codes before querying wage data. Params: query is a text search (e.g. 'software developer'), group is 'major' (broad categories like 15-0000 Computer and Mathematical) or 'detailed' (specific jobs like 15-1252). |
| get_occupation_wagesA | Get wage data for a BLS occupation including percentile distribution. SOC code format is XX-XXXX (e.g. '15-1252' for Software Developers). Optionally filter by NAICS industry, geography, or year. Returns median wage plus 10th/25th/75th/90th percentiles. |
| get_industry_turnoverA | Get labor market turnover data (job openings, hires, quits, layoffs) for an industry by NAICS code. Shows the latest observation by default. Provide from_date and to_date (YYYY-MM) for a time series. Use search_industries first to find NAICS codes. |
| get_state_turnoverA | Get state-level labor market turnover data. Total nonfarm only — no industry breakdown at state level. Data available from October 2021 onward. Params: fips is the 2-digit state FIPS code (e.g. '06' for California). |
| get_regional_turnoverA | Get regional labor market turnover data for one of the 4 Census regions. Params: region is 'northeast', 'south', 'midwest', or 'west'. |
| explore_census_geographiesA | List available US Census geography levels (state, county, place, metro, etc.) and the number of places at each level. Use this first to discover what levels exist before calling search_census_places. Source: public-domain US Census Bureau data. |
| search_census_placesA | List US Census places at a given geography level, optionally filtered by name (case-insensitive). IMPORTANT: the SDK returns a single page of places per call and does not expose pagination controls, so the name filter only sees that page. For large levels like 'tract' (73k+ places), if you already know the FIPS code use get_census_place directly instead. Params: level is the geography level from explore_census_geographies (e.g. 'state', 'county', 'place'); query is an optional substring filter on place name. Returns up to 50 results. Source: public-domain US Census Bureau data. |
| get_census_placeA | Get detailed geographic information for a single US Census place. Returns name, parent place, population, area, coordinates, and available child levels. Params: level is the geography level, fips is the place's FIPS code. FIPS length varies by level: state=2 digits, county=5 digits, place=7 digits, tract=11 digits. Source: public-domain US Census Bureau data. |
| explore_census_metricsA | Discover available US Census Bureau metrics. Use this to find the canonical_name of a metric before calling the place or breakdown tools. Params: query filters by substring match on display_name or canonical_name; category filters by metric category (e.g. 'demographics', 'economy', 'housing'). Filters are case-insensitive. Returns up to 50 results. Source: public-domain US Census Bureau data. |
| get_census_metric_detailA | Get metadata for a single US Census metric, including the underlying source variables and margin-of-error formula type. Use this after explore_census_metrics to understand exactly what a metric measures. Params: metric is the canonical_name (e.g. 'median_household_income'). Source: public-domain US Census Bureau data. |
| compare_census_metricA | Compare a single US Census metric across 2 to 25 places at the same geography level. Params: metric is the canonical_name; fips is a list of 2-25 FIPS codes; dataset is optional ('acs1' or 'acs5'); year is optional. Passing FIPS at mixed geography levels will likely produce an API error. Returns each place's value with margin of error. Source: public-domain US Census Bureau data. |
| get_census_place_metricsA | Get the full set of US Census metrics for one place, grouped by category. Returns the latest available year by default (server-chosen). Use this as a 'Census profile' for a single place. Params: fips is the place's FIPS code (length varies by level: state=2, county=5, place=7, tract=11). Source: public-domain US Census Bureau data. |
| get_census_place_metric_seriesA | Get a time series for one US Census metric in one place. Omit year for the full series; provide year for a single observation. Params: fips is the place's FIPS code; metric is the canonical_name; dataset is optional ('acs1' or 'acs5'). Source: public-domain US Census Bureau data. |
| get_census_place_breakdownA | Break a US Census metric down across the child geographies of a parent place. For example, pass a state FIPS to get the metric for every county inside that state. Params: fips is the parent place's FIPS; metric is the canonical_name; dataset is optional ('acs1' or 'acs5'); year is optional. Source: public-domain US Census Bureau data. |
| search_companiesA | Find US public companies by name substring or ticker prefix (case-insensitive). Use this to look up a company before querying its financials, ratios, or filings. Optional filters: taxonomy='us-gaap' or 'ifrs-full' to narrow to US-GAAP 10-K vs IFRS 20-F filers; currency='' (e.g. 'USD', 'EUR') to narrow by presentation currency. Filter by Russell-index membership: in_index=True returns only companies in any tracked index (sp500, russell1000, or russell2000); in_index=False returns only unindexed companies. Note: combining in_index=False with a query that matches an indexed ticker (e.g. 'AAPL') returns no results because the ticker is filtered out. |
| get_companyA | Get company profile plus any combination of sub-resources in one call: financials, ratios, insider trades, institutional holders, 8-K corporate events, executive compensation, board, labor market context, or SBA lending context. Pass include='financials,ratios,events' (comma-separated) to compose exactly what you need. Default includes labor_context + lending_context for the company profile view. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_executive_compensationA | Get executive compensation (salary, bonus, stock awards, total) from proxy statements. Includes CEO-to-median pay ratio when available. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_board_membersA | Get board of directors (name, age, tenure, independence, committee memberships) from proxy statements. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_eventsA | Get 8-K corporate events (earnings, M&A, leadership changes, material agreements). Use ticker to scope to one company, or omit to search across all companies. Filter by category and date range. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). Omit to search all companies. |
| search_filingsA | Search SEC filings by company, type (10-K, 10-Q, 8-K, 4, DEF 14A, 13F-HR), and date range. Returns filing metadata with accession numbers. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). Omit to search all companies. |
| get_financialsA | Get financial statements (income statement, balance sheet, cash flow, or all three) for a US public company from SEC filings. Pass statement='all' to get all three in one call or years=N (1-10) to get the last N annual periods for trend analysis. Responses carry taxonomy ('us-gaap' or 'ifrs-full'), native-reported currency, and presentation-format metadata. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_financial_metricA | Get a single financial metric over time. Returns a time series for trend analysis. Series points carry per-point currency and taxonomy metadata, authoritative over the envelope currency when a filer changes presentation currency mid-series. Income metrics: revenue, cost_of_revenue, gross_profit, operating_expenses, research_and_development, selling_general_admin, operating_income, interest_expense, interest_income, pre_tax_income, income_tax_expense, net_income, eps_basic, eps_diluted, shares_basic, shares_diluted. Balance sheet: total_assets, current_assets, cash_and_equivalents, accounts_receivable, inventory, non_current_assets, property_plant_equipment, goodwill, intangible_assets, total_liabilities, current_liabilities, accounts_payable, short_term_debt, non_current_liabilities, long_term_debt, total_equity, common_shares_outstanding. Cash flow: operating_cash_flow, investing_cash_flow, financing_cash_flow, net_change_in_cash, capital_expenditures, dividends_paid, share_repurchases. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| search_fundsA | Find institutional investment managers (hedge funds, mutual funds) by name. Use this to look up a fund's CIK before querying its holdings. |
| get_institutional_holdersA | Get which institutional funds hold a company's stock. Shows shares held, market value, and discretion type. Response rows carry the 13F report_quarter and filed_at timestamp; when quarter is omitted the API returns the latest available quarter. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_fund_holdingsB | Get a fund's portfolio holdings. Shows what stocks a fund owns, with share counts and market values. Accepts fund name or CIK. Response rows carry the 13F report_quarter and filed_at timestamp. |
| get_holding_changesA | Get quarter-over-quarter changes in institutional holdings. Use 'ticker' to see which funds are buying/selling a company, or 'fund_name' to see what a fund is buying/selling. Provide exactly one. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_insider_tradesA | Get insider trading transactions (Form 4) — purchases, sales, grants, and option exercises. Use ticker to scope to one company, or omit to search across all companies. Filter by transaction type, minimum value, and date range. By default, rows are aggregated transaction events (same-day 10b5-1 tranches collapsed on person/date/type/security/ownership). Pass flat=True for the per-slice Form 4 rows. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). Omit to search all companies. |
| get_ratiosA | Get computed financial ratios (margins, returns, leverage, growth) for a US public company. Derived from SEC filings. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_ratio_historyB | Get a single financial ratio over time. Returns a time series for trend analysis. Valid ratios: gross_margin, operating_margin, net_margin, return_on_equity, return_on_assets, debt_to_equity, current_ratio, interest_coverage, revenue_growth_yoy, net_income_growth_yoy, eps_growth_yoy. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). |
| get_county_lendingA | Get quarterly SBA 7(a) loan aggregates for a single US county — loan count, total amount, charge-off rate, average loan size, and jobs supported. Without period filters, returns the latest available quarterly observation. Provide both from_period and to_period (YYYY-Qq, e.g. '2024-Q1') for a time series. Params: fips is a 5-digit county FIPS code (e.g. '06037' for Los Angeles County, CA). Optional industry filter accepts a NAICS code to restrict aggregates to one industry. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_state_lendingA | Get quarterly SBA 7(a) loan aggregates for a single US state — loan count, total amount, charge-off rate, average loan size, and jobs supported. Without period filters, returns the latest available quarterly observation. Provide both from_period and to_period (YYYY-Qq, e.g. '2024-Q1') for a time series. Params: fips is a 2-digit state FIPS code (e.g. '06' for California, '48' for Texas). Optional industry filter accepts a NAICS code to restrict aggregates to one industry. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_industry_lendingA | Get quarterly SBA 7(a) loan aggregates for a NAICS industry. Default scope is national; pass geo='state' with state=<2-digit FIPS> or geo='county' with county=<5-digit FIPS> to scope the aggregate. Without period filters, returns the latest available quarterly observation. Provide both from_period and to_period (YYYY-Qq, e.g. '2024-Q1') for a time series. Params: naics is a NAICS code (2–6 digits, e.g. '541211' for Offices of Accountants). Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_lendersA | List SBA 7(a) lenders ranked by loan count, total amount, or average loan size. Optional filters: state (2-digit FIPS), county (5-digit FIPS), industry (NAICS), year/quarter, and a from_period/to_period range (YYYY-Qq). sort accepts 'loan_count' (default), 'total_amount', or 'avg_amount'. limit is capped at 50. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_lenderA | Get details and quarterly history for a single SBA 7(a) lender by lender_id. Optional from_period/to_period filters the quarterly history range (YYYY-Qq). Both are required together for a range; omit both for full history. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_lending_characteristicsA | Get SBA 7(a) loan distributions for a single quarter — loan size buckets, term length buckets, interest rate histogram, sub-programme mix, business-type mix, and revolving-vs-term split. year and quarter are required by the API (pass them together). Optional state (2-digit FIPS), county (5-digit FIPS), or industry (NAICS) filters scope the distributions. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_lending_outcomesA | Get SBA 7(a) vintage cohort charge-off outcomes — loans originated in a given year and their charge-off rates, maturity status, and gross charge-off amounts. vintage_from is required by the API; vintage_to defaults to vintage_from (single vintage) and the API enforces vintage_to - vintage_from <= 10. Optional state (2-digit FIPS), county (5-digit FIPS), or industry (NAICS) filters. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| explore_sba_metricsA | Browse the SBA 7(a) metric catalog — discover available metrics by category or keyword. category accepts 'volume', 'outcomes', or 'characteristics'. query is a free-text search (minimum 2 characters). Returns metric canonical names with display name, category, unit, and update cadence. Use get_sba_metric_detail to fetch the full definition for a single metric. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| get_sba_metric_detailA | Get the full definition for a single SBA 7(a) metric by canonical name. Returns display name, description, category, unit, update cadence, typical lag, data availability year range, and related endpoints. Use explore_sba_metrics to discover canonical names. Source: US Small Business Administration, 7(a) Loan Program (public domain). |
| screen_companiesA | Find US public companies matching financial criteria. Combine filters: profitability (margins), growth rates, leverage ratios, index membership, SIC code, stock exchange (nyse/nasdaq, comma-separated for multiple), domicile (us/adr), and insider/institutional signals. Supports labor market filters: industry hiring trend, employment growth, wage growth, comp-to-market ratio, and HQ-county LAUS local unemployment (min/max local unemployment rate, local unemployment trend, min local labor force). Supports SBA 7(a) lending filters: local loan count (trailing 4Q in HQ county), local lending growth (YoY %), industry lending growth (NAICS national YoY %), and industry charge-off rate (%). Set include='lending_context' or include='labor_context,lending_context' to surface an SBA lending context summary on each row. Note: include='labor_context' and include='lending_context' require a Pro+ plan. Free/Starter callers receive a tier upgrade message instead of enriched results. Sort by any ratio: gross_margin, operating_margin, net_margin, return_on_equity, return_on_assets, debt_to_equity, current_ratio, interest_coverage, revenue_growth_yoy, net_income_growth_yoy, eps_growth_yoy. Margin/ratio/growth filters use integer percent (20 for 20%, not 0.20). Values 0<x<1 are rejected as ambiguous. Pass 0 for no minimum. Use search='' to filter by name substring or ticker prefix (case-insensitive; server trims/escapes/skips nulls; does not normalise 'BRK.B' vs 'BRK-B' and does not consult ticker aliases; omit search rather than passing an empty string, which the server treats as a no-op; any match lacking a qualifying annual CompanyRatio row is silently excluded by the screener inner-join). Filter by taxonomy='us-gaap' or 'ifrs-full' and/or by presentation currency via currency='' (case-insensitive, e.g. 'USD', 'EUR', 'JPY'); both are server-validated — unknown values return 400. Filter by Russell-index membership: in_index=True returns only companies in any tracked index (sp500, russell1000, or russell2000); in_index=False returns only unindexed companies. Note: combining in_index=False with a query that matches an indexed ticker (e.g. 'AAPL') returns no results because the ticker is filtered out. |
| search_filing_sectionsA | Semantic search across SEC filing section content (10-K Risk Factors, 10-Q MD&A, etc.) using natural-language queries. Returns matching text excerpts ranked by cosine similarity. Optionally scope by ticker (one company), filing_type (e.g. '10-K'), section_type (e.g. 'item_1a' for Risk Factors, 'item_7' for MD&A), fiscal year, or minimum similarity threshold. Args: ticker: Stock ticker (e.g. 'AAPL'), 10-digit CIK ('0000320193'), stripped CIK ('320193'), or historical ticker ('FB' resolves to META). Omit to search all companies. |
| list_webhook_event_typesA | List the event types you can subscribe a webhook to (filing.created, corporate_event.created, compensation.filed, board.changed, amendment.filed). Returns the catalog with descriptions and links to payload schemas. |
| list_webhooksA | List your webhook subscriptions — each row shows id, url, events, active/inactive status, and last-delivery timestamp. |
| create_webhookA | Create a webhook subscription. Required: url (HTTPS) and events (e.g. ['filing.created']). Optional: filing_types to narrow events to specific form types ('10-K', '8-K'); description for your own notes. Returns the new subscription details PLUS a one-time HMAC signing secret you MUST save — the api will not show it again. Free-tier callers receive a 402 error; webhooks require Starter+ plan. |
| get_webhookA | Get details for one webhook subscription by id (e.g. 'sub_abc123'). |
| update_webhookA | Update a webhook subscription. Pass only the fields you want to change — unset fields are left untouched. Use is_active=false to disable a hook without deleting it. Note: |
| delete_webhookA | Delete a webhook subscription. Delivery history is retained server-side; the subscription itself stops receiving new events. Irreversible. |
| list_webhook_deliveriesA | Show delivery attempts for a webhook subscription. Useful for debugging — each row shows event type, status, attempt count, and queued/completed timestamps. Pagination is offset-based: pass page=2 for the next batch. limit (per page) is capped at 50 server-side. |
| rotate_webhook_secretA | Generate a new HMAC signing secret for a webhook subscription. The PREVIOUS secret is invalidated immediately — there is no grace period. Update your HMAC verifier before, or atomically with, calling this tool, or incoming deliveries will start failing verification. The new secret is shown ONCE — save it immediately. If this call returns an error after the api has already processed the rotation (e.g. network timeout), the previous secret may already be invalidated server-side — call this tool again to get a fresh secret rather than retrying with the old one. |
| send_webhook_testA | Enqueue a synthetic 'webhook.test' delivery to verify your endpoint is reachable and your HMAC verification works. Rate-limited to 5 calls per 60 seconds. Use list_webhook_deliveries afterward to see the result. If the subscription has is_active=False, the api may reject the request — call update_webhook(is_active=True) to re-enable first. |
| replay_webhook_deliveryA | Re-queue a past webhook delivery for redelivery. Useful if your endpoint was temporarily down. Deliveries older than the 7-day retention window return a 410 error and cannot be replayed. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/thesma-dev/thesma-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server