Marketstack MCP Server
The Marketstack MCP Server provides access to financial data via API endpoints, exposing them as MCP tools for integration into compatible systems. You can:
Retrieve end-of-day and intraday stock data for multiple tickers
Access stock splits, dividends, and ticker-specific details
List or search for supported tickers and exchanges
Obtain information about stock market indices
Access currency, timezone, and government bond data
Retrieve ETF tickers and their holdings
Benefit from in-memory caching to improve performance and respect API rate limits
Used for code linting as part of the MCP server implementation, configured via eslint.config.js.
Used for repository hosting and issue tracking for the MCP server project.
Provides the licensing for the project under the GNU General Public License.
Used as the compiled target language for the MCP server implementation.
Required runtime environment for the MCP server (v18 or later recommended).
Package manager used for installing dependencies and running build scripts.
Used for code formatting, configured via .prettierrc file.
Main programming language used for implementing the MCP server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Marketstack MCP Server get the latest stock price for Apple (AAPL)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Marketstack MCP Server
A Model Context Protocol (MCP) server that exposes various Marketstack API endpoints as MCP tools, providing access to financial data including end-of-day, intraday, splits, dividends, tickers, exchanges, currencies, timezones, bonds, and ETF data. This server simplifies integrating Marketstack data into MCP-compatible agents and systems.
Prerequisites
Node.js (v18 or later recommended)
npm (comes with Node.js)
Marketstack API key
(Optional) MCP-compatible client or runner (e.g., VSCode extension, CLI)
Related MCP server: Stock Trade MCP Server
Setup
Clone the repository or ensure you are in the project directory.
Install dependencies:
npm installConfiguration:
Obtain a Marketstack API key from https://marketstack.com/.
Configure the
MARKETSTACK_API_KEYenvironment variable via your MCP runner's settings. This is the recommended method for seamless integration with the MCP client. Avoid using.envfiles for this purpose when running via an MCP runner.
Building and Running
Build the server:
npm run buildThis will create a
builddirectory with the compiled JavaScript code.Run the server:
npm run startor directly:
node build/index.jsVia MCP runner: Configure your MCP client to run the server using stdio transport. Example MCP settings entry (adjust
/path/to/mcp-marketstackto your actual path and replaceYOUR_API_KEY_HEREwith your actual key):"marketstack": { "transportType": "stdio", "command": "node", "args": [ "/path/to/mcp-marketstack/build/index.js" ], "env": { "MARKETSTACK_API_KEY": "YOUR_API_KEY_HERE" } // ... other optional settings ... }
Available Tools
The server exposes Marketstack API endpoints as distinct MCP tools, categorized by function:
Market Data
Reference Data
Financial Instruments
Detailed input schemas and descriptions for each tool are automatically discoverable by MCP agents connecting to the server via introspection.
Project Structure
The project follows a modular structure:
.
├── src/
│ ├── index.ts # Server entry point
│ ├── marketstackClient.ts # Centralized API client with caching
│ ├── cacheConfig.ts # Cache TTL configurations
│ └── tools/
│ ├── index.ts # Registers all tool categories
│ ├── marketData/ # Market Data tools
│ │ └── ...
│ ├── referenceData/ # Reference Data tools
│ │ └── ...
│ ├── financialInstruments/ # Financial Instruments tools
│ │ └── ...
│ └── wrapToolHandler.ts # Wrapper for tool handlers
├── memory-bank/ # Project documentation
│ └── ...
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── eslint.config.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── LICENSE # Project license
└── README.md # This fileCaching
The server implements an in-memory Least Recently Used (LRU) cache for tool responses. This helps reduce redundant calls to the Marketstack API, improving performance and adhering to rate limits.
Mechanism: The cache stores responses based on the tool name and input parameters.
Configurable TTLs: Each tool has a configurable Time To Live (TTL) for its cached data, defined in
src/cacheConfig.ts. This allows for different caching durations based on the update frequency of the data provided by each Marketstack endpoint.
Licensing
This project is licensed under the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the LICENSE file for details.
Contributing
Contributions are welcome! Please follow the standard fork-and-pull request workflow.
Support
For issues or questions, please open an issue on the GitHub repository.
Available Tools
18 toolsget_bond_infoB
Get real-time government bond data for a specific country.
Inputs: country (required).
get_dividends_dataC
Look up information about the stock dividend for different symbols.
Inputs: symbols (required), date_from, date_to, limit, +2 more.
get_end_of_day_dataC
Obtain end-of-day data for one or multiple stock tickers.
Inputs: symbols (required), date_from, date_to, exchange, +3 more.
get_etf_holdingsC
Get complete set of exchange-traded funds data based on the unique identifier code of an ETF.
Inputs: ticker (required), date_from, date_to.
get_exchange_detailsC
Obtain information about a specific stock exchange.
Inputs: mic (required).
get_index_infoC
Get details for a specific stock market index.
Inputs: index (required).
get_intraday_dataB
Obtain intraday data for one or multiple stock tickers.
Inputs: symbols (required), after_hours, date_from, date_to, +5 more.
get_splits_dataC
Look up information about the stock splits factor for different symbols.
Inputs: symbols (required), date_from, date_to, limit, +2 more.
get_ticker_detailsC
Obtain information about a specific ticker symbol.
Inputs: symbol (required), exchange.
get_ticker_infoC
Look up information about tickers.
Inputs: ticker (required).
list_bonds_countriesB
List all supported countries for bond data.
Inputs: limit, offset.
list_currenciesC
Look up all currencies supported by the marketstack API.
Inputs: limit, offset.
list_etf_tickersC
List all supported ETF tickers.
Inputs: list (required), limit, offset.
list_exchangesB
Look up information any of the 2700+ stock exchanges supported by this endpoint.
Inputs: limit, offset, search.
list_exchange_tickersB
Obtain all available tickers for a specific exchange.
Inputs: mic (required), limit, offset.
list_indicesC
List all supported stock market indices.
Inputs: limit, offset.
list_tickersC
Get the full list of supported tickers.
Inputs: exchange, limit, offset, search.
list_timezonesC
Look up information about all supported timezones.
Inputs: limit, offset.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Every tool has a clearly distinct purpose targeting specific financial data types or listing operations, with no overlap in functionality. For example, get_end_of_day_data and get_intraday_data are clearly differentiated by time granularity, while list operations are separated by resource type.
All tools follow a consistent verb_noun pattern with 'get_' for retrieval operations and 'list_' for enumeration operations. The naming is perfectly predictable throughout the entire set, making it easy for agents to understand tool purposes from their names alone.
With 18 tools, the count is slightly high but reasonable for a comprehensive financial data API server. The tools cover multiple asset classes (stocks, bonds, ETFs, indices) and both retrieval and listing operations, justifying the number while maintaining focus on market data access.
The tool set provides excellent coverage for financial data retrieval across multiple asset types, with both detailed get operations and comprehensive list operations. Minor gaps might include historical data filtering parameters or batch operations, but core market data access is well-covered for the domain.
Maintenance
Related MCP Connectors
Market Data App MCP — wraps the Market Data App API (marketdata.app)
33 pay-per-call market and news data tools over MCP with free discovery and x402 payments.
MCP server for Financial Modeling Prep API with 250+ financial data tools
Finnhub MCP — wraps Finnhub Stock API (finnhub.io)
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables MCP clients to retrieve stock market and company financial data, including quotes, overviews, ratios, historical prices, income statements, and stock comparisons, via a set of tools.7-
- FlicenseNot gradedqualityAmaintenanceExposes 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.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to retrieve Tiingo financial data through tools for stock prices, news, forex, fundamentals, dividends, and splits.-
- FlicenseNot gradedqualityAmaintenanceExposes Tiingo API endpoints as MCP tools so users can programmatically retrieve end-of-day and intraday prices, forex quotes, news articles, fundamentals and corporate actions like dividends and splits for given tickers.-