# mcp-server

> MCP Server

This repository hosts an MCP server providing access to financial data from Financial Datasets, enabling AI assistants like Claude to retrieve stock market information through its interface. The server offers

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 2287
- **Forks:** 21
- **Owner:** financial-datasets
- **GitHub:** https://github.com/financial-datasets/mcp-server
- **Homepage:** https://www.financialdatasets.ai/
- **Created:** 2025-03-07T13:39:26+00:00
- **Updated:** 2025-03-28T23:23:26+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-financial-datasets-stock-api

## Setup

## Setup

### Prerequisites

- Python 3.10 or higher
- [uv](https://github.com/astral-sh/uv) package manager

### Installation

1. Clone this repository:
   ```bash
   git clone https://github.com/financial-datasets/mcp-server
   cd mcp-server
   ```

2. If you don't have uv installed, install it:
   ```bash
   # macOS/Linux
   curl -LsSf https://astral.sh/uv/install.sh | sh
   
   # Windows
   curl -LsSf https://astral.sh/uv/install.ps1 | powershell
   ```

3. Install dependencies:
   ```bash
   # Create virtual env and activate it
   uv venv
   source .venv/bin/activate  # On Windows: .venv\Scripts\activate
   
   # Install dependencies
   uv add "mcp[cli]" httpx  # On Windows: uv add mcp[cli] httpx

   ```

4. Set up environment variables:
   ```bash
   # Create .env file for your API keys
   cp .env.example .env

   # Set API key in .env
   FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key
   ```

5. Run the server:
   ```bash
   uv run server.py
   ```

## Tools

## Available Tools

1. get_income_statements (Retrieve income statements for a stock)
2. get_balance_sheets (Retrieve balance sheets for stock)
3. get_cash_flow_statements (Retrieve cash flow statements for a stock)
4. get_current_price (Get the latest price information for a stock)
5. get_prices (Get historical stock prices with customizable date ranges and intervals)
6. get_news (Get the latest news for a stock)
