$git clone https://github.com/financial-datasets/mcp-serverThis is a Model Context Protocol (MCP) server that provides access to stock market data from Financial Datasets.
| 1 | # Financial Datasets MCP Server |
| 2 | |
| 3 | ## Introduction |
| 4 | |
| 5 | This is a Model Context Protocol (MCP) server that provides access to stock market data from [Financial Datasets](https://www.financialdatasets.ai/). |
| 6 | |
| 7 | It allows Claude and other AI assistants to retrieve income statements, balance sheets, cash flow statements, stock prices, and market news directly through the MCP interface. |
| 8 | |
| 9 | ## Available Tools |
| 10 | |
| 11 | This MCP server provides the following tools: |
| 12 | - **get_income_statements**: Get income statements for a company. |
| 13 | - **get_balance_sheets**: Get balance sheets for a company. |
| 14 | - **get_cash_flow_statements**: Get cash flow statements for a company. |
| 15 | - **get_current_stock_price**: Get the current / latest price of a company. |
| 16 | - **get_historical_stock_prices**: Gets historical stock prices for a company. |
| 17 | - **get_company_news**: Get news for a company. |
| 18 | - **get_available_crypto_tickers**: Gets all available crypto tickers. |
| 19 | - **get_crypto_prices**: Gets historical prices for a crypto currency. |
| 20 | - **get_historical_crypto_prices**: Gets historical prices for a crypto currency. |
| 21 | - **get_current_crypto_price**: Get the current / latest price of a crypto currency. |
| 22 | |
| 23 | ## Setup |
| 24 | |
| 25 | ### Prerequisites |
| 26 | |
| 27 | - Python 3.10 or higher |
| 28 | - [uv](https://github.com/astral-sh/uv) package manager |
| 29 | |
| 30 | ### Installation |
| 31 | |
| 32 | 1. Clone this repository: |
| 33 | ```bash |
| 34 | git clone https://github.com/financial-datasets/mcp-server |
| 35 | cd mcp-server |
| 36 | ``` |
| 37 | |
| 38 | 2. If you don't have uv installed, install it: |
| 39 | ```bash |
| 40 | # macOS/Linux |
| 41 | curl -LsSf https://astral.sh/uv/install.sh | sh |
| 42 | |
| 43 | # Windows |
| 44 | curl -LsSf https://astral.sh/uv/install.ps1 | powershell |
| 45 | ``` |
| 46 | |
| 47 | 3. Install dependencies: |
| 48 | ```bash |
| 49 | # Create virtual env and activate it |
| 50 | uv venv |
| 51 | source .venv/bin/activate # On Windows: .venv\Scripts\activate |
| 52 | |
| 53 | # Install dependencies |
| 54 | uv add "mcp[cli]" httpx # On Windows: uv add mcp[cli] httpx |
| 55 | |
| 56 | ``` |
| 57 | |
| 58 | 4. Set up environment variables: |
| 59 | ```bash |
| 60 | # Create .env file for your API keys |
| 61 | cp .env.example .env |
| 62 | |
| 63 | # Set API key in .env |
| 64 | FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key |
| 65 | ``` |
| 66 | |
| 67 | 5. Run the server: |
| 68 | ```bash |
| 69 | uv run server.py |
| 70 | ``` |
| 71 | |
| 72 | ## Connecting to Claude Desktop |
| 73 | |
| 74 | 1. Install [Claude Desktop](https://claude.ai/desktop) if you haven't already |
| 75 | |
| 76 | 2. Create or edit the Claude Desktop configuration file: |
| 77 | ```bash |
| 78 | # macOS |
| 79 | mkdir -p ~/Library/Application\ Support/Claude/ |
| 80 | nano ~/Library/Application\ Support/Claude/claude_desktop_config.json |
| 81 | ``` |
| 82 | |
| 83 | 3. Add the following configuration: |
| 84 | ```json |
| 85 | { |
| 86 | "mcpServers": { |
| 87 | "financial-datasets": { |
| 88 | "command": "/path/to/uv", |
| 89 | "args": [ |
| 90 | "--directory", |
| 91 | "/absolute/path/to/financial-datasets-mcp", |
| 92 | "run", |
| 93 | "server.py" |
| 94 | ] |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | ``` |
| 99 | |
| 100 | Replace `/path/to/uv` with the result of `which uv` and `/absolute/path/to/financial-datasets-mcp` with the absolute path to this project. |
| 101 | |
| 102 | 4. Restart Claude Desktop |
| 103 | |
| 104 | 5. You should now see the financial tools available in Claude Desktop's tools menu (hammer icon) |
| 105 | |
| 106 | 6. Try asking Claude questions like: |
| 107 | - "What are Apple's recent income statements?" |
| 108 | - "Show me the current price of Tesla stock" |
| 109 | - "Get historical prices for MSFT from 2024-01-01 to 2024-12-31" |