stock_intelligence_mcp

zhenxiay/stock_intelligence_mcp

3.2

If you are the rightful owner of stock_intelligence_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that enables AI agents to interact with Yahoo Finance for stock analysis and recommendations.

πŸ“ˆπŸ“‰πŸ“Š stock_intelligence_mcp

A Model Context Protocol (MCP) server which allows AI agents to interact with Yahoo Finance.

✨ Key Features

FeatureDescription
πŸ“ˆ Stock intelligence toolkitGet most recent price development and news of a selected ticker.
πŸ“Š Recommendation toolkitGet recommendations based on technical analysis indicators or analysts' opinions.
πŸ”Œ Seamless plugin with clientThe server can be integrated with the main stream mcp clients (Claude, VS code etc.) seamlessly.
πŸ–₯️ CLI InterfaceOffers a CLI interface to start the server.
🐳 Docker-ReadyDockerfile availiable.
πŸ“¦ ExtensibleThe server can be extended with addtional tools easily.

πŸš€ Getting Started

To start this server, you can either clone this repository and run the server with python, or use the Docker image in the repo.

πŸ§‘β€πŸ’» Option 1: Run with python (using uv)

Create a new directory for your project

βš™οΈ Clone the repository:

git clone https://github.com/zhenxiay/stock_intelligence_mcp.git
cd stock_intelligence_mcp
Create virtual environment in the folder and activate it
uv venv
source .venv/bin/activate
πŸš€ Start the server

The server offers a CLI interface for the start.

Run the following command to check the availiable parameters:

uv run src/main.py --help

An example of starting the server with port 8008, streamable-http as transport and example_server as name:

uv run src/main.py --name example_server --port 8008 --transport streamable-http

πŸ§‘β€πŸ’» Option 2: Run with Docker/ k8s/ Helm chart

❗Make sure that Docker engine/ a k8s cluster (minikube/ kind etc.)/ Helm is installed on your PC.

Create a new directory for your project

βš™οΈ Clone the repository:

git clone https://github.com/zhenxiay/stock_intelligence_mcp.git
cd stock_intelligence_mcp
Build the Docker container
docker build . -t mcp-server-stock-intelligence:test -f Docker/Dockerfile
Run the Docker container
docker run --name mcp-server-stock -p 8008:8008 mcp-server-stock-intelligence:test
Run the k8s manifest

❗A secret has first to be created with some proxy specifications as env variable has to be created:

kubectl create secret generic proxy-env --from-literal=HTTP_PROXY=http://localhost:3128 --from-literal=HTTPS_PROXY=https://localhost:3128 --from-literal=NO_PROXY=localhost,127.0.0.1,kind

Then apply the deployment and service:

kubectl apply -f k8s/mcp-server-deployment.yaml
kubectl apply -f k8s/mcp-server-service.yaml
Run Helm to create the server

You can use the Helm chart and the following commands to create the server as well:

helm upgrade --install mcp-server-stock-intelligence k8s/helm --set proxy.http="http://your-proxy:8080" --set proxy.https="http://your-proxy:8080"

βš™οΈ Connect to the Server

Here are some options with which you can connect the test this server:

πŸ€– Use MCP inspector:

Follow the instruction under: https://modelcontextprotocol.io/legacy/tools/inspector

πŸ€– Use a client (Claude Desktop, VS COde Copilot etc.)

Most of the clients would require you to configure your server in a json format like the following:

Example of using streamable_http transport

{
   "mcpServers": {
       "stock_intelligence": {
           "url": "http://localhost:8008/mcp/",
           "transport": "streamable_http"
       }
   }
}

Example of using sse transport

{
   "mcpServers": {
      "stock_intelligence_sse": {
         "transport": "sse",
         "url": "https://localhost:8008/sse",
         "timeout": 600,
         "headers": null,
         "sse_read_timeout": 900
     }
   }
}

❗Please notice that the real port number is related to your own settings on your py command/ docker container/ helm chart values.

Exact instructions for Claude desktop or VS code can be found here:

πŸ“‹ Claude Desktop: https://modelcontextprotocol.io/quickstart/server

πŸ“‹ VS Code GitHub Copilot Extention: https://code.visualstudio.com/docs/copilot/chat/mcp-servers