Skip to content
StockMarketAgent
§ Model Context Protocol · beta endpoint

Connect any LLM agent to our analysis. Natively.

A beta JSON-RPC MCP endpoint now exposes the valuation calculator suite and standalone financial calculators as native tool calls: catalog, single model, suite, sensitivity matrix, formula explanation, scoped ticker defaults, SIP time-to-goal, investment time-to-goal, asset allocation, PPF maturity, education-loan EMI, and step-up SIP calculations. The broader published-report MCP package is still in launch-gate review, so this page separates live beta tools from preview report-reader tools.

This is a beta. Tool names, arguments, and response shapes may change before general availability. See what to expect below.
§ 01

Why MCP, not just an API?

A REST API is a contract for code. MCP is a contract for agents.

The Model Context Protocol is the open standard for letting LLM agents discover tools and pull structured context at runtime. Instead of you writing fetch wrappers and prompting your model to use them, the agent introspects the server, sees a typed catalogue of what it can do, and calls it the same way it would call a native function.

For us specifically, that means an agent can now ask “run a discounted earnings valuation with my EPS, growth, terminal P/E, and Ke assumptions” — and get back a deterministic calculator envelope from the same backend kernel that powers the public valuation tools. The broader report-reader tools are still preview-only until the client launch gates pass.

What this is not

This is not a way to make the agent generate stock advice. The beta tools run user-supplied assumptions through typed valuation formulas and return status, warnings, formula traces, and fair-value ranges. They do not mutate reports, saved workbooks, user accounts, or subscriptions.

The beta calculator loop
  1. Client connects to the StockMarketAgent MCP endpoint
  2. Server advertises tools + resources via the MCP handshake
  3. User asks the agent to value a stock or test assumptions
  4. Agent picks the right tool — typically calculate_valuation_model or calculate_sensitivity_matrix
  5. Server returns structured JSON with methodology version, status, warnings, formula trace, and fair-value ranges
§ 02

Beta tools

