About Stock Assistant MCP Server
An MCP server for stock data and analysis using the Yahoo Finance API. It provides real-time and historical data, stock comparisons, and API-key authentication over SSE transport.
Key features
- 01Real-time stock data
- 02Historical stock analysis
- 03Stock comparisons
- 04SSE transport
- 05API-key authentication
Use cases
- 01Checking current stock data
- 02Reviewing historical stock performance
- 03Comparing stocks
- 04Connecting through VS Code
MCP support
The server exposes real-time stock data, historical analysis, and stock comparison capabilities to MCP clients. It uses SSE transport and API-key authentication.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEStock Assistant MCP Server
This project implements a simple Model Context Protocol (MCP) server that provides real-time stock data, historical analysis, and stock comparisons using the Yahoo Finance API.
This MCP server uses SSE transport and is authenticated with an API key.
Running locally
Prerequisites:
- Python 3.13 or later
- uv
Run the server locally:
uv venv
uv sync
# linux/macOS
export API_KEYS=<AN_API_KEY>
# windows
set API_KEYS=<AN_API_KEY>
uv run fastapi dev main.py
VS Code MCP configuration (mcp.json):
{
"inputs": [
{
"type": "promptString",
"id": "my-api-key",
"description": "Stock Assistant API Key",
"password": true
}
],
"servers": {
"stock-mcp-sse": {
"type": "sse",
"url": "http://localhost:8000/sse",
"headers": {
"x-api-key": "${input:my-api-key}"
}
}
}
}
Deploy to Azure Container Apps
az containerapp up -g <RESOURCE_GROUP_NAME> -n stock-mcp --environment mcp -l westus --env-vars API_KEYS=<AN_API_KEY> --source .
If the deployment is successful, the Azure CLI returns the URL of the app. You can use this URL to connect to the server from Visual Studio Code.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.