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 What's the current price of gold?"
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
An MCP (Model Context Protocol) server for fetching real-time and historical market data including forex, precious metals (XAUUSD, XAGUSD), cryptocurrencies, and stocks using the Twelve Data API.
Features
📈 Real-time prices for forex, metals, crypto, and stocks
📊 OHLC time series data with multiple intervals (1min to monthly)
💱 Currency conversion between any supported pairs
📉 Technical indicators (RSI, MACD, SMA, EMA, Bollinger Bands, etc.)
🏆 Commodities listing (precious metals, energy, agricultural)
⚡ Low latency (~170ms average)
🆓 Free tier available (8 API credits/minute, 800/day)
Related MCP server: Stocks MCP Server
Supported Symbols
Precious Metals
XAU/USD- Gold SpotXAG/USD- Silver SpotXPT/USD- Platinum SpotXPD/USD- Palladium Spot
Major Forex Pairs
EUR/USD,GBP/USD,USD/JPY,USD/CHFAUD/USD,USD/CAD,NZD/USDAnd 140+ more currency pairs
Cryptocurrencies
BTC/USD,ETH/USD,XRP/USDAnd many more from 180+ exchanges
Stocks
All US exchanges (NASDAQ, NYSE)
90+ international exchanges
Installation
cd twelvedata-mcp-server
npm install
npm run buildConfiguration
Get Your API Key
Sign up for free at https://twelvedata.com/
Get your API key from the dashboard
Set the environment variable:
export TWELVEDATA_API_KEY="your_api_key_here"Claude Desktop Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"twelvedata": {
"command": "node",
"args": ["/path/to/twelvedata-mcp-server/dist/index.js"],
"env": {
"TWELVEDATA_API_KEY": "your_api_key_here"
}
}
}
}Available Tools
twelvedata_get_price
Get real-time price for any symbol.
"Get the current gold price" → symbol: "XAU/USD"
"EURUSD price" → symbol: "EUR/USD"twelvedata_get_quote
Get detailed quote with OHLC, change, volume.
"Full quote for silver" → symbol: "XAG/USD"twelvedata_get_time_series
Get historical OHLC candlestick data.
"Get 1-hour gold candles" → symbol: "XAU/USD", interval: "1h"
"Daily EURUSD last 100 days" → symbol: "EUR/USD", interval: "1day", outputsize: 100twelvedata_convert_currency
Convert amounts between currencies.
"Convert 1000 USD to EUR" → from: "USD", to: "EUR", amount: 1000
"1 oz gold in USD" → from: "XAU", to: "USD", amount: 1twelvedata_get_exchange_rate
Get exchange rate for a currency pair.
"EUR/USD exchange rate" → symbol: "EUR/USD"twelvedata_list_commodities
List all available commodities.
"What metals can I trade?"twelvedata_technical_indicator
Calculate technical indicators.
"RSI for gold" → symbol: "XAU/USD", indicator: "rsi"
"MACD for EURUSD" → symbol: "EUR/USD", indicator: "macd"
"20-period SMA" → indicator: "sma", time_period: 20Supported indicators: SMA, EMA, WMA, RSI, MACD, BBANDS, STOCH, ADX, ATR, CCI, OBV, MOM, ROC, WILLR
API Rate Limits
Plan | API Credits/min | Daily Limit | WebSocket |
Free | 8 | 800/day | Trial only |
Grow | 55-377 | Unlimited | Trial only |
Pro | 610-1597 | Unlimited | ✅ |
Ultra | 2584-10946 | Unlimited | ✅ |
Running the Server
Stdio Transport (default)
TWELVEDATA_API_KEY="your_key" npm startHTTP Transport
TWELVEDATA_API_KEY="your_key" TRANSPORT=http PORT=3000 npm startDevelopment
# Build
npm run build
# Watch mode (rebuild on changes)
npm run devExample Usage
Once configured with Claude Desktop:
"What's the current gold price?"
"Show me the last 50 1-hour candles for XAUUSD"
"Calculate RSI for EUR/USD on the daily timeframe"
"Convert 5000 USD to EUR"
"Get a detailed quote for silver"
License
MIT
Credits
Data provided by Twelve Data
Available Tools
5 toolstwelvedata_convert_currencyConvert CurrencyARead-onlyIdempotent
Convert an amount from one currency to another using real-time rates.
Supports fiat currencies, precious metals (XAU, XAG), and cryptocurrencies.
Args:
from (string): Source currency code (e.g., "USD", "EUR", "XAU", "BTC")
to (string): Target currency code
amount (number): Amount to convert
response_format ('markdown' | 'json'): Output format
Returns: Converted amount with exchange rate.
Examples:
"Convert 1000 USD to EUR" -> from: "USD", to: "EUR", amount: 1000
"How much is 1 oz gold in USD?" -> from: "XAU", to: "USD", amount: 1
"Convert 0.5 BTC to USD" -> from: "BTC", to: "USD", amount: 0.5
Inputs: to (required), from (required), amount (required), response_format.
twelvedata_get_exchange_rateGet Exchange RateARead-onlyIdempotent
Get the current exchange rate for a currency pair.
Args:
symbol (string): Currency pair (e.g., "EUR/USD", "XAU/USD")
response_format ('markdown' | 'json'): Output format
Returns: Current exchange rate with timestamp.
Examples:
"EUR/USD exchange rate" -> symbol: "EUR/USD"
"Gold rate" -> symbol: "XAU/USD"
Inputs: symbol (required), response_format.
twelvedata_get_priceGet Real-Time PriceARead-onlyIdempotent
Get the current real-time price for any trading symbol.
Supports forex pairs, precious metals, crypto, and stocks. This is the fastest endpoint for getting current prices.
Symbols examples:
Metals: XAU/USD (gold), XAG/USD (silver), XPT/USD (platinum)
Forex: EUR/USD, GBP/USD, USD/JPY
Crypto: BTC/USD, ETH/USD
Stocks: AAPL, MSFT, GOOGL
Args:
symbol (string): Trading symbol (e.g., "XAU/USD", "EUR/USD", "BTC/USD")
response_format ('markdown' | 'json'): Output format
Returns: Current price of the symbol.
Examples:
"What's the current gold price?" -> symbol: "XAU/USD"
"Get EURUSD price" -> symbol: "EUR/USD"
"Bitcoin price now" -> symbol: "BTC/USD"
Inputs: symbol (required), response_format.
twelvedata_get_quoteGet Detailed QuoteARead-onlyIdempotent
Get comprehensive quote data including OHLC, change, volume, and 52-week range.
More detailed than get_price - includes open, high, low, close, previous close, change percentage, and market status.
Args:
symbol (string): Trading symbol (e.g., "XAU/USD", "EUR/USD")
response_format ('markdown' | 'json'): Output format
Returns: Detailed quote with:
Current price (close)
Open, High, Low
Previous close
Change and percent change
Volume (if available)
52-week range (if available)
Market open/closed status
Examples:
"Get full gold quote" -> symbol: "XAU/USD"
"EURUSD detailed info" -> symbol: "EUR/USD"
Inputs: symbol (required), response_format.
twelvedata_get_time_seriesGet OHLC Time SeriesARead-onlyIdempotent
Get historical OHLC (Open, High, Low, Close) candlestick data.
Perfect for chart analysis, backtesting, and historical price research. Supports multiple timeframes from 1-minute to monthly data.
Args:
symbol (string): Trading symbol
interval (string): Candle interval - "1min", "5min", "15min", "30min", "1h", "4h", "1day", "1week", "1month"
outputsize (number): Number of candles to return (1-5000, default: 30)
start_date (string, optional): Start date YYYY-MM-DD
end_date (string, optional): End date YYYY-MM-DD
response_format ('markdown' | 'json'): Output format
Returns: Array of OHLC candles with datetime, open, high, low, close, and volume (where applicable).
Examples:
"Get 1-hour gold candles" -> symbol: "XAU/USD", interval: "1h"
"Daily EURUSD last 100 days" -> symbol: "EUR/USD", interval: "1day", outputsize: 100
"5-minute BTC data" -> symbol: "BTC/USD", interval: "5min"
Inputs: symbol (required), end_date, interval, outputsize, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Tools get_price and get_exchange_rate have overlapping functionality for currency pairs, and get_quote also provides current price. This creates ambiguity about which tool to use for simple price queries.
All tools use a consistent 'verb_noun' pattern with snake_case (get_price, get_quote, get_time_series, convert_currency, get_exchange_rate), making it easy to predict functionality.
With 5 tools, the server covers essential financial data operations without being overly cluttered. The count is well-scoped for the domain.
Covers major needs: real-time price, detailed quote, historical data, currency conversion. Missing advanced features like symbol search or indicators, but core workflows are supported.
Maintenance
Related MCP Connectors
Live and historical market data for stocks, forex, crypto, indices, ETFs, commodities and bonds.
Real-time & historical market data: forex, stocks, crypto, indices, metals, K-line, quotes
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Related MCP Servers
FlicenseCqualityBmaintenanceProvides integration with Twelve Data API to access financial market data including historical time series, real-time quotes, and instrument metadata for stocks, forex pairs, and cryptocurrencies.3586-- 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.100118 PyPI74Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables access to real-time and historical market data including stocks, ETFs, forex, and cryptocurrencies, with support for time series, quotes, dividends, splits, and earnings.325 npmMIT