Portfolio Research MCP Server
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., "@Portfolio Research MCP ServerAnalyze my portfolio: 10 AAPL at $120 and 5 MSFT at $350"
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.
Portfolio Research MCP Server π
A Model Context Protocol (MCP) server that gives any AI coding assistant or chat client live stock and portfolio research tools, powered by Yahoo Finance data. Written in Python with FastMCP, it speaks Streamable HTTP so you can host it once and connect from Claude, Cursor, VS Code, Google Antigravity, Windsurf, and terminal-based agents.
Ask your assistant: "Analyze my portfolio: 10 AAPL bought at $150 and 5 MSFT at $300," and it will call this server, price the holdings live, and report your gain/loss and weights.
β³ First request is slow β please read
The public demo is hosted on Render's free tier, which puts the server to sleep after ~15 minutes of inactivity. When you send your first request after it has been idle, Render has to wake it up (a "cold start"), which takes roughly 30β60 seconds.
Your first message may hang or time out β this is normal. Just wait and try again; once awake, the server responds instantly.
Tip: open
https://stock-research-mcp.onrender.com/healthin your browser first. When it showsok, the server is warm and ready.This delay only affects the free hosted demo. A local run or a paid Render instance has no cold start.
Related MCP server: Finance MCP Server
π Try it instantly (public demo)
A live instance is already hosted β you don't need to deploy anything to test it.
URL |
|
Auth header |
|
Drop those into any config block in Connect it to your IDE / agent below and start asking questions.
β οΈ This is a shared public demo token for trying the server out. It may be rate-limited, rotated, or taken down at any time, and the instance sleeps after ~15 min idle (first call may take 30β60s to wake). For anything real, deploy your own and set your own private
MCP_AUTH_TOKEN.
Tools
Tool | What it does |
| Latest price, day change, volume, market cap for a ticker |
| P/E, EPS, dividend yield, beta, 52-week range, sector, analyst rating |
| Historical OHLC candles ( |
| Recent news headlines with links for a ticker |
| Value a set of holdings; per-position + total gain/loss and weights |
| Side-by-side valuation snapshot for several tickers |
Data source: yfinance β free, no API key required.
Quick start (local)
Requires Python 3.10+.
git clone <your-repo-url> stock-research-mcp
cd stock-research-mcp
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt
python server.pyThe server starts at:
MCP endpoint:
http://127.0.0.1:8000/mcpHealth check:
http://127.0.0.1:8000/healthβok
Locally, auth is disabled unless you set MCP_AUTH_TOKEN (see Security).
Deploy free on Render
Render's free web-service tier hosts this at a public HTTPS URL. A render.yaml blueprint is
included.
Push this repo to GitHub.
In the Render dashboard: New + β Blueprint, select your repo. Render reads
render.yamland provisions a free web service. (Or New + β Web Service manually: Buildpip install -r requirements.txt, Startpython server.py.)Under Environment, set a secret
MCP_AUTH_TOKEN(a long random string).Deploy. Your server is live at:
https://<your-app-name>.onrender.com/mcp
β οΈ Free-tier cold starts: free instances spin down after ~15 minutes idle. The next request wakes it and can take 30β60 seconds. Upgrade to any paid instance to stay always-on. Hit
/healthto warm it before a demo.
Connect it to your IDE / agent
The blocks below use the public demo URL and token so you can copy-paste and go. To use
your own deployment, swap in your Render URL and your private MCP_AUTH_TOKEN (or
http://127.0.0.1:8000/mcp with no header for a local run).
β οΈ The config key differs by client. Cursor and VS Code use
url; Antigravity and Windsurf useserverUrl; Claude Code uses a CLI command. Copy the right block below.
Claude Code (terminal)
claude mcp add --transport http stock-research \
https://stock-research-mcp.onrender.com/mcp \
--header "Authorization: Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"Then check it: claude mcp list. Remove with claude mcp remove stock-research.
Claude Desktop
Claude Desktop connects to remote servers through the mcp-remote bridge (needs Node.js).
Edit claude_desktop_config.json (Settings β Developer β Edit Config):
{
"mcpServers": {
"stock-research": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://stock-research-mcp.onrender.com/mcp",
"--header", "Authorization: Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"
]
}
}
}Restart Claude Desktop. Tools appear under the π (MCP) icon.
Cursor
Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": {
"stock-research": {
"url": "https://stock-research-mcp.onrender.com/mcp",
"headers": {
"Authorization": "Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"
}
}
}
}Then Settings β MCP and confirm the server shows green.
Google Antigravity
Antigravity uses serverUrl (not url). Open the MCP store via the "β¦" menu in the
agent panel β Manage MCP Servers β View raw config, or edit
~/.gemini/config/mcp_config.json directly:
{
"mcpServers": {
"stock-research": {
"serverUrl": "https://stock-research-mcp.onrender.com/mcp",
"headers": {
"Authorization": "Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"
}
}
}
}Save, then Customizations β Installed MCP Servers β Refresh.
Windsurf
Windsurf also uses serverUrl. Edit ~/.codeium/windsurf/mcp_config.json
(or Settings β Cascade β MCP Servers β Manage β View raw config):
{
"mcpServers": {
"stock-research": {
"serverUrl": "https://stock-research-mcp.onrender.com/mcp",
"headers": {
"Authorization": "Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"
}
}
}
}Click Refresh in the MCP panel.
VS Code (Copilot agent mode)
Create .vscode/mcp.json in your workspace (or run MCP: Add Server from the Command
Palette):
{
"servers": {
"stock-research": {
"type": "http",
"url": "https://stock-research-mcp.onrender.com/mcp",
"headers": {
"Authorization": "Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"
}
}
}
}Open Copilot Chat, switch to Agent mode, and the tools become available.
Other terminal / stdio-only agents
Clients that speak the remote MCP shape can reuse the Cursor block above (url + headers).
For agents that only support local stdio servers, bridge to the remote URL with
mcp-remote:
npx -y mcp-remote https://stock-research-mcp.onrender.com/mcp \
--header "Authorization: Bearer mYfUEnx-jnDKlUTHIkUXhCWhMBPgxuzmSvCfxegrt98"Point the client's command/args at that (as in the Claude Desktop example).
Usage examples
Once connected, try prompts like:
"What's AAPL trading at right now?" β
get_quote"Compare NVDA, AMD and INTC on valuation." β
compare_tickers"Show me TSLA's price history over the last 6 months." β
get_price_history"Any recent news on MSFT?" β
get_news"Analyze my portfolio: 10 AAPL at $150, 5 MSFT at $300, 20 NVDA at $110." β
analyze_portfolio
Security
If
MCP_AUTH_TOKENis set, every request to/mcpmust sendAuthorization: Bearer <token>or it's rejected with401. Always set it in production.If it's unset, auth is off β fine for
localhost, never for a public URL.A shared bearer token is a pragmatic choice for a personal/portfolio project. The MCP spec's full answer for public servers is OAuth 2.1 with PKCE; adopt that if you expose this to untrusted clients.
The token shown in this README is a deliberately public demo token so anyone can try the hosted instance. Never reuse it for a private deployment β generate your own with
python -c "import secrets; print(secrets.token_urlsafe(32))"and keep it secret.
Project structure
.
βββ server.py # FastMCP app: tools, bearer-auth middleware, /health, HTTP transport
βββ portfolio.py # yfinance data layer (pure, testable, returns plain dicts)
βββ requirements.txt # fastmcp, yfinance, uvicorn
βββ render.yaml # Render blueprint (free web service)
βββ .env.example # MCP_AUTH_TOKEN, PORT
βββ README.mdTroubleshooting
Symptom | Fix |
First request after idle is very slow | Render free-tier cold start (~30β60s). Ping |
| Token in the client header must exactly match |
Empty / | yfinance can rate-limit or return partial data. Retry shortly, or verify the ticker symbol. |
Client shows the server but no tools | Confirm the URL ends in |
License
MIT β do whatever you like. Data is provided by Yahoo Finance via yfinance and is subject to
their terms; this project is for research/educational use, not investment advice.
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.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides real-time stock quotes, historical price data, financial news, and multi-stock comparisons using Yahoo Finance data. Enables users to access comprehensive financial market information through natural language queries.Last updated153MIT
- Alicense-quality-maintenanceProvides real-time financial data from Yahoo Finance, enabling stock price lookups, historical data analysis, company information retrieval, and multi-stock comparisons through natural language queries.Last updated
- Alicense-qualityDmaintenanceEnables LLMs to retrieve stock market data and financial information from Yahoo Finance using the yfinance Python library. Supports querying stock prices, historical data, and other financial metrics through natural language.Last updatedMIT
- Alicense-qualityDmaintenanceProvides comprehensive financial data from Yahoo Finance, enabling retrieval of stock prices, company information, financial statements, options data, analyst recommendations, and market news through natural language queries.Last updatedMIT
Related MCP Connectors
Global stock research, ML forecasts, valuation signals, screeners & portfolio tracking in Claude
Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enabβ¦
Look up the latest stock prices by ticker symbol across global markets. Get current price and esseβ¦
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/themohal/stock-research-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server