Read/calc-only. Calculator tools are live in beta; report-reader tools stay preview until launch gates pass.
  • list_valuation_calculators()Beta

    List every valuation calculator, model id, applicability map, methodology variant, and sensitivity-axis whitelist.

    args: none
  • calculate_valuation_model()Beta

    Run one stateless valuation calculator with user-supplied assumptions. No workbook or report mutation.

    args: model, assumptions, market, capital_structure
  • calculate_valuation_suite()Beta

    Run the full calculator suite for one payload and return the same backend-kernel response envelope.

    args: assumptions, market, capital_structure
  • calculate_sensitivity_matrix()Beta

    Generate a two-axis matrix by recomputing each cell through the calculator kernel. Capped at 7 x 7.

    args: model, row_axis, column_axis, offsets
  • get_stock_calculator_defaults()Beta

    Fetch ticker-calibrated calculator defaults, including variant-scoped fields when requested. Requires the enterprise-only valuation:defaults scope.

    args: ticker, model?, methodology_variant? | suite?
  • explain_valuation_formula()Beta

    Return catalog metadata, formula notes, variants, and model caveats for one calculator.

    args: model
  • list_financial_calculators()Beta

    List the standalone financial planning calculators exposed through the same MCP server.

    args: none
  • calculate_lump_sum_investment()Beta

    Calculate compound-interest future value for a one-time investment with fees, taxes, inflation, schedule, and scenarios.

    args: initial_investment, return, years, frequency?, currency?
  • calculate_lump_sum_sensitivity()Beta

    Generate a recomputed sensitivity grid for lump-sum return, years, or initial investment assumptions.

    args: inputs, row_axis, column_axis, grid_size?
  • calculate_sip_investment()Beta

    Calculate recurring investment future value with explicit contribution frequency, timing, rate convention, fees, tax, inflation, and scenarios.

    args: contribution_amount, frequency?, expected_return, years, timing?, currency?
  • calculate_sip_sensitivity()Beta

    Generate a recomputed sensitivity grid for SIP return, years, or contribution assumptions.

    args: inputs, row_axis, column_axis, grid_size?
  • solve_sip_monthly_contribution()Beta

    Solve the recurring contribution required to reach a target corpus under SIP assumptions.

    args: target_future_value, inputs
  • calculate_goal_based_sip()Beta

    Solve the required recurring contribution for a target corpus under goal-based SIP assumptions.

    args: target_wealth, target_amount_basis?, return, years, frequency?, timing?
  • calculate_goal_based_sip_sensitivity()Beta

    Generate a recomputed sensitivity grid for required goal-based SIP contributions.

    args: inputs, row_axis, column_axis, grid_size?
  • solve_goal_based_sip_tenure()Beta

    Solve the tenure needed for a fixed recurring contribution to reach the target corpus.

    args: contribution_amount, inputs
  • get_goal_based_sip_ticker_defaults()Beta

    Fetch editable ticker-prefill assumptions for goal-based SIP with source audit. Requires financial-calculators:defaults.

    args: ticker
  • backtest_goal_based_sip_ticker()Beta

    Run a historical goal-feasibility backtest using available price history. Requires financial-calculators:backtest.

    args: ticker, start_date, end_date, inputs
  • explain_goal_based_sip_formula()Beta

    Return formula notes and caveats for the goal-based SIP required-contribution calculator.

    args: none
  • calculate_sip_time_to_goal()Beta

    Solve the contribution periods, months, and years a recurring investment may need to reach a target corpus.

    args: target_wealth, contribution_amount, return, frequency?, timing?, currency?
  • calculate_sip_time_sensitivity()Beta

    Generate a recomputed sensitivity grid for SIP time-to-goal return, contribution, or target assumptions.

    args: inputs, row_axis, column_axis, grid_size?
  • get_sip_time_ticker_defaults()Beta

    Fetch editable ticker-prefill assumptions for SIP time-to-goal with source audit. Requires financial-calculators:defaults.

    args: ticker
  • backtest_sip_time_to_goal()Beta

    Run a historical periodic target-hit backtest using available price history. Requires financial-calculators:backtest.

    args: ticker, start_date, end_date, inputs
  • explain_sip_time_formula()Beta

    Return formula notes and caveats for the recurring investment solve-for-time calculator.

    args: none
  • calculate_investment_time_to_goal()Beta

    Solve the years and months a one-time investment may need to reach a target amount under explicit compounding assumptions.

    args: target_wealth, initial_investment, return, convention?, frequency?, currency?
  • calculate_investment_time_sensitivity()Beta

    Generate a recomputed sensitivity grid for time-to-goal return, target, or initial-investment assumptions.

    args: inputs, row_axis, column_axis, grid_size?
  • get_investment_time_ticker_defaults()Beta

    Fetch editable ticker-prefill assumptions for investment time-to-goal with source audit. Requires financial-calculators:defaults.

    args: ticker
  • backtest_investment_time_to_goal()Beta

    Run a historical target-hit backtest for a one-time investment using available price history. Requires financial-calculators:backtest.

    args: ticker, start_date, end_date, inputs
  • explain_investment_time_formula()Beta

    Return formula notes and caveats for the one-time investment solve-for-time calculator.

    args: none
  • get_sip_ticker_defaults()Beta

    Fetch editable ticker-prefill assumptions for SIP with source audit. Requires financial-calculators:defaults.

    args: ticker
  • backtest_sip_ticker()Beta

    Run a historical periodic-investment backtest using available price history. Requires financial-calculators:backtest.

    args: ticker, start_date, end_date, inputs
  • explain_sip_formula()Beta

    Return formula notes and caveats for the SIP recurring-investment calculator.

    args: none
  • get_lump_sum_ticker_defaults()Beta

    Fetch editable ticker-prefill assumptions with source audit. Requires financial-calculators:defaults.

    args: ticker
  • explain_lump_sum_formula()Beta

    Return formula notes and caveats for the lump-sum investment calculator.

    args: none
  • calculate_asset_allocation()Beta

    Compute target monthly investment, savings-rate gap, and equity/debt/cash/gold allocation from salary, age, savings, and risk settings.

    args: current_monthly_salary, current_age, current_monthly_savings_investment, risk_profile?, allocation_rule?
  • get_asset_allocation_defaults()Beta

    Return default asset allocation settings for currency, savings-rate policy, allocation rule, and supported buckets.

    args: currency?, region?
  • get_asset_allocation_model_portfolios()Beta

    Fetch premium/admin model portfolio templates with editable assumptions and source audit. Requires financial-calculators:defaults.

    args: region?, currency?
  • explain_asset_allocation_formula()Beta

    Return savings-rate, age-rule, risk-profile, horizon-cap, and emergency-fund formula notes.

    args: target_savings_rate_policy?, allocation_rule?, risk_profile?, current_age?
  • calculate_education_savings()Beta

    Estimate the future education cost, funding gap, and required monthly contribution for a child education or college savings goal.

    args: child_current_age, education_start_age, present_education_cost, return, inflation?, savings?, aid?
  • calculate_child_education_monthly_investment()Beta

    Convenience wrapper that solves the monthly investment needed for a child's future education goal.

    args: child_current_age, education_start_age, present_education_cost, expected_return_before_start
  • get_education_savings_defaults()Beta

    Return default child education savings settings, including USD currency, visible education inflation, and monthly timing assumptions.

    args: currency?
  • get_education_savings_market_defaults()Beta

    Fetch premium/admin historical return assumptions for an education-savings ticker or index proxy. Requires financial-calculators:defaults.

    args: symbol, symbol_type?, lookback_years?
  • explain_education_savings_formula()Beta

    Return formula notes and caveats for future education cost, aid offset, existing savings, contribution solve, scenarios, and sensitivity.

    args: none
  • calculate_fd_vs_equity_returns()Beta

    Compare fixed deposit/RD and equity/SIP future values with compounding, tax, inflation, scenarios, and break-even assumptions.

    args: investment_mode, investment_amount, tenure_years, fd_rate, equity_return, compounding?, tax?
  • calculate_fd_vs_sip()Beta

    Convenience wrapper for monthly RD vs SIP comparison using the same deterministic calculator engine.

    args: investment_amount, tenure_years, fd_rate, equity_return, compounding?, timing?
  • get_fd_vs_equity_defaults()Beta

    Return default FD/RD vs equity/SIP settings by currency.

    args: currency?
  • get_fd_vs_equity_market_defaults()Beta

    Fetch premium/admin historical equity return assumptions with source audit. Requires financial-calculators:defaults.

    args: symbol, symbol_type?, lookback_years?
  • explain_fd_vs_equity_formula()Beta

    Return formula notes and caveats for FD/RD, equity/SIP, tax, inflation, break-even, scenario, and sensitivity calculations.

    args: none
  • calculate_ppf_maturity()Beta

    Calculate India Public Provident Fund maturity from deposits, tenure, rate, and fifth-day timing. Resources expose schema, current-rate source links, and examples. No workbook mutation.

    args: deposit_amount, frequency?, rate?, tenure?, timing?
  • calculate_gst()Beta

    Calculate GST-exclusive or GST-inclusive taxable value, GST amount, invoice value, and CGST, SGST, UTGST, or IGST split. Resources expose schema, formula notes, and official-source links. No workbook mutation.

    args: amount, gst_rate, calculation_mode?, amount_unit?, currency?, supply_type?, rounding_precision?, rounding_mode?
  • calculate_fixed_deposit_returns()Beta

    Calculate fixed deposit, term deposit, or CD maturity value with compounding, payout mode, and optional tax assumptions. Resources expose schema and formula notes. No workbook mutation.

    args: deposit_amount, rate, tenure_years, compounding_frequency?, tax_rate_on_interest?, withholding_rate?
  • calculate_cagr()Beta

    Calculate compound annual growth rate, absolute return, gain or loss, and value multiple from beginning value, ending value, and period. Resources expose schema and formula notes. No workbook mutation.

    args: beginning_value, ending_value, period_years, period_months?, beginning_value_unit?, ending_value_unit?
  • calculate_compound_interest()Beta

    Calculate compound-interest future value for a lump sum plus optional recurring deposits, with selectable compounding frequency, contribution frequency, fees, inflation, and tax assumptions. Resources expose schema and formula notes. No workbook mutation.

    args: initial_investment_amount, annual_interest_rate, tenure_years, regular_contribution_amount?, contribution_frequency?, contribution_timing?, annual_fee_rate?, inflation_rate?, tax_rate_on_gains?
  • calculate_recurring_deposit_returns()Beta

    Calculate recurring deposit maturity value from monthly deposits with compounding, deposit timing, and optional tax assumptions. Resources expose schema and formula notes. No workbook mutation.

    args: monthly_deposit_amount, rate, tenure_years?, tenure_months?, compounding_frequency?, deposit_timing?
  • calculate_education_loan_emi()Beta

    Calculate education-loan EMI after course duration and moratorium, including moratorium interest treatment. Resources expose schema and formula notes. No workbook mutation.

    args: loan_amount, rate, loan_tenure_years, course_duration_years, moratorium_months?
  • calculate_step_up_sip()Beta

    Calculate a recurring investment that steps up over time, compare it with a regular flat contribution, and optionally solve a target corpus. No workbook mutation.

    args: initial_contribution_amount, amount_unit?, currency?, step_up_rate, expected_return, tenure_years, goal_target_corpus?
  • compare_step_up_sip_vs_regular_sip()Beta

    Return a compact comparison of step-up SIP corpus, regular SIP corpus, extra invested principal, and extra growth.

    args: initial_contribution_amount, annual_step_up_rate, expected_annual_return, tenure_years
  • solve_step_up_sip_goal()Beta

    Solve the required starting contribution or required annual step-up rate for a target corpus.

    args: goal_target_corpus, goal_solve_for, expected_annual_return, tenure_years
  • get_step_up_sip_defaults()Beta

    Return the editable Step-Up SIP default assumption set and supported input ranges.

    args: currency?, locale?, region?
  • get_step_up_sip_market_defaults()Beta

    Fetch premium/admin historical return assumptions for a ticker/index/fund proxy. Requires financial-calculators:defaults.

    args: symbol, symbol_type?, lookback_years?
  • explain_step_up_sip_formula()Beta

    Return formula notes for rate conversion, contribution schedule, comparison, inflation, tax, and goal solve.

    args: none
  • list_reports()Preview

    Return the coverage universe with current rating and fair-value mid for each ticker.

    args: sector?, archetype?, limit?
  • get_report()Preview

    Full latest monthly report for a single ticker. Same shape as the REST /reports/{ticker} endpoint.

    args: ticker
  • get_recommendation()Preview

    Just the headline action, confidence, and one-sentence summary — minimal context cost.

    args: ticker
  • get_scenarios()Preview

    Bull/base/bear scenarios with probabilities, target prices, and returns.

    args: ticker
  • get_sensitivity()Preview

    5×5 sensitivity matrix across cost-of-equity and terminal growth assumptions.

    args: ticker
  • get_risks()Preview

    The kill-scenario risk register: what would have to be true for the bear case.

    args: ticker
  • compare_tickers()Preview

    Side-by-side metrics for up to 6 tickers — same payload as the Compare tool.

    args: tickers[]
  • get_changes()Preview

    Rating-change feed: what flipped recently across the universe and why.

    args: since?, ticker?
  • search_universe()Preview

    Free-text search across covered tickers, sectors, and archetypes.

    args: query
  • get_llm_bundle()Preview

    The transferrable bundle — one compact JSON shaped for direct injection into any LLM context.

    args: ticker
