Skip to main content
Glama
Stock Trade MCP Server

Stock Trade MCP Server

by JesusRS1

Stock Trade MCP Server

A Model Context Protocol (MCP) server that exposes various Tiingo API endpoints as tools. This server allows programmatic access to financial data including stock prices, news, forex, fundamentals, and corporate actions via the MCP protocol.

Prerequisites

  • Node.js (v18 or later recommended)

  • npm (comes with Node.js)

  • A Tiingo API Key

  • MCP-compatible client or runner (e.g., VSCode extension, CLI)

Related MCP server: Stock Trade MCP Server

Setup

  1. Clone the repository or ensure you are in the project directory.

  2. Install dependencies:

    npm install
  3. Obtain Your Tiingo API Key: To use this server, you need a Tiingo API token.

    1. Register for a Tiingo account if you don't have one.

    2. Go to your Tiingo Account page and navigate to the API Token section (or directly visit: https://www.tiingo.com/account/api/token).

    3. Copy your API Token. You will need to provide this token to your MCP client to authenticate with the Tiingo API. Note: Programmatic registration or logins are not supported by Tiingo; the API token is the sole method for authentication.

  4. Set Tiingo API Key: This server requires your Tiingo API key. You can typically provide the API key in your MCP client's configuration (see "Running the Server" below for an example).

  5. Build the server:

    npm run build

    This will create a build directory with the compiled JavaScript code.

Running the Server

  • Via MCP runner: Configure your MCP client to run the server using stdio transport. You can provide the TIINGO_API_TOKEN in the env block of the configuration. Example MCP settings entry:

    "mcp-tiingo": {
      "transportType": "stdio",
      "command": "node",
      "args": [
        "/path/to/mcp-tiingo/build/index.js"
      ],
      "env": {
        "TIINGO_API_TOKEN": "YOUR_API_KEY_HERE"
      }
      // ... other optional settings ...
    }

    (Replace /path/to/mcp-tiingo and YOUR_API_KEY_HERE accordingly)

Available Tools

The server exposes the following Tiingo API endpoints as tools via MCP:

get_end_of_day_prices

  • Description: Fetches End-of-Day prices for a given ticker symbol with optional date range and format.

  • Key Inputs: ticker, startDate, endDate, resampleFreq

get_news

  • Description: Fetches news articles from Tiingo with various filtering options.

  • Key Inputs: tickers, tags, sources, startDate, endDate, limit

get_forex_prices

  • Description: Fetches historical intraday Forex prices for a given ticker symbol with optional date range and frequency.

  • Key Inputs: ticker, startDate, endDate, resampleFreq

get_forex_top_of_book

  • Description: Fetches real-time Forex Top-of-Book/Last data for one or more ticker symbols.

  • Key Inputs: ticker or tickers

get_fundamentals_definitions

  • Description: Fetches available fundamental metrics and their definitions.

  • Key Inputs: None

get_fundamentals_statements

  • Description: Fetches historical fundamental statement data (Balance Sheet, Income Statement, Cash Flow, Overview) for a given ticker.

  • Key Inputs: ticker, startDate, endDate, year, quarter

get_fundamentals_daily_metrics

  • Description: Fetches daily fundamental metrics for a given ticker.

  • Key Inputs: ticker, startDate, endDate, columns

get_fundamentals_meta

  • Description: Fetches fundamental meta data for companies.

  • Key Inputs: None

get_dividend_distributions

  • Description: Fetches historical dividend and distribution data for a given ticker.

  • Key Inputs: ticker, startExDate, endExDate

get_dividend_yield

  • Description: Fetches historical dividend yield data for a given ticker.

  • Key Inputs: ticker, startDate, endDate, columns

get_splits

  • Description: Fetches historical split data for a given ticker.

  • Key Inputs: ticker, startExDate, endExDate

Extending

To add more Tiingo API endpoints as tools:

  1. Create a new TypeScript file in src/tools/ defining the tool's name, description, input schema (using Zod), and handler function to call the Tiingo API.

  2. Import and add the tool definition object to the tiingoTools array in src/tools/index.ts.

  3. Rebuild the server (npm run build).

Available Tools

11 tools
get_dividend_distributionsB

Fetches historical dividend and distribution data for a given ticker.

Inputs: ticker (required), endExDate, startExDate.

get_dividend_yieldB

Fetches historical dividend yield data for a given ticker.

Inputs: ticker (required), columns, endDate, startDate.

get_end_of_day_pricesA

Fetches End-of-Day prices for a given ticker symbol with optional date range and format.

Inputs: ticker (required), endDate, startDate, resampleFreq.

get_forex_pricesA

Fetches historical intraday Forex prices for a given ticker symbol with optional date range and frequency.

Inputs: ticker (required), endDate, startDate, resampleFreq.

get_forex_top_of_bookA

Fetches real-time Forex Top-of-Book/Last data for one or more ticker symbols.

Inputs: ticker, tickers.

get_fundamentals_daily_metricsB

Fetches daily fundamental metrics for a given ticker.

Inputs: ticker (required), columns, endDate, startDate.

get_fundamentals_definitionsA

Fetches available fundamental metrics and their definitions.

Inputs: no named parameters.

get_fundamentals_metaB

Fetches fundamental meta data for companies.

Inputs: no named parameters.

get_fundamentals_statementsC

Fetches historical fundamental statement data (Balance Sheet, Income Statement, Cash Flow, Overview) for a given ticker.

Inputs: ticker (required), year, endDate, quarter, +1 more.

get_newsB

Fetches news articles from Tiingo with various filtering options.

Inputs: tags, limit, sortBy, topics, +6 more.

get_splitsB

Fetches historical split data for a given ticker.

Inputs: ticker (required), endExDate, startExDate.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct type of financial data (dividends, yield, end-of-day prices, forex, fundamentals, news, splits) with clear boundaries. Even the fundamental tools are differentiated by purpose (daily metrics, definitions, meta, statements).

    Naming Consistency5/5

    All tools follow the consistent pattern 'get_<data_type>' using snake_case. The naming is predictable and uniform across the entire tool set.

    Tool Count4/5

    With 11 tools, the count is appropriate for a financial data server. It covers multiple asset classes and data types without being excessive, though some users might expect a few more data retrieval endpoints.

    Completeness4/5

    The server covers a broad range of stock-related data (dividends, prices, fundamentals, news, splits) but lacks intraday or real-time stock prices (only forex has real-time data). It is mostly complete for historical and fundamental data.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      An MCP server that wraps the Tiingo financial data API, enabling access to stocks, forex, crypto, news, fundamentals, and corporate actions through natural language.
      17
      12
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables programmatic access to Tiingo financial data—including stock prices, news, forex, fundamentals, and corporate actions—through MCP tools.
      -