Cover image
纳斯达克 - 戴塔 - 链接MCP
Public

纳斯达克 - 戴塔 - 链接MCP

Try Now
2025-04-14

NASDAQ数据链接MCP(模型上下文协议)服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

5

Github Stars

📈 Nasdaq Data Link MCP 🤖

License: MIT PyPI version Python 3.10+ Build Status Platform AI Powered

A community developed and maintained Model Context Protocol (MCP) server that provides access to Nasdaq Data Link. Built for use with MCP-compatible clients.

This project aims at making easy to access and explore Nasdaq Data Link’s extensive and valuable financial and economic datasets through natural language interfaces and large language models (LLMs).

🐍 This project uses the official nasdaq/data-link-python SDK

Disclaimer: This is an open-source project not affiliated with or endorsed by Nasdaq, Inc. Nasdaq® is a registered trademark of Nasdaq, Inc.

🌐 Usage

Retail Trading Activity World Bank Data
Nasdaq Data Link MCP - Retail Trading Activity Nasdaq Data Link MCP - World Bank Data

Once installed and connected to an MCP-compatible client (e.g., Claude Desktop, this server exposes several tools that your AI assistant can use to fetch data.

In this version (0.1.0) the project supports the following databases:

Example conversations

You: What were the most traded stocks by retailers yesterday?
Claude: calls get_rtat(<yetserday>) and returns relevant matches

You: What was the GDP of Italy in 2022?
Claude: Let me look that up... calls get_indicator_value tool
Claude: The GDP of Italy in 2022 was approximately ... trillion USD.

You: List all indicators related to CO₂ emissions.
Claude: calls search_worldbank_indicators("CO2") and returns relevant matches

You: What's the market cap and P/E ratio of Microsoft?
Claude: calls get_stock_stats(symbol="MSFT") and presents the key statistics

You: Show me Microsoft's profitability ratios for the most recent annual report.
Claude: calls get_fundamental_data(symbol="MSFT", dimension="MRY") and presents profitability metrics

You: What's Microsoft's cash flow and R&D spending for the last quarter?
Claude: calls get_detailed_financials(symbol="MSFT", dimension="MRQ") and presents cash flow and R&D data

You: What's Microsoft's asset breakdown and debt-to-equity ratio from the latest balance sheet?
Claude: calls get_balance_sheet_data(symbol="MSFT", dimension="MRQ") and presents relevant balance sheet items

You: How has Microsoft's free cash flow and capital expenditure changed over the past year?
Claude: calls get_cash_flow_data(symbol="MSFT", dimension="MRY") and analyzes free cash flow trends

You: Has Tesla had any stock splits in the last two years?
Claude: calls get_corporate_action_data(symbol="TSLA", action="split") and presents the split history

You: What industry and sector is AMD in, and where is the company located?
Claude: calls get_company_reference_data(symbol="AMD") and presents industry, sector, and location information


📦 Installation

1. Clone the Repository

git clone https://github.com/stefanoamorelli/nasdaq-data-link-mcp.git
cd nasdaq-data-link-mcp

2. Install Requirements

You'll need Python 3.10+ and the mcp CLI.

pip install mcp nasdaq-data-link pycountry

MCP SDK: https://github.com/modelcontextprotocol/python-sdk
Nasdaq Data Link SDK: https://github.com/Nasdaq/data-link-python

3. Get Your API Key

Sign up on https://data.nasdaq.com/ and copy your API key.

4. Download World Bank metadata CSV (optional: only if you plan to use the World Bank database)

Download the World Bank metadata from Nasdaq Data Link:

Nasdaq Data Link World Bank metadata export

And save it as metadata.csv in the following directory:

nasdaq-data-link-mcp/nasdaq_data_link_mcp_os/resources/world_data_bank/metadata/metadata.csv

5. Configure the Environment

cp .env.example .env

Then edit .env and add your API key:

NASDAQ_DATA_LINK_API_KEY=your_api_key_here

And the PYTHONPATH:

PYTHONPATH=/path/to/your/local/cloned/repo/nasdaq-data-link-mcp

6. Install the MCP Server

mcp install nasdaq_data_link_mcp_os/server.py --env-file .env --name "Nasdaq Data Link MCP Server" --with nasdaq-data-link --with pycountry

This registers the server with your MCP client (e.g., Claude Desktop).


🛠️ Tools

After installation, the following tools are exposed to MCP clients:


📈 Retail Trading Activity Tracker

get_rtat10

Retrieves Retail Trading Activity Tracker 10 (RTAT10) data for specific dates and optional tickers.

{
  "action": "tool",
  "name": "get_rtat10",
  "params": {
    "dates": "2025-03-31,2025-03-28,2025-03-27",
    "tickers": "TSLA,TQQQ,SQQQ"
  }
}

Returns RTAT10 data from Nasdaq Data Link for the given dates and tickers.


get_rtat

Retrieves Retail Trading Activity (RTAT) data for specific dates and optional tickers.

{
  "action": "tool",
  "name": "get_rtat",
  "params": {
    "dates": "2025-03-31,2025-03-28,2025-03-27",
    "tickers": "TSLA,TQQQ,SQQQ"
  }
}

Returns RTAT data from Nasdaq Data Link for the given dates and tickers.


📊 World Bank Tools

get_indicator_value

Fetch the value for a specific indicator and country.

{
  "action": "tool",
  "name": "get_indicator_value",
  "params": {
    "country": "Italy",
    "indicator": "NY.GDP.MKTP.CD"
  }
}

Returns the latest value for that indicator.


country_code

Returns the ISO 3-letter country code (e.g., "ITA" for Italy).

{
  "action": "tool",
  "name": "country_code",
  "params": {
    "countryName": "Italy"
  }
}

list_worldbank_indicators

Returns a list of all 1500+ indicators available.

{
  "action": "tool",
  "name": "list_worldbank_indicators"
}

search_worldbank_indicators

Searches for indicators by keyword.

{
  "action": "tool",
  "name": "search_worldbank_indicators",
  "params": {
    "keyword": "population"
  }
}

📈 Equities 360 Tools

get_stock_stats

Retrieves comprehensive statistics for a company from the Nasdaq Equities 360 database.

{
  "action": "tool",
  "name": "get_stock_stats",
  "params": {
    "symbol": "MSFT"
  }
}

Or using FIGI:

{
  "action": "tool",
  "name": "get_stock_stats",
  "params": {
    "figi": "BBG000BPH459"
  }
}

Returns company statistics including market cap, PE ratio, 52-week highs/lows, dividend information, and more.


list_stock_stat_fields

Lists all available fields in the stock statistics database with descriptions.

{
  "action": "tool",
  "name": "list_stock_stat_fields"
}

Returns information about all available fields that can be queried through the get_stock_stats tool.


get_fundamental_data

Retrieves fundamental financial data from the Nasdaq Equities 360 Fundamental Summary database.

{
  "action": "tool",
  "name": "get_fundamental_data",
  "params": {
    "symbol": "MSFT",
    "dimension": "MRY"
  }
}

Or using multiple parameters:

{
  "action": "tool",
  "name": "get_fundamental_data",
  "params": {
    "figi": "BBG000BPH459",
    "calendardate": "2022-12-31",
    "dimension": "MRQ"
  }
}

Returns fundamental data including profitability ratios (ROA, ROE, ROS), valuation metrics (P/E, P/S), income statement items (revenue, gross profit), and financial health indicators (current ratio, debt-to-equity).


list_fundamental_fields

Lists all available fields in the fundamental summary database with descriptions.

{
  "action": "tool",
  "name": "list_fundamental_fields"
}

Returns information about all available fields that can be queried through the get_fundamental_data tool.


get_detailed_financials

Retrieves detailed financial data from the Nasdaq Equities 360 Fundamental Details database.

{
  "action": "tool",
  "name": "get_detailed_financials",
  "params": {
    "symbol": "MSFT",
    "dimension": "MRQ"
  }
}

Or using multiple parameters:

{
  "action": "tool",
  "name": "get_detailed_financials",
  "params": {
    "figi": "BBG000BPH459",
    "calendardate": "2022-12-31",
    "dimension": "MRY"
  }
}

Returns comprehensive financial statement data including balance sheet items (assets, liabilities, equity), income statement components (revenue, expenses, profit), cash flow details (operating, investing, financing), and detailed financial ratios.


list_detailed_financial_fields

Lists all available fields in the fundamental details database with descriptions.

{
  "action": "tool",
  "name": "list_detailed_financial_fields"
}

Returns information about all available fields that can be queried through the get_detailed_financials tool.


get_balance_sheet_data

Retrieves balance sheet data from the Nasdaq Equities 360 Balance Sheet database.

{
  "action": "tool",
  "name": "get_balance_sheet_data",
  "params": {
    "symbol": "MSFT",
    "dimension": "MRQ"
  }
}

Or using multiple parameters:

{
  "action": "tool",
  "name": "get_balance_sheet_data",
  "params": {
    "figi": "BBG000BPH459",
    "calendardate": "2022-12-31",
    "dimension": "MRY"
  }
}

Returns comprehensive balance sheet data including assets (current, non-current, intangible), liabilities (current, non-current, debt), stockholders' equity, and key balance sheet metrics.


list_balance_sheet_fields

Lists all available fields in the balance sheet database with descriptions.

{
  "action": "tool",
  "name": "list_balance_sheet_fields"
}

Returns information about all available fields that can be queried through the get_balance_sheet_data tool.


get_cash_flow_data

Retrieves cash flow statement data from the Nasdaq Equities 360 Cash Flow database.

{
  "action": "tool",
  "name": "get_cash_flow_data",
  "params": {
    "symbol": "MSFT",
    "dimension": "MRQ"
  }
}

Or using multiple parameters:

{
  "action": "tool",
  "name": "get_cash_flow_data",
  "params": {
    "figi": "BBG000BPH459",
    "calendardate": "2022-12-31",
    "dimension": "MRY"
  }
}

Returns cash flow statement data including operating activities (ncfo), investing activities (ncfi), financing activities (ncff), free cash flow (fcf), capital expenditures (capex), and more.


list_cash_flow_fields

Lists all available fields in the cash flow statement database with descriptions.

{
  "action": "tool",
  "name": "list_cash_flow_fields"
}

Returns information about all available fields that can be queried through the get_cash_flow_data tool.


get_corporate_action_data

Retrieves corporate actions data from the Nasdaq Equities 360 Corporate Actions database.

{
  "action": "tool",
  "name": "get_corporate_action_data",
  "params": {
    "symbol": "TSLA",
    "action": "split"
  }
}

Or using other parameters:

{
  "action": "tool",
  "name": "get_corporate_action_data",
  "params": {
    "date": "2023-03-24"
  }
}

Returns information about corporate events such as stock splits, mergers, acquisitions, and other significant company actions that can affect stock price and ownership.


list_corporate_action_fields

Lists all available fields in the corporate actions database with descriptions.

{
  "action": "tool",
  "name": "list_corporate_action_fields"
}

Returns information about all available fields that can be queried through the get_corporate_action_data tool.


get_company_reference_data

Retrieves company reference data from the Nasdaq Equities 360 Reference Data database.

{
  "action": "tool",
  "name": "get_company_reference_data",
  "params": {
    "symbol": "AMD"
  }
}

Or using FIGI:

{
  "action": "tool",
  "name": "get_company_reference_data",
  "params": {
    "figi": "BBG000BBQCY0"
  }
}

Returns static information about companies including exchange, industry, sector classification, website URLs, SEC filing links, and location information.


list_reference_data_fields

Lists all available fields in the company reference database with descriptions.

{
  "action": "tool",
  "name": "list_reference_data_fields"
}

Returns information about all available fields that can be queried through the get_company_reference_data tool.


🧪 MCP Dev & Debugging

To test the server locally with a UI:

mcp dev nasdaq_data_link_mcp_os/server.py --env-file .env

This opens the MCP Dev interface where you can call tools manually, inspect results, and troubleshoot.


📊 Architecture Diagram

graph TD
  subgraph "Local Machine"
    A[MCP Server: Nasdaq Data Link MCP] --> C[MCP Client, ie. Claude Desktop]
  end

  C -->|user prompt| D[LLM ie. Claude 3.7 Sonnet]
  D -->|calls tool| A
  A -->|fetches data| B[Nasdaq Data Link API]
  B -.-> E[Retail Trading Activity Tracker]
  B -.-> F[World Bank Metadata]
  
  subgraph " "
    G[Statistics NDAQ/STAT]
    H[Fundamentals NDAQ/FS]
    I[Fundamental Details NDAQ/FD]
    J[Balance Sheet NDAQ/BS]
    K[Cash Flow NDAQ/CF]
    L[Corporate Actions NDAQ/CA]
    M[Reference Data NDAQ/RD]
  end

B -.->|Equities 360| G

📚 References


📄 License

MIT License © 2025 Stefano Amorelli

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • JackKuo666
  • 🔍使AI助手可以通过简单的MCP接口搜索和访问PYPI软件包信息。

    Reviews

    1 (1)
    Avatar
    user_XVlO61xQ
    2025-04-18

    As a dedicated user of nasdaq-data-link-mcp, I must say it’s an impressive tool for accessing Nasdaq data efficiently. The integration is seamless, and the documentation by stefanoamorelli is straightforward, making it easy to use for both beginners and advanced users. Highly recommend checking it out on GitHub!