§ 03

Auth & API key tiers

One key, two transports. The MCP server reads the same X-API-Key credential as the REST API.

Authentication is identical to the REST API. Mint a key from /preferences → API, set it as SMA_KEY in your environment, and send it as X-API-Key. There is no separate MCP credential — the same key, scoped to your subscription tier, gates both surfaces.

Quotas are per-key, per-month. Responses carry X-RateLimit-Remaining and X-RateLimit-Reset so the client can pace itself. Exceeding the quota returns a 429 with a Retry-After hint and an upgrade_url in the body.

Scope by tier

Growth API keys carry valuation:calculate, which unlocks the beta catalog, calculator, suite, sensitivity, and formula tools for users on Professional or Enterprise subscriptions. Enterprise keys add valuation:defaults for ticker-calibrated default inputs. Report-reader tools remain preview-only until the broader launch gates pass. See pricing for the full matrix.

TierPriceReq/moToolsStreaming
Free API$0/mo100No MCP calculator scope
Growth$99/mo1,000Pro/Enterprise sub + valuation:calculateHTTP beta
EnterpriseCustomUnlimitedvaluation:calculate + valuation:defaultsHTTP beta
Beta tools are read/calc-only — no MCP tool can mutate reports, user accounts, subscriptions, or saved workbooks.
§ 04

