- Home
- MCP servers
- Local Stock Analyst
Local Stock Analyst
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sauravmehto-mcpstocknewsai": {
"command": "python",
"args": [
"-m",
"mcp_server"
],
"env": {
"HOST": "0.0.0.0",
"PORT": "8000",
"FMP_API_KEY": "YOUR_FMP_KEY",
"FRED_API_KEY": "YOUR_FRED_KEY",
"NEWS_API_KEY": "YOUR_NEWS_API_KEY",
"HTTP_TRANSPORT": "sse",
"SEC_USER_AGENT": "local-stock-analyst/1.0 (support@example.com)",
"TRANSPORT_MODE": "stdio",
"FINNHUB_API_KEY": "YOUR_FINNHUB_KEY",
"CACHE_TTL_SECONDS": "60",
"ALPHAVANTAGE_API_KEY": "YOUR_ALPHA_VANTAGE_KEY",
"YAHOO_FINANCE_ENABLED": "true",
"REQUEST_TIMEOUT_SECONDS": "15",
"PROVIDER_MIN_INTERVAL_SECONDS": "0.2"
}
}
}
}You deploy this MCP server to perform stock intelligence workflows with multiple data providers, a domain-aware tool registry, caching, and flexible transport options. It enables you to query market data, stock information, technical indicators, fundamentals, news, and screener results through a single MCP endpoint, with reliable routing and rate-limiting safeguards.
How to use
You will run the local MCP server in stdio mode for development and testing, or switch to HTTP transport for remote access. Start by injecting your API keys for the data providers you plan to use, then connect your MCP client to the local server. Use the provided tool catalog to perform market checks, stock price lookups, computations like RSI or MACD, fundamental figures, options data, risk metrics, news, and screeners. The server supports multiple providers with fallback routing, in-memory TTL caching, and per-provider rate limits, ensuring responsive queries even when some providers are slow or unavailable.
How to install
Prerequisites: you need Python installed on your system. You will also need internet access to install dependencies and obtain API keys from data providers.
python -m venv .venv
source .venv/bin/activate
# On Windows use: .venv\Scripts\activate
pip install -r requirements.txt
Additional notes and configuration
Configure environment variables to enable provider access and customize runtime behavior. The MCP server relies on multiple provider API keys and optional settings to control timeouts, caching, and transport mode.
Available tools
get_market_status
Return current market status, such as open/close, major market indices, and breadth indicators.
get_market_indices
Fetch key market indices like S&P 500, Dow Jones, and Nasdaq composites.
get_vix
Retrieve the VIX volatility index value.
get_market_movers
Get lists of top market movers by price or percentage change.
get_sector_performance
Provide performance metrics for market sectors over a defined period.
get_market_breadth
Assess market breadth with indicators that show the balance of advancing vs. declining stocks.
get_stock_price
Fetch the latest price for a specific stock symbol.
get_quote
Retrieve a detailed quote including bid/ask, volume, and price changes.
get_company_profile
Get basic company information such as description, sector, and exchange.
get_candles
Obtain historical candlestick data for a symbol and interval.
get_stock_news
Access recent news related to a specific stock.
get_dividends
Query dividend history for a stock.
get_splits
Query stock split events.
get_earnings_calendar
Retrieve upcoming earnings dates and expectations.
get_rsi
Calculate RSI for a symbol over a period.
get_macd
Compute MACD values for a symbol.
get_sma
Calculate Simple Moving Averages for a symbol.
get_ema
Calculate Exponential Moving Averages for a symbol.
get_support_resistance_levels
Identify support and resistance levels for a chart.
detect_chart_patterns
Detect recognizable chart patterns in price data.
get_key_financials
Fetch key financial metrics for a company.
get_financial_statements
Access balance sheets, income statements, and cash flow statements.
get_fundamental_ratings
Obtain fundamental ratings for stocks.
get_price_targets
Query analysts' price targets.
get_ownership_signals
Retrieve ownership and insider activity signals.
get_sec_filings
Access SEC filings for a company.
get_options_chain
Fetch options chain data for a symbol.
get_options_iv
Retrieve implied volatility for options.
get_options_greeks
Compute Greeks for options data.
get_unusual_options_activity
Identify unusual activity in options markets.
get_max_pain
Calculate max pain price for options expirations.
get_beta
Compute beta relative to a benchmark.
get_sharpe_sortino
Calculate Sharpe/Sortino ratios for risk assessment.
get_max_drawdown
Determine maximum drawdown for a portfolio or instrument.
get_var
Value at Risk calculation.
get_correlation
Correlation between assets or factors.
get_rebalance_plan
Generate a suggested portfolio rebalance plan.
get_markowitz_allocation
Compute Markowitz efficient frontier allocations.
get_dividend_projection
Project future dividends for holdings.
get_tax_estimate
Estimate potential tax implications of trades and gains.