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.1.tar.gz (29.1 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.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stock_analyst_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 29.1 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.1.tar.gz
Algorithm Hash digest
SHA256 1b949689459ea00a97f1d05222b417beb4f9bc37bad5f3649325b3fbc829aaa7
MD5 d4f78a236efe6cc91552f3531207c32b
BLAKE2b-256 e669490c2b205634809d4e158289e2e6302e5dd57c042a993e60e1dfaaa9334c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for stock_analyst_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6976a596e68429f8f3d6b201cb08309c6a542a6e23e69ebe821b14665f780610
MD5 16c54574aded3d52da6a6e366c288b48
BLAKE2b-256 53452d199ce07c9f8438c163d99a5f52502891d70cc93e2f49c7c11f87f4ad06

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