Use the beta endpoint

Streamable HTTP-style JSON-RPC is available now; packaged stdio clients come after real-client launch gates.

The beta endpoint is https://api.stockmarketagent.ai/api/mcp. Every example below reads SMA_KEY from your environment so the credential never lands in version control.

Initialize

Beta
HTTP JSON-RPC
curl https://api.stockmarketagent.ai/api/mcp \
  -H "X-API-Key: ${SMA_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize"
  }'

List tools

Beta
tools/list
curl https://api.stockmarketagent.ai/api/mcp \
  -H "X-API-Key: ${SMA_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list"
  }'

Run a model

Beta
tools/call
curl https://api.stockmarketagent.ai/api/mcp \
  -H "X-API-Key: ${SMA_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "calculate_valuation_model",
      "arguments": {
        "model": "discounted_earnings",
        "assumptions": {
          "sbc_adjusted_eps": 4.75,
          "five_year_growth_rate": 0.12,
          "terminal_growth_rate": 0.03,
          "terminal_pe": 22
        },
        "capital_structure": { "ke_moderate": 0.095 },
        "market": { "current_price": 100 }
      }
    }
  }'

Run a matrix

Beta
tools/call
curl https://api.stockmarketagent.ai/api/mcp \
  -H "X-API-Key: ${SMA_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "calculate_sensitivity_matrix",
      "arguments": {
        "model": "discounted_earnings",
        "row_axis": "ke_moderate",
        "column_axis": "terminal_growth_rate",
        "row_offsets": [-0.01, 0, 0.01],
        "column_offsets": [-0.005, 0, 0.005],
        "assumptions": {
          "sbc_adjusted_eps": 4.75,
          "five_year_growth_rate": 0.12,
          "terminal_growth_rate": 0.03,
          "terminal_pe": 22
        },
        "capital_structure": { "ke_moderate": 0.095 },
        "market": { "current_price": 100 }
      }
    }
  }'
