Twelve Data MCP Server
OfficialUse Twelve Data’s financial API through MCP for market data, indicators, and fundamentals.
Query real-time and historical OHLC time series, prices, quotes, EOD, and cross rates.
Compute technical indicators: RSI, MACD, Bollinger Bands, SMA, EMA, ATR, ADX.
Retrieve company data: profile, statistics, earnings, dividends, splits, IPO calendar.
List instruments: stocks, ETFs, funds, forex pairs, cryptocurrencies, commodities, exchanges.
Convert currencies, get exchange rates, symbol search, market state, earliest timestamp, logos, API usage.
Connect via hosted OAuth server or self-host with API key over stdio/HTTP/Docker.
Supports containerized deployment through Docker, enabling portable and isolated execution of the Twelve Data 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., "@Twelve Data MCP Server show me Apple stock performance this week"
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.
Twelve Data MCP Server
Connect Claude, ChatGPT, and other AI assistants to the Twelve Data financial API — real-time and historical prices, 60+ technical indicators, fundamentals, earnings, dividends, ETFs, company news, market movers, and more.
You need a Twelve Data account. Sign up at twelvedata.com.
There are two ways to use it. Most people should use the cloud server (Option 1) — there is nothing to install.
Option 1 — Use our cloud server (recommended)
Connect your AI assistant to our hosted server:
https://mcp.twelvedata.com/mcpThat's it. No installation, no API key to copy and paste. When you connect, a browser window opens and you log in with your Twelve Data account — your personal API key is linked automatically and stays tied to your account.
How to add it
Claude (Desktop / Web) and ChatGPT support custom connectors / MCP servers:
Open your assistant's Connectors (or Integrations / MCP servers) settings.
Add a new connector with the URL
https://mcp.twelvedata.com/mcp.When prompted, click Connect / Log in — a Twelve Data login page opens in your browser.
Authorize, and you're done. Ask things like "What's the RSI for AAPL?" or "Show me TSLA's latest earnings."
The exact menu names differ between apps and versions, but the flow is always the same: add the URL, then log in via the browser popup.
The MCP host does not issue tokens. The connector URL is https://mcp.twelvedata.com/mcp. The client must follow that URL's protected-resource metadata to the authorization server named there. Do not point a connector at the host root (it answers 404), or at this host's /register or /.well-known/oauth-authorization-server.
Perplexity (custom remote connector)
Perplexity Pro, Max, and Enterprise users can add the hosted server as a custom remote connector. That is a per-account setup, not a listing in Perplexity's public curated directory.
In Perplexity, open Account settings → Connectors → + Custom connector and select Remote. On Enterprise, an admin may need to allow custom connectors first.
Set Name to
Twelve Dataand MCP Server URL tohttps://mcp.twelvedata.com/mcp.Choose OAuth for authentication and Streamable HTTP for transport. Leave the Client ID and Client Secret blank so Perplexity can use dynamic client registration on the authorization server named in the server's protected-resource metadata.
Accept Perplexity's custom connector acknowledgement and click Add. Then click the Twelve Data connector card to start authentication, sign in to your Twelve Data account, and authorize access.
Once the connector is enabled, try these prompts:
"Use Twelve Data to find the AAPL symbol."
"Use Twelve Data to get the latest quote for AAPL, including price and volume."
"Use Twelve Data to show the last five daily closing prices for AAPL."
"Use Twelve Data to show AAPL RSI."
Each person signs in with their own Twelve Data account. If an Enterprise admin shares the connector, require individual authentication for each member. Do not paste a Twelve Data API key into the connector's API Key authentication field.
If the OAuth window is blocked, login fails, or tools stop after idle time, open the Twelve Data connector, disable it, enable it again, and sign in. Reconnect this way rather than switching the connector to API Key auth. Confirm the URL is exactly https://mcp.twelvedata.com/mcp with no trailing slash, and that the Twelve Data plan includes the requested data. See Perplexity's custom remote connector guide for the current settings screens.
Codex (CLI, desktop, and IDE)
Add the hosted MCP server to Codex without installing this repository or copying an API key:
codex mcp add twelvedata --url https://mcp.twelvedata.com/mcp
codex mcp listThe add command starts OAuth: complete the Twelve Data sign-in in your browser. If you need to authorize again later, run codex mcp login twelvedata. In Codex, use /mcp to check the connection, then ask: "Use Twelve Data to get the latest quote for AAPL." and "Use Twelve Data to show AAPL RSI." To disconnect, run codex mcp remove twelvedata.
The public plugin repository is https://github.com/MazeBraker/twelvedata-skills. It installs the skills and the same hosted MCP:
codex plugin marketplace add https://github.com/MazeBraker/twelvedata-skills
codex plugin add twelvedata@twelvedata-skillsRelated MCP server: Stocks MCP Server
Option 2 — Run it yourself with an API key
Prefer to run the server on your own machine? You only need your Twelve Data API key — no OAuth setup. Get it at twelvedata.com → your dashboard → API Keys.
1. Install
Requires Python 3.10+ (3.12 recommended; on macOS brew install python@3.12 or make python-install).
make install2. Add your API key
Create a .env file in the project root with your key, readable only by you:
echo 'TWELVE_DATA_API_KEY=your_api_key_here' > .env
chmod 600 .envThe server reads the key from .env and every request uses it. No login step needed.
3. Connect over stdio
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"twelvedata": {
"command": "/path/to/mcp/.venv/bin/python",
"args": ["/path/to/mcp/src/server.py"]
}
}
}Use the .venv/bin/python path (not the system Python — macOS ships 3.9, and this server needs 3.10+). Restart Claude Desktop after editing the config.
Claude Code:
claude mcp add twelvedata -- /path/to/mcp/.venv/bin/python /path/to/mcp/src/server.py4. Connect over HTTP
make run # serves http://localhost:8000/mcpclaude mcp add --transport http twelvedata http://localhost:8000/mcp5. Run it in Docker
docker build -t twelvedata-mcp .
docker run --rm --env-file .env -p 127.0.0.1:8000:8000 twelvedata-mcp--env-file keeps the key out of your shell history. Connect to http://localhost:8000/mcp as in step 4. OAuth login is not supported in Docker.
6. Security
make runand Docker serve/mcpwith no authentication, on0.0.0.0by default.Every call is served under your credential.
Anyone who reaches the port can call
auth_statusandoauth_configure. That includes a web page you open, through DNS rebinding, because the default bind checks neither theHostnor theOriginheader.MCP_HOST=127.0.0.1 make runkeeps the server local and turns on the MCP SDK'sHostandOrigincheck.With
MCP_HOST=127.0.0.1, ngrok works only when started with--host-header=rewrite.
7. Troubleshooting
Call auth_status from your client first. It shows whether an API key is configured, the stored token, the detected host and the redirect URI — usually enough to see what is missing.
What you can ask
Prices — stocks, ETFs, forex, crypto, commodities (real-time & historical)
Technical indicators — RSI, MACD, SMA, BBANDS, ATR, and 60+ more
Fundamentals — financial statements, earnings, dividends, splits, company profiles, market cap, key stats, IPO calendar
Funds — ETF & mutual fund profiles, performance, holdings, risk
News — company news & press releases
Market intelligence — movers, exchange rates, analyst ratings, price targets
Regulatory — SEC/EDGAR filings, insider transactions, institutional holdings
Symbol formats: stocks AAPL, crypto BTC/USD, forex EUR/USD.
Partners
Running your own public instance or setting up a dedicated OAuth login? That's a partner arrangement — reach out to us at twelvedata.com and we'll provide the setup guide and OAuth credentials.
Available Tools
35 toolsGetApiUsageCInspect
This endpoint will provide information on the current usage of Twelve Data API.
Inputs: params (required).
GetCommoditiesCInspect
This API call returns an array of commodity pairs available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetCrossListingsCInspect
This API call returns an array of cross listed symbols for a specified instrument. Cross listings are the same securities listed on different exchanges. This list is updated daily.
Inputs: params (required).
GetCryptocurrenciesCInspect
This API call returns an array of cryptocurrencies available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetCryptocurrencyExchangesCInspect
This API call returns an array of cryptocurrency exchanges available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetCurrencyConversionCInspect
This API call returns real-time exchange rate and converted amount for currency pair. Works with forex and cryptocurrency.
Inputs: params (required).
GetDividendsCInspect
Returns the amount of dividends paid out for the last 10+ years.
Inputs: params (required).
GetEarliestTimestampCInspect
This method returns the first available DateTime for a given instrument at the specific interval.
Inputs: params (required).
GetEarningsCInspect
This API call returns earnings data for a given company, including EPS estimate and EPS actual. Earnings are available for complete company history.
Inputs: params (required).
GetEodCInspect
This endpoint returns the latest End of Day (EOD) price of an instrument.
Inputs: params (required).
GetEtfCInspect
This API call returns an array of ETFs available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetExchangeRateCInspect
This API call returns real-time exchange rate for currency pair. Works with forex and cryptocurrency.
Inputs: params (required).
GetExchangesCInspect
This API call returns an array of stock or ETF exchanges available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetForexPairsCInspect
This API call returns an array of forex pairs available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetFundsCInspect
This API call returns an array of funds available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetIpoCalendarCInspect
This endpoint returns past, today, or upcoming IPOs.
Inputs: params (required).
GetMarketStateCInspect
Check the state of all available exchanges, time to open, and time to close. Returns all available stock exchanges by default.
Inputs: params (required).
GetPriceCInspect
This endpoint is a lightweight method that allows retrieving only the real-time price of the selected instrument.
Inputs: params (required).
GetProfileDInspect
Returns general information about the company.
Inputs: params (required).
GetQuoteCInspect
Quote endpoint is an efficient method to retrieve the latest quote of the selected instrument.
Inputs: params (required).
GetSplitsCInspect
Returns the date and the split factor of shares of the company for the last 10+ years.
Inputs: params (required).
GetStatisticsCInspect
Returns current overview of company’s main statistics including valuation metrics and financials.
Inputs: params (required).
GetStocksCInspect
This API call returns an array of symbols available at Twelve Data API. This list is updated daily.
Inputs: params (required).
GetSymbolSearchCInspect
This method helps to find the best matching symbol. It can be used as the base for custom lookups. The response is returned in descending order, with the most relevant instrument at the beginning.
Inputs: params (required).
GetTechnicalIndicatorsCInspect
This API call returns an array of objects with available technical indicators. This endpoint might be used to build an abstract interface to make more convenient API calls from the application.
Inputs: params (required).
GetTimeSeriesCInspect
This API call returns meta and time series for the requested instrument. Metaobject consists of general information about the requested symbol. Time series is the array of objects ordered by time descending with Open, High, Low, Close prices. Non-currency instruments also include volume information.
Inputs: params (required).
GetTimeSeriesAdxCInspect
The Average Directional Index (ADX) measures the strength of a trend, regardless of direction, helping traders determine if a market is trending or ranging.
Inputs: params (required).
GetTimeSeriesAtrDInspect
The Average True Range (ATR) is a volatility indicator that measures the average range of price movement over a specified period, helping traders assess market volatility.
Inputs: params (required).
GetTimeSeriesBBandsDInspect
Bollinger Bands (BBANDS) are volatility bands placed above and below a moving average, measuring price volatility and helping traders identify potential overbought or oversold conditions.
Inputs: params (required).
GetTimeSeriesCrossCInspect
This API call returns meta and cross rate time series for the requested instruments. Metaobject consists of general information about the requested symbol. Time series is the array of objects ordered by time descending with Open, High, Low, Close prices. Works with stocks, forex and cryptocurrency.
Inputs: params (required).
GetTimeSeriesEmaDInspect
The Exponential Moving Average (EMA) is a weighted moving average that gives more importance to recent price data, making it more responsive to new information and helping traders identify trends and potential entry or exit points.
Inputs: params (required).
GetTimeSeriesMacdDInspect
The Moving Average Convergence Divergence (MACD) is a momentum indicator that measures the difference between two moving averages, with a signal line used to identify potential trend reversals and trading opportunities.
Inputs: params (required).
GetTimeSeriesRsiDInspect
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements, helping traders identify potential overbought or oversold conditions and trend reversals.
Inputs: params (required).
GetTimeSeriesSmaDInspect
The Simple Moving Average (SMA) is a smoothing indicator that calculates the average price of a security over a specified period, helping traders identify trends and potential support or resistance levels.
Inputs: params (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Most tools have distinct purposes targeting specific data types or analyses, but there is some overlap between GetPrice, GetQuote, and GetEod for price data, and between GetExchangeRate and GetCurrencyConversion for currency rates. Descriptions help differentiate them, but an agent might occasionally misselect among these similar tools.
All tool names follow a consistent 'Get' + noun or noun phrase pattern in PascalCase, such as GetApiUsage, GetCommodities, and GetTimeSeriesRsi. This uniformity makes the tool set predictable and easy to navigate.
With 35 tools, the count is high for a financial data server, bordering on heavy. While it covers many endpoints, it may overwhelm agents with too many options, especially given the overlap in some areas, making it less well-scoped than ideal.
The tool set provides comprehensive coverage for financial data retrieval, including stocks, commodities, cryptocurrencies, forex, ETFs, technical indicators, and metadata like dividends and earnings. There are no obvious gaps; it supports a wide range of queries and analyses without dead ends.
Maintenance
Related MCP Connectors
Global prices, fundamentals and holdings data for stocks, ETFs and funds, built for AI agents.
Stock quotes, charts, financials, options, SEC filings, crypto and macro data. Hosted, no API key.
Central bank exchange rates and financial indicators via the OpenTickers API.
11Global equities, ETFs, FX & crypto quotes, OHLCV history, fundamentals, technicals & options Greeks
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides comprehensive financial market data and news through the Finnhub API. Enables real-time stock quotes, company profiles, financial metrics, analyst recommendations, and market news access.1MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time access to financial market data including stock quotes, company information, cryptocurrency exchange rates, historical options chains, and time series data through the Alpha Vantage API.-
- AlicenseCqualityDmaintenanceProvides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.10025 PyPI74Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceProvides backtesting-compliant financial data including company financials, historical stock and crypto prices, and news with sentiment analysis from financialdatasets.ai API.-