Stock Trade MCP Server
An MCP server that provides tools to access Tiingo API data including stock prices, news, forex, fundamentals, and corporate actions.
README
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)
Setup
-
Clone the repository or ensure you are in the project directory.
-
Install dependencies:
npm install -
Obtain Your Tiingo API Key: To use this server, you need a Tiingo API token.
- Register for a Tiingo account if you don't have one.
- Go to your Tiingo Account page and navigate to the API Token section (or directly visit: https://www.tiingo.com/account/api/token).
- 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.
-
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).
-
Build the server:
npm run buildThis will create a
builddirectory 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_TOKENin theenvblock of the configuration. Example MCP settings entry:(Replace"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 ... }/path/to/mcp-tiingoandYOUR_API_KEY_HEREaccordingly)
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:
tickerortickers
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:
- 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. - Import and add the tool definition object to the
tiingoToolsarray insrc/tools/index.ts. - Rebuild the server (
npm run build).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。