§ 05

Example prompts

What the beta calculator endpoint can answer now. Each prompt maps to one read/calc-only MCP tool.
  • Run a discounted earnings valuation with EPS 4.75, five-year growth 12%, terminal growth 3%, terminal P/E 22, Ke 9.5%, and current price 100.

    calculate_valuation_model·Analyst testing one model
  • Run a sensitivity matrix for discounted earnings across Ke and terminal growth using my base assumptions.

    calculate_sensitivity_matrix·Quant cross-checking a DCF
  • Which calculators apply to a REIT, and which models should be excluded for a pre-profit software company?

    list_valuation_calculators·Research lead choosing lenses
  • Explain the owner earnings calculator formula and tell me which inputs I need before I run it.

    explain_valuation_formula·Daily user preparing inputs
  • Run the full valuation suite with my manual assumptions and summarize which models were computed, excluded, or failed.

    calculate_valuation_suite·Professional analyst triangulating value
  • Fetch ticker-calibrated default inputs for NVDA discounted earnings, then show me which fields I should override manually.

    get_stock_calculator_defaults·Enterprise user starting from defaults
§ 06

What to expect during the beta

Setting expectations before you build on it.
Model Context Protocolbeta
It works today, but the surface is still settling. Read this before you depend on it.
  • Read/calc-only. The beta tools run your assumptions through typed valuation and financial formulas. They cannot place trades, modify a watchlist, mutate reports, or generate new ratings on demand.
  • Names may change. Tool names, arguments, and response shapes can change before general availability. Pin a version if you need stability.
  • Professional and above. MCP calculator access is bundled with Professional and Enterprise during the beta, and rate limits apply per key.
  • Calculators live, reports preview. Calculator tools answer now. Report-reader tools stay preview until the broader launch gates pass.
Educational analysis only. This is not financial advice. Always do your own due diligence.
§ 07

Get the GA notice

One email when packaged clients and report-reader tools are ready. No drip.

The calculator endpoint is live in beta today. We will email you exactly once when the stdio package, verified client setup guides, directory submissions, and preview report-reader tools graduate to general availability.

In the meantime, use the JSON-RPC examples above for calculator workflows, or use the same valuation surface through the REST API. If you are wiring an app workflow now, the developer reference has cURL, Python, and Node samples for the public calculator endpoints.

Notify me at GA

We will not share your email or use it for anything other than the MCP GA announcement.

One email at launch. Your address is tagged as launch-only and excluded from weekly digest sends unless you opt in separately.

Building with the beta?

Tell us what is working and what is not. Beta feedback shapes the tools that ship at general availability. If you would rather wire this in over plain HTTP, the REST API covers the same valuation surface.

REST API docs →