NA

Nasdaq Data Link MCP Server for Financial Datasets

Access Nasdaq Data Link financial and economic datasets via an MCP server to explore, query, and interact with comprehensive market data.

Quick Install
npx -y @stefanoamorelli/nasdaq-data-link-mcp

Overview

The Nasdaq Data Link MCP Server exposes Nasdaq Data Link (formerly Quandl) financial and economic datasets through a Model Context Protocol (MCP) compatible service. It acts as a lightweight bridge between LLM-based agents or other MCP-aware clients and Nasdaq Data Link’s dataset API, translating dataset discovery and retrieval actions into structured tool calls that can be invoked by models or developer tooling.

This server is useful when you want programmatic, model-driven access to time series, tables, and metadata for equities, macroeconomic indicators, and alternative datasets. Instead of having an agent directly manage API calls and rate limits, the MCP server encapsulates dataset operations (search, metadata, timeseries extraction, pagination) and returns structured results suitable for downstream analysis, visualization, or model prompting.

Features

  • Exposes Nasdaq Data Link datasets through an MCP-compatible server interface
  • Dataset discovery: search and list datasets by ticker, keyword, or provider
  • Metadata retrieval: schema, column definitions, frequency, date ranges
  • Time series and table extraction with date range and pagination support
  • JSON-structured outputs that are friendly for LLM tool integration
  • Lightweight, easy to deploy (Docker / local Python) and configurable via environment variables
  • Simple health and status endpoints for monitoring
  • Optional caching to reduce repeated API calls and respect rate limits

Installation / Configuration

Clone the repo, create a virtual environment, and install dependencies:

git clone https://github.com/stefanoamorelli/nasdaq-data-link-mcp.git
cd nasdaq-data-link-mcp
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Set your Nasdaq Data Link API key (required). You can export it as an environment variable or put it into a config file:

export NASDAQ_DATA_LINK_API_KEY="your_api_key_here"
# Optional: change default port
export MCP_SERVER_PORT=3333

Run the server (example uses uvicorn for a FastAPI app):

uvicorn app.main:app --host 0.0.0.0 --port ${MCP_SERVER_PORT:-3333} --reload

Or run with Docker:

docker build -t ndl-mcp .
docker run -e NASDAQ_DATA_LINK_API_KEY=$NASDAQ_DATA_LINK_API_KEY -p 3333:3333 ndl-mcp

Configuration options (typical environment variables)

  • NASDAQ_DATA_LINK_API_KEY — required. Your Nasdaq Data Link API key.
  • MCP_SERVER_PORT — optional. TCP port the server listens on (default 3333).
  • CACHE_TTL — optional. Cache time-to-live in seconds.
  • LOG_LEVEL — optional. Server logging verbosity.

Available Tools / Resources

The server provides both an MCP-compatible toolset and a small REST API for direct use. Typical available tools:

  • list_datasets — list datasets or search by query, provider, or tag
  • get_metadata — retrieve dataset metadata (columns, frequency, description)
  • get_timeseries — fetch timeseries data with start/end date and pagination
  • get_table — retrieve table-style datasets (paged)
  • latest_value — return the most recent datapoint for a time series
  • health — server health/status

Common HTTP endpoints (examples):

EndpointPurpose
GET /healthCheck server status
GET /datasets?query=…Search/list datasets
GET /datasets/{dataset_id}/metadataGet metadata for a dataset
GET /datasets/{dataset_id}/data?start=YYYY-MM-DD&end=YYYY-MM-DDFetch time series or table data

If your LLM platform supports MCP natively, you can register the server’s MCP descriptor (OpenAPI-like) so the model can call these tools directly.

Use Cases

  • Exploratory data analysis: Quickly query historical prices, dividends, economic indicators, or macro time series and feed results into notebooks or analysis pipelines.
    • Example: Use get_timeseries to pull daily close prices for “WIKI/AAPL” from 2020-01-01 to 2021-01-01, then compute returns.
  • Model-driven research assistants: Connect an LLM to the MCP server so it can discover datasets and retrieve only the relevant series to answer financial questions, reducing hallucination risk.
    • Example: An analyst asks a chat agent for “the last 5 years of CPI-U monthly values”. The agent calls list_datasets to find CPI series, then get_timeseries with appropriate date range.
  • Automated reporting and alerts: Create scheduled jobs that pull the latest macro or market indicators and generate summaries or trigger alerts based on thresholds.
    • Example: Use latest_value on a GDP series to compute quarter-over-quarter changes and alert on large deviations.
  • Backtesting pipelines: Provide cleaned historical series to algorithmic trading backtests without direct handling of Nasdaq Data Link API details (pagination, formats, rate limiting).

Examples

Fetch metadata for a dataset (curl):

curl -s "http://localhost:3333/datasets/WIKI/AAPL/metadata" | jq

Fetch time series for a date range:

curl -s "http://localhost:3333/datasets/WIKI/AAPL/data?start=2020-01-01&end=2020-12-31" | jq

Health check:

curl http://localhost:3333/health
# { "status": "ok", "uptime": "2h34m" }

Notes

  • Ensure you keep your API key secure; do not commit it to source control.
  • Respect Nasdaq Data Link usage policies and rate limits; use the server’s caching options to reduce repeated requests.

For source code, issues, and contribution guidelines, see the project repository: https://github.com/stefanoamorelli/nasdaq-data-link-mcp