Financial Analysis MCP Server

Financial Analysis MCP Server

By cristianleoo GitHub

A MCP server to power your LLM with financial analysis capabilities

Overview

what is fin-mcp?

fin-mcp is a server designed to enhance large language models (LLMs) with financial analysis capabilities, enabling users to perform in-depth financial evaluations and insights.

how to use fin-mcp?

To use fin-mcp, set up the server by following the installation instructions on the GitHub repository, and then integrate it with your LLM to access financial analysis features.

key features of fin-mcp?

  • Integration with LLMs for advanced financial analysis
  • Ability to process and analyze financial data
  • Support for various financial metrics and indicators

use cases of fin-mcp?

  1. Analyzing stock market trends and predictions
  2. Evaluating financial statements for companies
  3. Generating financial reports and insights

FAQ from fin-mcp?

  • What kind of financial analysis can fin-mcp perform?

fin-mcp can analyze various financial metrics, including stock performance, company valuations, and market trends.

  • Is fin-mcp free to use?

Yes! fin-mcp is open-source and available under the MIT license.

  • How do I integrate fin-mcp with my LLM?

Detailed integration instructions can be found in the GitHub repository.

Content

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

  1. Clone the repository:
git clone <repository-url>
cd fin-mcp
  1. Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the root directory and add your Alpha Vantage API key:
ALPHA_VANTAGE_API_KEY=your_api_key_here

Usage

  1. Start the server:
cd src
python main.py
  1. The server will start at http://localhost:8000

  2. 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.

No tools information available.
No content found.