SuperAPI AI Directory

mcp-server

Stock market API made for AI agents

Open website

About this tool

Purpose

This MCP server is used to let AI assistants (such as Claude) access stock market data provided by Financial Datasets through the Model Context Protocol interface. With this server, AI assistants can retrieve a company's financial statements, stock prices, and market news, as well as cryptocurrency-related price data.

Main Capabilities (Available Tools)

The server provides the following tools:

  • get_income_statements: Retrieve a company's income statements.
  • get_balance_sheets: Retrieve a company's balance sheets.
  • get_cash_flow_statements: Retrieve a company's cash flow statements.
  • get_current_stock_price: Retrieve a company's current/latest stock price.
  • get_historical_stock_prices: Retrieve a company's historical stock prices.
  • get_company_news: Retrieve a company's news.
  • get_available_crypto_tickers: Retrieve all available cryptocurrency tickers.
  • get_crypto_prices: Retrieve the historical price of a cryptocurrency.
  • get_historical_crypto_prices: Retrieve the historical price of a cryptocurrency.
  • get_current_crypto_price: Retrieve the current/latest price of a cryptocurrency.

How to Use

Runtime Requirements

  • Python 3.10 or later
  • The uv package manager

Installation and Running Steps

  1. Clone the repository:
    git clone https://github.com/financial-datasets/mcp-server
    cd mcp-server
    
  2. If uv is not yet installed, install it first:
    # macOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    # Windows
    curl -LsSf https://astral.sh/uv/install.ps1 | powershell
    
  3. Install dependencies:
    # 创建虚拟环境并激活
    uv venv
    source .venv/bin/activate
    # Windows: .venv\Scripts\activate
    
    # 安装依赖
    uv add "mcp[cli]" httpx
    # Windows: uv add mcp[cli] httpx
    
  4. Set environment variables:
    # 创建用于存放 API 密钥的 .env 文件
    cp .env.example .env
    
    # 在 .env 中设置 API 密钥
    FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key
    
  5. Run the server:
    uv run server.py
    

Connecting to Claude Desktop

  1. If Claude Desktop is not yet installed, install it first.
  2. Create or edit the Claude Desktop configuration file:
    # macOS
    mkdir -p ~/Library/Application\ Support/Claude/
    nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  3. Add the following configuration:
    {
      "mcpServers": {
        "financial-datasets": {
          "command": "/path/to/uv",
          "args": [
            "--directory",
            "/absolute/path/to/financial-datasets-mcp",
            "run",
            "server.py"
          ]
        }
      }
    }
    
    Replace /path/to/uv with the result of which uv , and replace /absolute/path/to/financial-datasets-mcp with the absolute path to this project.
  4. Restart Claude Desktop.
  5. You should now see the available financial tools in the Claude Desktop tools menu (hammer icon).

Example Questions

You can try asking Claude questions such as:

  • "What are Apple's most recent income statements?"
  • "Show the current price of Tesla stock"
  • "Get the historical prices for MSFT from 2024-01-01 to 2024-12-31"

Use Cases

Suitable for users who want to let AI assistants (especially Claude) directly query stock financial statements, stock prices, company news, and cryptocurrency price data. It can be used to assist with scenarios such as financial data analysis, investment research, or market information queries.

Limitations

The materials do not mention specific fees, pricing, platform support scope, data coverage, usage frequency limits, or other such information, so none is provided for now.