MCP Financial Analyst
Allows GitHub Copilot to fetch real market data from Yahoo Finance, compute moving averages, returns, and volatility, and generate price charts for financial analysis.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Financial AnalystAnalyze AAPL with chart and metrics for last 3 months."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Financial Analyst
A local MCP (Model Context Protocol) server that acts as a financial analyst: it fetches real market data from Yahoo Finance, runs lightweight analysis (moving averages, returns, volatility), and generates price charts. No hallucinated numbers—all data comes from yfinance.
Quick start (how to use the app)
1. Create a venv and install dependencies
Use a virtual environment so you avoid conda/base Python and Homebrew’s “externally managed” pip. Use Python 3.12+ (MCP currently supports 3.10–3.13; 3.14 support may lag).
cd MCP_StockTool
python3.12 -m venv .venv # or: python -m venv .venv
.venv/bin/pip install -r requirements.txtIf you don't have Python 3.12, install it with your package manager (e.g. Homebrew on macOS), then run the two commands above with that Python.
2. Add the MCP server to MCP Client
Link this MCP Server to an existing MCP Client + LLM platforms like GitHub Copilot, Cursor or Claude Desktop to use: ** Repace /absolute/path/to with location of this server on your local computer.
{
"mcpServers": {
"financial-analyst": {
"command": "python",
"args": ["server.py"],
"cwd": "/absolute/path/to/MCP_StockTool"
}
}
}Save. Restart Cursor (or reload the window) so it picks up the server.
3. Use it in chat
In the Platform / IDE of your choice, open the chat, ask things like:
"Fetch the last 3 months of daily data for AAPL."
"Analyze MSFT from 2026-01-01 to 2026-02-01 and show me the chart and key metrics."
"What’s the 30-day moving average and return for GOOGL over the last 6 months?"
The AI will call the financial tools, get real data, and answer with numbers and (when you use analyze) a chart path. Charts are saved under MCP_StockTool/charts/.
fetch_market_data – Get OHLCV data for a ticker over a date range.
analyze_and_chart – Get the same data, compute 7-day/30-day MAs, return %, and volatility, and save a price chart.
Related MCP server: Agentic-Investor
Requirements
Python 3.10+
Dependencies:
mcp,yfinance,pandas,matplotlib
Install
From the project root:
cd MCP_StockTool
pip install -r requirements.txtOr with uv:
uv pip install -r requirements.txtRun the server (stdio)
For use by an MCP client (Cursor, Claude Desktop, etc.):
python server.pyThe server uses stdio transport: the client spawns this process and talks over stdin/stdout. Do not run it interactively; the client will start it.
MCP Client Integration
Add this MCP server in Github Copilot/Cursor/Claude Desktop so the AI can use the financial tools.
Add a server entry like this (adjust
pathif your project lives elsewhere):
{
"mcpServers": {
"financial-analyst": {
"command": "python",
"args": ["server.py"],
"cwd": "/absolute/path/to/MCP_StockTool",
"env": {}
}
}
}If you use a virtualenv or uv:
{
"mcpServers": {
"financial-analyst": {
"command": "/path/to/venv/bin/python",
"args": ["server.py"],
"cwd": "/absolute/path/to/MCP_StockTool"
}
}
}Or with uv:
{
"mcpServers": {
"financial-analyst": {
"command": "uv",
"args": ["run", "python", "server.py"],
"cwd": "/absolute/path/to/MCP_StockTool"
}
}
}Restart App (or reload MCP) so it picks up the server. The AI will then see fetch_market_data and analyze_and_chart as available tools.
Tools
fetch_market_data
ticker (str): Symbol, e.g.
AAPL,MSFT.start_date (str): Start date
YYYY-MM-DD.end_date (str): End date
YYYY-MM-DD.interval (str):
"daily"|"weekly"|"monthly"(default"daily").
Returns a JSON object with ticker, start_date, end_date, interval, row_count, and data (list of OHLCV rows). On error, returns an error field and empty or partial data.
analyze_and_chart
ticker (str): Symbol, e.g.
AAPL,MSFT.start_date (str): Start date
YYYY-MM-DD.end_date (str): End date
YYYY-MM-DD.interval (str):
"daily"|"weekly"|"monthly"(default"daily").output_path (str, optional): Path for the chart image. If omitted, saves to
charts/<ticker>_<timestamp>.png.
Returns a JSON object with:
chart_path: Absolute path to the saved chart.
metrics:
ma_7d,ma_30d(when enough data),return_pct,volatility_annual_pct,data_points,first_close,last_close.ticker, start_date, end_date, interval.
Volatility is the annualized standard deviation of daily (or period) returns in percent.
Example prompts (for the AI using this server)
“Fetch the last 3 months of daily data for AAPL.”
“Analyze MSFT from 2024-01-01 to 2024-12-01 and show me the chart and key metrics.”
“What’s the 30-day moving average and return for GOOGL over the last 6 months?”
The AI will call the MCP tools with the right parameters and report back using the real data and chart path returned by the server.
Project layout
MCP_StockTool/
├── pyproject.toml
├── README.md
├── server.py # MCP entrypoint (stdio)
├── tools/
│ ├── __init__.py
│ ├── market_data.py # fetch_market_data implementation
│ └── chart_analyzer.py # analyze_and_chart implementation
└── charts/ # created at runtime for saved imagesLicense
Use and modify as you like. Data is from Yahoo Finance via yfinance.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shashankg6/financialAnalyzerMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server