Skip to main content

MCP server for Indian stock market analysis — fundamentals, technicals, DCF, peer comparison

Project description

stock-analyst-mcp

MCP server for Indian stock market analysis — fundamentals, technicals, DCF valuation, peer comparison, and more.

Install

pip install stock-analyst-mcp

Or run directly without installing:

uvx stock-analyst-mcp

MCP Configuration

Add to your MCP client config (Claude Desktop, Devin, Cursor, etc.):

{
  "mcpServers": {
    "stock-analyst": {
      "command": "uvx",
      "args": ["stock-analyst-mcp"]
    }
  }
}

Or if installed via pip:

{
  "mcpServers": {
    "stock-analyst": {
      "command": "stock-analyst-mcp"
    }
  }
}

Tools

Tool Description
analyze_stock Full analysis: fundamentals + technicals + peers + DCF + forecast + news
get_fundamentals Financial ratios: profitability, liquidity, leverage, efficiency, valuation
get_technicals Technical signals: EMA trend, RSI, MACD, Bollinger position
get_peer_comparison Peer fundamental + technical metrics with rankings
get_dcf_valuation DCF: WACC (India-adjusted), equity value/share, sensitivity range
get_revenue_forecast Revenue forecast: base/bull/bear scenarios
get_news Recent headlines + analyst recommendation summary
compare_stocks Side-by-side comparison of multiple stocks
get_raw_data Fetch cached raw financials for deep dives

CLI

Also works as a standalone CLI (no LLM needed):

# Full analysis
stock-analyst --symbol RELIANCE

# Specific analysis
stock-analyst --symbol TCS --analysis fundamentals
stock-analyst --symbol INFY --analysis technicals
stock-analyst --symbol RELIANCE --analysis dcf

# Compare multiple stocks
stock-analyst --symbols RELIANCE,TCS,INFY --compare

# Markdown output
stock-analyst --symbol RELIANCE --format markdown

# Raw data
stock-analyst --symbol RELIANCE --raw financials

Configuration

All settings configurable via environment variables with SA_ prefix. Defaults work out of the box for Indian markets (NSE).

Variable Default Description
SA_DEFAULT_EXCHANGE .NS NSE (.NS) or BSE (.BO)
SA_DEFAULT_PERIOD 1y Historical data period
SA_CACHE_BACKEND redis redis, csv, or none
SA_REDIS_URL redis://localhost:6379/0 Redis connection URL
SA_CACHE_TTL 3600 Cache TTL in seconds
SA_SCREENER_ENABLED true Scrape screener.in for peers
SA_FA_DCF_ENABLED true Run DCF valuation
SA_FA_WACC_RISK_FREE_RATE 0.07 India 10Y govt bond yield
SA_PEERS_MAX_COUNT 10 Max peers to compare
SA_MCP_TRANSPORT stdio stdio or streamable-http
SA_MCP_PORT 3001 Port for streamable-http

See configurations.env.example for the full list.

Python Library

from stock_analyst import analyze, get_fundamentals, get_technicals

result = analyze("RELIANCE")
ratios = get_fundamentals("TCS")
signals = get_technicals("INFY", period="6mo")

Data Sources

  • yfinance — OHLCV, financials, balance sheet, cashflow, info
  • screener.in — peer discovery (best-effort, graceful fallback)
  • India-adjusted defaults — risk-free rate 7%, cost of debt 9%, tax 25%

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stock_analyst_mcp-0.1.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stock_analyst_mcp-0.1.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file stock_analyst_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: stock_analyst_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for stock_analyst_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2dcad54deadde2acf6dcf808fd32fc69edb172c3c286fbd53e5a8b70053f1d1
MD5 242862eb06ae5888170adc873f07f4d5
BLAKE2b-256 92fd4d573bd64866958fa62b5c6a8a577841a155aa9f1201448ac73358e5ca21

See more details on using hashes here.

File details

Details for the file stock_analyst_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stock_analyst_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f661845f34f25b8b0b103552e104a4373b98035a0ecfc186e44e95a585a8eee0
MD5 3f3cae49bece89df519702238c3b72b5
BLAKE2b-256 32f3588d30e57b5b474fe614f05b1268af140e2f611c7afeab10fd9a9d92e45f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page