- 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-mcplocalstockrenderlivetested": {
"command": "python",
"args": [
"-m",
"mcp_server"
],
"env": {
"TRANSPORT_MODE": "stdio",
"FINNHUB_API_KEY": "YOUR_FINNHUB_KEY",
"ALPHAVANTAGE_API_KEY": "YOUR_ALPHA_VANTAGE_KEY"
}
}
}
}You will run the Local Stock Analyst MCP server locally to access stock-analysis tools through a lightweight, Python-based MCP server. It exposes capabilities like price lookups, financial data, and technical indicator calculations, making it easy to integrate stock insights into your workflows or clients.
How to use
To use this MCP server, you run the local Python MCP process and connect to it from your MCP client. The server supports both stdio transport for desktop environments and an HTTP transport when you run it in HTTP mode. You’ll access the same set of tools regardless of transport, including price data, company information, RSI/MACD calculations, and various market indicators.
How to install
Prerequisites: You need Python 3.11 or newer installed on your system.
Create a virtual environment and install dependencies.
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Additional setup and usage notes
You must provide API keys for at least one data provider to enable stock data retrieval. The server supports Finnhub as the primary provider and Alpha Vantage as a fallback. You will supply the keys via environment variables when you run the server.
Notes on running modes and health
Health checks are available via a default health endpoint. By default, the health endpoint is available at /health when using HTTP transport.
What you can run with this MCP server
The server exposes a rich set of stock analytics tools that you can call from your MCP client. These tools include getting stock prices, market data, company profiles, chart candles, news, and a variety of technical indicators and portfolio analyses.
Configuration and environment
To run in stdio mode (local Desktop MCP): set TRANSPORT_MODE to stdio and start the server with Python.
To run in HTTP mode (Render/local web MCP): set TRANSPORT_MODE to http, set HOST and PORT, and start the server. You can optionally choose an HTTP transport like sse or streamable.
Health and tests
A health endpoint is available by default. You can also run tests with the Python testing framework if provided in the project setup.
Available tools
get_stock_price
Fetch the latest trading price and related data for a given ticker, including current price, open, high, low, and close values.
get_quote
Retrieve a current quote for a stock, including bid/ask and basic price information.
get_company_profile
Obtain a company profile with details such as name, industry, description, and key executives.
get_candles
Get historical candle data (open, high, low, close, volume) for specified time ranges.
get_stock_news
Fetch recent stock-related news articles and headlines for a given ticker.
get_rsi
Compute or retrieve the Relative Strength Index (RSI) for a stock using local or provider data.
get_macd
Compute or retrieve the Moving Average Convergence Divergence (MACD) indicator for a stock.
get_key_financials
Obtain key financial metrics and statements for a company.
get_portfolio
Analyze a portfolio to determine potential buy/sell signals or risk metrics.
list_sell_decision_data_requirements
List data requirements needed to make sell decisions within a portfolio analysis.
analyze_portfolio_for_sell
Analyze a portfolio to generate sell recommendations based on provided data.
get_sma
Calculate the Simple Moving Average (SMA) for a stock.
get_ema
Calculate the Exponential Moving Average (EMA) for a stock.
get_bollinger_bands
Compute Bollinger Bands for a stock, showing volatility bands around a moving average.
get_atr
Calculate the Average True Range (ATR) to gauge market volatility.
get_adx
Compute the Average Directional Index (ADX) to assess trend strength.
get_stochastic
Calculate stochastic oscillators to identify momentum patterns.
get_obv
Compute On-Balance Volume (OBV) to analyze volume flow.
get_vwap
Calculate Volume Weighted Average Price (VWAP) for intraday analysis.
get_support_resistance_levels
Identify potential support and resistance levels for a stock.
detect_chart_patterns
Detect common chart patterns that may indicate potential price movements.
get_market_indices
Fetch market index data and insights for broader market context.
generate_buy_sell_hold_signal
Generate a consolidated buy/hold/sell signal based on multiple indicators.