# FinanceSec — AI Agent & MCP Contract > Deterministic SEC EDGAR 10-K/10-Q Fact Engine & Quantitative Risk API > No LLM in the fact path. Answers are lattice recall with cryptographic SHA-256 provenance or SAFE_REFUSAL. Machine-readable contracts: - Primary MCP Endpoint: https://finsec.caleralabs.com/mcp - Full Tech Spec: https://finsec.caleralabs.com/llms-full.txt - Compact Agent Spec: https://finsec.caleralabs.com/llms.txt - MCP Discovery: https://finsec.caleralabs.com/.well-known/mcp.json - OpenAPI 3.0: https://finsec.caleralabs.com/openapi.json - Interactive Guide: https://finsec.caleralabs.com/mcp-docs - Console & API Keys: https://dashboard.caleralabs.com/dashboard?domain=finsec - Smithery Registry: https://smithery.ai/servers/calera-labs/finsec - Glama MCP Hub: https://glama.ai/mcp/servers/Calera-Labs/finsec-mcp Do not invent numbers. Numeric claims must come strictly from this tool. If the server returns SAFE_REFUSAL (or status REFUSE in compact mode), report that honestly. It is not a tool failure. ## ⚡ 1-Click & Fast-Track Install Instructions ### 1-Click Terminal Quick-Install Run the automated zero-config command for your AI client: ```bash # Google Antigravity (Standard Default / Recommended) agy mcp add finsec https://finsec.caleralabs.com/mcp # Claude Code CLI claude mcp add --transport http finsec https://finsec.caleralabs.com/mcp # Claude Desktop / Cursor / VS Code (Streamable HTTP Bridge) npx -y mcp-remote https://finsec.caleralabs.com/mcp ``` ### 1-Click Web Registry & Ecosystem Connectors - **Smithery.ai 1-Click Install:** [smithery.ai/servers/calera-labs/finsec](https://smithery.ai/servers/calera-labs/finsec) - **Anthropic Claude Directory:** Slug `finsec` (Streamable HTTP at `https://finsec.caleralabs.com/mcp`) - **Glama.ai MCP Hub:** [glama.ai/mcp/servers/Calera-Labs/finsec-mcp](https://glama.ai/mcp/servers/Calera-Labs/finsec-mcp) - **Open MCP Registry (PulseMCP):** Registered endpoint `https://finsec.caleralabs.com/mcp` ## Identity & Epistemic Guarantees FinanceSec indexes 10,000+ SEC filing issuers (10-K, 10-Q, 8-K) into a deterministic Volumetric Lattice Network with sub-5ms cell recall on CPU. Every recalled cell includes filing accession, US-GAAP XBRL concept, fiscal period, and SHA-256 audit hash. When evidence is absent, the boundary refusal operator (\partial^2 = 0) returns SAFE_REFUSAL with isError=false, ensuring 0.00% statistical confabulation. Base URL: https://financesec.api.caleralabs.com MCP URL: https://finsec.caleralabs.com/mcp Auth: header `X-License-Key: ` or OAuth 2.1 CIMD Bearer Content: application/json ## Hard Rules for AI Agents 1. Authenticate every request with `X-License-Key: clabs_live_YOUR_KEY` or OAuth Bearer. 2. Never fabricate SEC figures, covenants, accession numbers, or XBRL concepts. 3. Treat `SAFE_REFUSAL` / `REFUSE` as success-of-honesty. Inform the user that the filing lattice lacks certified evidence for that specific query. 4. On HTTP 429, stop retry storms immediately. Quota or RPM limit reached. Direct user to upgrade: https://dashboard.caleralabs.com/dashboard?domain=finsec 5. On HTTP 402, the API key is missing or license is inactive. 6. Pass `low_tokens: true` on MCP tool calls and high-QPS loops (~38 tokens vs ~320 tokens). 7. Each authenticated HTTP request counts as one quota unit. ## MCP Tools Reference (https://finsec.caleralabs.com/mcp) The FinanceSec MCP server exposes 14 certified deterministic tools: ### 1. `query_financial_sec` Natural-language verified SEC fact query with cryptographic SHA-256 provenance or SAFE_REFUSAL. - `query` (string, required): Financial question (e.g. "What was Apple's total revenue in FY2023?"). Append "in USD" for foreign reporting currencies. - `target_currency` (string, optional): ISO 4217 currency code (e.g. "USD", "EUR") for audited annual-average FX conversion. - `usd_only` (boolean, optional): Forces monetary answers into USD. - `low_tokens` (boolean, optional): Returns compact schema (~38 tokens). ### 2. `valuation_inputs` Retrieves certified SEC valuation packs across 12 standardized models. - `company` (string, required): Ticker or entity name (e.g. "AAPL", "MSFT", "NVDA"). - `pack` (string, required): One of the 12 certified packs (see Valuation Packs section below). - `period` (string, optional): Reporting period (e.g. "FY2023", "Q3 FY2023"). Defaults to FY2023. - `low_tokens` (boolean, optional): Compact JSON response. ### 3. `query_sec_metric_exact` Single-cell exact EDGAR metric recall for company + metric + period. - `company` (string, required): Ticker or name (e.g. "AAPL"). - `metric` (string, required): SEC XBRL metric (e.g. "net income", "revenue", "free cash flow", "operating income"). - `period` (string, required): Fiscal period (e.g. "FY2023"). - `low_tokens` (boolean, optional): Compact JSON response. ### 4. `compute_sec_cagr` Domain 31 logarithmic CAGR over verified SEC filing endpoints with zero confabulation. - `company` (string, required): Ticker or entity name. - `metric` (string, required): EDGAR metric to compound (e.g. "revenue", "net income"). - `start_period` (string, required): Start fiscal period (e.g. "FY2020"). - `end_period` (string, required): End fiscal period (e.g. "FY2023"). - `low_tokens` (boolean, optional): Compact JSON response. ### 5. `lattice_arith_evaluate` Deterministic zero-error algebraic solver over verified SEC numbers. - `op` (string, required): `cagr` | `ratio` | `multiply` | `divide` | `yoy_series` | `product_chain` - `company` (string, optional): Company ticker. - `metric` (string, optional): Metric name. - `start_period` (string, optional): Start period. - `end_period` (string, optional): End period. - `periods` (string, optional): Comma-separated fiscal periods for yoy_series. - `factors` (string, optional): Comma-separated positive numbers for product_chain. - `low_tokens` (boolean, optional): Compact JSON response. ### 6. `vln_capabilities_overview` Returns complete structured catalog of valuation packs, arithmetic operations, and platform boundaries. - `low_tokens` (boolean, optional): Compact JSON response. ### 7. `query_sec_sector_peers` Sector and industry peer screening derived from SEC filing SIC codes and 10-K segment notes. - `sector_or_industry` (string, required): Industry description (e.g. "semiconductors", "photonics", "optics"). - `metrics` (string, optional): Comma-separated XBRL metrics. - `period` (string, optional): Filing period (e.g. "FY2025"). - `limit` (number, optional): Max peers to return (default: 5). - `low_tokens` (boolean, optional): Compact JSON response. ### 8. `query_fomc_dotplot` Certified Federal Reserve FOMC Summary of Economic Projections (SEP) Dot Plot interest rate projections across projection horizons. - `horizon` (string, optional): Target projection year (e.g. "2024", "2025", "2026", "longer_run"). - `meeting_date` (string, optional): FOMC meeting release date (e.g. "2024-06", "2024-09"). - `low_tokens` (boolean, optional): Compact JSON response. ### 9. `query_macro_indicator` Certified macroeconomic indicators from Federal Reserve (FRED), BLS, and BEA with cryptographic provenance. - `series_id` (string, required): Indicator code (e.g. "DFF", "CPIAUCSL", "PCEPILFE", "GDPC1", "UNRATE", "DCOILWTICO", "DTWEXBGS"). - `period` (string, optional): Target period or frequency. - `low_tokens` (boolean, optional): Compact JSON response. ### 10. `query_treasury_curve` Certified U.S. Treasury benchmark yield curves across 13 constant maturity tenors (1M to 30Y) and key spreads (10Y-2Y, 10Y-3M). - `date` (string, optional): Observation date (YYYY-MM-DD). Defaults to latest certified curve. - `low_tokens` (boolean, optional): Compact JSON response. ### 11. `stress_test_portfolio` Deterministic multi-regime stress testing on asset portfolios against macroeconomic shock vectors (10Y surges, oil shocks, dollar surges, credit spreads). - `portfolio` (array/object, required): Holdings, debt tranches, or ticker weights. - `scenario` (string, required): Shock vector or stress scenario ID. - `low_tokens` (boolean, optional): Compact JSON response. ### 12. `simulate_macro_regime` Simulates deterministic corporate debt and covenant impacts under specific macroeconomic regime basins (stagflation, recession, soft landing, liquidity squeeze). - `company` (string, required): Ticker or entity name (e.g. "ORCL", "BA", "INTC"). - `regime` (string, required): `regime:basin:stagflation` | `regime:basin:recession` | `regime:basin:soft_landing` | `regime:basin:liquidity_squeeze` | `regime:basin:yield_curve_inversion`. - `low_tokens` (boolean, optional): Compact JSON response. ### 13. `verify_financial_claim` Topologically verifies numbers, dates, XBRL financial metrics, and causal statements in generated text in <5ms with Merkle audit seals. - `text` (string, required): Financial narrative or model output to verify. - `company` (string, optional): Associated company ticker context. - `fiscal_period` (string, optional): Associated fiscal period context. - `low_tokens` (boolean, optional): Compact JSON response. ### 14. `firewall_audit_trail` Returns real-time Domain 18 Hallucination Firewall telemetry, sub-5ms latency verification benchmarks, and cryptographic SHA-256 Merkle audit trail records. - `claim_id` (string, optional): Specific verification seal ID to inspect. - `limit` (number, optional): Max audit log entries to return. - `low_tokens` (boolean, optional): Compact JSON response. ## 12 Certified Valuation Packs 1. `equity_screen`: revenue, net_income, diluted_eps, equity, total_assets 2. `ev_bridge`: cash, total_debt -> net_debt_v1 3. `quality_of_earnings`: net_income, cfo, sbc, cogs -> fcf_v1, fcf_conversion_v1, owner_earnings_v1 4. `segment_mix`: total_revenue + Item 1 business segment breakdown 5. `returns_screen`: equity, total_assets, net_income, operating_income -> roe_v1, roa_v1, roic_v1 6. `leverage_screen`: operating_income, interest_expense, total_debt, cash -> interest_coverage_v1, net_debt_to_ebitda_v1 7. `piotroski_f`: 9-point fundamental health score (0-9) 8. `altman_z_prime`: bankruptcy and distress prediction model 9. `beneish_m_score`: financial manipulation detection index 10. `dupont_5step`: 5-step extended DuPont ROE decomposition 11. `working_capital_efficiency`: working capital metrics, DPO, DSO 12. `dcf_valuation_inputs`: historical FCF, FCF margin, reinvestment rate ## Low-Token Compact Schema (`low_tokens: true`) Compact mode reduces LLM prompt bloat by ~88%: Success: ```json { "id": "q112", "st": "OK", "val": 383285000000, "cur": "USD", "concept": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax", "per": "FY2023", "hash": "d9697123" } ``` Refusal (honest absence): ```json { "st": "REFUSE", "reason": "Entity or metric not present in certified SEC lattice" } ``` Status map: - `OK` = VERIFIED_SUCCESS - `REFUSE` = SAFE_REFUSAL (0.00% hallucination) - `ACK` = EVENT_ACK_PENDING_FACTS ## Client Configuration Snippets ### Cursor (`.cursor/mcp.json` or `~/.cursor/mcp.json`) ```json { "mcpServers": { "finsec": { "url": "https://finsec.caleralabs.com/mcp", "headers": { "X-License-Key": "clabs_live_YOUR_KEY" } } } } ``` ### Claude Desktop (`claude_desktop_config.json`) Configuration path: - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` - Windows: `%APPDATA%\Claude\claude_desktop_config.json` - Linux: `~/.config/Claude/claude_desktop_config.json` ```json { "mcpServers": { "finsec": { "url": "https://finsec.caleralabs.com/mcp", "headers": { "X-License-Key": "clabs_live_YOUR_KEY" } } } } ``` ### Windsurf / Cline (`~/.codeium/windsurf/mcp_config.json`) ```json { "mcpServers": { "finsec": { "serverUrl": "https://finsec.caleralabs.com/mcp", "headers": { "X-License-Key": "clabs_live_YOUR_KEY" } } } } ``` ### VS Code (`settings.json` / VS Code MCP Extension) ```json { "servers": { "finsec": { "url": "https://finsec.caleralabs.com/mcp", "headers": { "X-License-Key": "clabs_live_YOUR_KEY" } } } } ``` ### Zed Editor (`~/.config/zed/settings.json`) ```json { "context_servers": { "finsec": { "endpoint": "https://finsec.caleralabs.com/mcp", "headers": { "X-License-Key": "clabs_live_YOUR_KEY" } } } } ``` ### Python MCP Client / Custom Agent SDK ```python import httpx # Direct REST / MCP endpoint call with low-token mode headers = { "X-License-Key": "clabs_live_YOUR_KEY", "Content-Type": "application/json" } payload = { "query": "What was Apple's total revenue in FY2023?", "low_tokens": True } response = httpx.post("https://financesec.api.caleralabs.com/api/query", json=payload, headers=headers) print(response.json()) ``` ## Production Latency & Performance SLAs - Compact MCP Mode (`low_tokens=true` / packs): `< 50 ms` - Conversational NLQ Fact Recall: `< 2.0 s` - Microstructure Pre-Trade Solver (`verify-route`): `< 500 µs` ## Call Accounting & Tiers | Tier | Price | Daily Quota | RPM | Features | |---|---|---|---|---| | Pilot | $0 (14-day) | 50 | 30 | 14 MCP tools, 10-K/10-Q lattice | | Hacker | $99/mo | 500 | 120 | Full valuation packs, compact mode | | Startup | $499/mo | 2,500 | 300 | Watchlist, 8-K real-time ingest | | Starter | $2,000/mo | 10,000 | 1,200 | Dedicated QPS, prioritised lattice | | Institutional | $5,000/mo | 50,000 | 3,000 | Sub-500µs HFT microstructure | | Enterprise | Custom | Unlimited | 15,000+ | VPC peering, custom lattice pre-warm | Universal Dashboard & API Keys: https://dashboard.caleralabs.com/dashboard?domain=finsec ## Minimal cURL Example ```bash curl -sS -X POST https://financesec.api.caleralabs.com/api/query \ -H "Content-Type: application/json" \ -H "X-License-Key: $FINSEC_API_KEY" \ -d '{"query":"What was Apple total revenue in FY2023?","low_tokens":true}' ```