Twelve Data MCP Server
Click on "Install 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 ServerWhat'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
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target currency code (e.g., EUR, JPY, USD) | |
| from | Yes | Source currency code (e.g., USD, EUR, XAU) | |
| amount | Yes | Amount to convert | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, idempotent behavior. The description adds context about real-time rates and supported asset types (fiat, metals, crypto), which is useful beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, well-structured with sections, and includes examples that are immediately helpful. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the return (converted amount with exchange rate) and provides examples, but lacks explicit structure of the output. Still sufficient for the tool's purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds examples and clarifies valid inputs (e.g., XAU, BTC), enhancing understanding beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts an amount between currencies using real-time rates, and it distinguishes itself from siblings like get_exchange_rate by including an amount parameter.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for currency conversion but does not explicitly mention when to use it versus alternatives like get_exchange_rate, or any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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"
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Currency pair for exchange rate (e.g., EUR/USD, XAU/USD) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, establishing safety. The description adds that the tool returns a 'Current exchange rate with timestamp,' which is useful behavioral context beyond the schema. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, structured with Args, Returns, and Examples sections. Every sentence adds value with no redundancy. The main purpose is front-loaded in the first line.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-parameter tool with rich annotations and 100% schema coverage, the description is complete. It covers purpose, parameters, return format, and examples. There is no output schema, but the description explains the return value adequately. Slight deduction for lacking error handling or edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with good descriptions for both parameters. The description adds a returns section and concrete examples (e.g., 'XAU/USD' for gold), which adds value beyond the schema by clarifying usage patterns. This justifies above baseline (3).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the current exchange rate for a currency pair' with a specific verb and resource. It uses examples like 'EUR/USD' and 'XAU/USD' to clarify the resource scope, effectively distinguishing from sibling tools like twelvedata_get_price which likely fetches stock prices.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides examples and expected input formats, giving clear context for when to use the tool. However, it does not explicitly state when not to use it or mention alternatives like twelvedata_convert_currency for conversion with amounts, so it narrowly misses a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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"
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol to get price for (e.g., XAU/USD for gold, EUR/USD for forex) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover readOnlyHint, idempotentHint, and destructiveHint. The description adds that it is the fastest endpoint and supports multiple asset types, which provides valuable behavioral context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections and bullet lists. Each sentence adds value, though the examples section could be slightly more compact. Overall no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool simplicity and rich annotations, the description adequately covers purpose, parameters, usage examples, and return value. Could mention potential errors or rate limits, but not critical for a read-only, idempotent tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (baseline 3), but the description adds numerous real-world examples of symbol formats and usage patterns, which meaningfully guides parameter usage beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it gets the current real-time price for any trading symbol, and distinguishes itself by claiming to be the fastest endpoint for current prices. Examples of supported asset types reinforce the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly describes when to use it (fastest endpoint for current prices) and provides many example symbols. However, it does not explicitly mention when to consider sibling tools like get_quote or get_time_series.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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"
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol to get detailed quote for (includes OHLC, change, volume) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the description doesn't need to reiterate safety. It adds value by detailing the return fields (OHLC, change, volume, 52-week range, market status) and notes the tool is more detailed than get_price. No contradictions or additional behavioral issues mentioned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise yet comprehensive: a brief summary, bullet points for args and returns, and two examples. Information is front-loaded and every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given only 2 parameters, no output schema, and strong annotations, the description fully covers tool behavior, usage, and output. It explains when to use, what parameters are, and what the return data contains, making it easy for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds concrete examples for symbol (e.g., 'XAU/USD') and clarifies the meaning of response_format options ('markdown' for human-readable). This extra context merits a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Get comprehensive quote data including OHLC, change, volume, and 52-week range.' It uses a specific verb and resource, and immediately distinguishes from sibling 'get_price' by noting it is more detailed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool versus alternatives by saying 'More detailed than get_price' and includes example queries that demonstrate proper symbol formatting. It lacks explicit when-not-to-use guidance, but the differentiation is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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"
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol for time series data | |
| end_date | No | End date for historical data (YYYY-MM-DD) | |
| interval | No | Candle interval (1min, 5min, 15min, 30min, 1h, 4h, 1day, 1week) | 1day |
| outputsize | No | Number of data points to return (1-5000, default: 30) | |
| start_date | No | Start date for historical data (YYYY-MM-DD) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, openWorldHint. Description adds return structure (OHLC candles with volume) and constraints (outputsize 1-5000). No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections for Args, Returns, and Examples. Front-loaded with purpose. Every sentence adds value, though Args section slightly redundant with schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all 6 parameters, output format, and use cases. Given no output schema, the description adequately explains return data. No missing critical information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters with descriptions. The description adds examples and context (e.g., 'Trading symbol', '1-hour gold candles') that enhance understanding beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Get historical OHLC candlestick data' with a specific verb and resource. It distinguishes from siblings like twelvedata_get_price by focusing on historical multi-timeframe data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly states use cases: 'chart analysis, backtesting, and historical price research.' Provides examples to guide selection, but does not explicitly state when to avoid or mention alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
twelvedata_convert_currency - First observed
twelvedata_get_exchange_rate - First observed
twelvedata_get_price - First observed
twelvedata_get_quote - First observed
twelvedata_get_time_series
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- mcpOAuthcom.twelvedata
Twelve Data MCP: real-time & historical market data (stocks, crypto, forex, etc).
Twelve Data: stocks/ETF/forex/crypto time series, quotes, dividends, splits, earnings.
Real-time & historical market data: forex, stocks, crypto, indices, metals, K-line, quotes
Fetch current stock prices and key data for symbols across global markets. Look up companies likeβ¦
Related MCP Servers
FlicenseCqualityCmaintenanceProvides 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.3576-- 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.10074Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables access to real-time and historical market data including stocks, ETFs, forex, and cryptocurrencies, with support for time series, quotes, dividends, splits, and earnings.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sherajdev/twelvedata-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server