Skip to main content
Glama
Fernanda0187

Stock Trade MCP Server

by Fernanda0187

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).

Related MCP Connectors

  • Your agent needs markets — prices and fundamentals for listed companies, the filings behind them, crypto, and what the prediction markets put the odds at. **What you can ask for** • "Pull this company's income statement, cash flow and balance sheet for the last 8 quarters." • "What did insiders buy or sell, and when?" • "Snapshot prices for these 50 tickers, then the OHLC history for the three that moved." • "What are the current odds on this event across Kalshi and Polymarket?" • "Screen for companies matching these financial criteria." **How to use it** Point any MCP client at https://mcp.aisa.one/finance/mcp and sign in with OAuth — there is no key to create or paste. 49 tools: prices and snapshots, income statements, balance sheets and cash flows, metrics and ratios, earnings and analyst estimates, filings and line-item search, insider trades, macro interest rates, news, a screener; CoinGecko spot prices, market tables, OHLC, per-venue tickers and trending; Kalshi and Polymarket markets and trades; plus EDINET filings for Japan. **Why this rather than the source** Equities, crypto and event markets behind one account, so a cross-asset question is one conversation. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Read the number here, then ask the same agent what X is saying about the ticker today — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/marketpulse/mcp · /crypto-market-data/mcp · /prediction-market-data/mcp · /stock-pulse/mcp for one slice each.

  • Tiingo MCP — wraps the Tiingo financial API (tiingo.com)

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

  • Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Provides live financial data for any LLM agent, including stock quotes, crypto prices, SEC filings, XBRL financials, FX rates, and macro indicators, through ten MCP tools.
    2
    11
    77 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables programmatic access to Tiingo financial data including stock prices, news, forex, fundamentals, dividends, and splits. Allows users to query and retrieve these financial datasets through the MCP protocol.
    -
  • 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.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Exposes Tiingo API endpoints as MCP tools, enabling retrieval of end-of-day and intraday prices, forex quotes, news articles, fundamental statements and metrics, dividend distributions and yields, and stock splits. It lets MCP clients query financial market data programmatically using a Tiingo API token.
    -