
fin-mcp
A MCP server to power your LLM with financial analysis capabilities
1
Github Watches
0
Github Forks
0
Github Stars
Financial Analysis MCP Server
A powerful server for financial analysis capabilities, providing stock data retrieval and visualization features.
Features
- Stock data retrieval from yfinance
- Alpha Vantage API integration
- Web search for financial information
- Interactive visualization with Plotly
- RESTful API endpoints
Prerequisites
- Python 3.8+
- Alpha Vantage API key (for additional data)
Installation
- Clone the repository:
git clone <repository-url>
cd fin-mcp
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory and add your Alpha Vantage API key:
ALPHA_VANTAGE_API_KEY=your_api_key_here
Usage
- Start the server:
cd src
python main.py
-
The server will start at
http://localhost:8000
-
Access the API documentation at
http://localhost:8000/docs
API Endpoints
Stock Data
-
GET /api/v1/stock/{symbol}
- Get stock data from yfinance -
GET /api/v1/alpha-vantage/{symbol}
- Get stock data from Alpha Vantage -
GET /api/v1/search/{query}
- Search for financial information
Visualization
-
GET /api/v1/visualize/candlestick/{symbol}
- Get candlestick chart -
GET /api/v1/visualize/volume/{symbol}
- Get volume chart -
GET /api/v1/visualize/combined/{symbol}
- Get combined price and volume chart
Example Usage
import requests
# Get stock data
response = requests.get("http://localhost:8000/api/v1/stock/AAPL")
data = response.json()
# Get candlestick chart
response = requests.get("http://localhost:8000/api/v1/visualize/candlestick/AAPL")
chart_data = response.json()
License
This project is licensed under the MIT License - see the LICENSE file for details.
相关推荐
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Take an adjectivised noun, and create images making it progressively more adjective!
Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.
Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.
Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
🧑🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.
Reviews

user_Yrm0Y7SL
The fin-mcp by cristianleoo is an outstanding product for those seeking a dependable MCP application. The project, hosted on GitHub, showcases the developer's keen attention to detail and commitment to quality. As a dedicated user, I appreciate the robust features and seamless integration. Its open-source nature allows for continuous improvement and community contributions. Highly recommend checking out fin-mcp for a top-notch experience!