Twelve data MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Twelve Data MCP or direct API to fetch live stock prices, retrieve historical market data, analyze forex movements, and track cryptocurrency trends through natural language.

Twelve data logoTwelve data
Api Key

Twelve Data is a financial data API providing real-time and historical market data for stocks, forex, crypto, ETFs, and indices. It helps you access accurate, up-to-date financial information for analysis and automation.

100 Tools

Try Twelve data now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Twelve data
Try asking
TOOLS

Supported Tools

Every Twelve data action and event your agent gets out of the box. No Twelve data signup needed. Give your agents access to the Twelve data API and pay per call from your Composio balance.

Batch Get Quotes

Fetch quotes for 1-8 symbols in one batch, returning success or error for every symbol; partial child failures do not fail successful quotes.

Cash Flow

Tool to get company cash flow statement.

Consolidated Cash Flow

Retrieve consolidated cash flow statements for a company, including modeled operating, investing, and financing cash flow details.

List Commodities

Retrieve the complete list of supported commodities.

Convert Currency

Convert an amount from the base to the quote currency using a current or historical forex or cryptocurrency rate.

Correlation Coefficient

Tool to fetch Pearson correlation coefficient between two series over a period.

List Countries

Retrieve country metadata including ISO codes, names, capitals, and currencies.

Cross Listings

Tool to retrieve cross-listed symbols for a security across multiple exchanges.

List Cryptocurrencies

List supported cryptocurrencies.

List Cryptocurrency Exchanges

Tool to list supported cryptocurrency exchanges.

Dividends

Retrieve dividend history for a specified symbol, optionally over a selected date range.

Earnings

Tool to retrieve earnings data including EPS estimates and actuals.

EPS Revisions

Tool to provide analysts’ revisions of a company’s future EPS over the last week and month.

EPS Trend

Tool to retrieve EPS trend estimates for a specified company.

ETFS Directory

Tool to fetch a daily updated list of exchange-traded funds sorted by total assets.

ETFS Family

Retrieve ETF family names grouped by country, optionally filtered by family name.

Get ETF Types

Tool to retrieve ETF categories by market, including types like 'Equity Precious Metals'.

ETF World

Tool to fetch comprehensive ETF analytics (summary, performance, risk, composition).

ETF World Composition

Tool to fetch global ETF composition details including sector, country, asset allocations, top holdings, and bond metrics.

ETF World Risk

Retrieve global ETF risk metrics, including volatility and valuation ratios.

List supported exchanges

Tool to retrieve a list of supported exchanges.

List supported forex pairs

Tool to retrieve a list of all supported forex currency pairs.

Get AD Indicator

Tool to retrieve Accumulation/Distribution (AD) indicator data for a financial instrument.

Get APO (Absolute Price Oscillator)

Tool to calculate the Absolute Price Oscillator (APO) for a financial instrument.

Get Aroon Indicator

Tool to retrieve Aroon Indicator data for identifying market trends.

Balance Sheet

Tool to retrieve a company's balance sheet (assets, liabilities, equity).

Balance Sheet Consolidated

Tool to get raw consolidated balance sheet data (assets, liabilities, equity) for a company.

Get Bollinger Bands

Retrieve Bollinger Bands for a financial instrument, including upper, middle, and lower bands, to assess market volatility and potential price reversals.

Get Bonds

Retrieve a list of available bonds with optional symbol, exchange, or country filters.

Get CCI

Tool to retrieve Commodity Channel Index (CCI) values for a specified security.

Get Ceiling (CEIL)

Tool to retrieve the Ceiling (CEIL) transformation for a time series.

Get Chande Momentum Oscillator

Tool to retrieve Chande Momentum Oscillator (CMO) data for a security.

Get Detrended Price Oscillator

Tool to calculate the Detrended Price Oscillator (DPO) for a specified financial instrument.

Get Earliest Timestamp

Tool to return the first available timestamp for a symbol and interval.

Get End of Day Price

Retrieve an end-of-day closing price and metadata for a financial instrument, for a specified date or the most recent available date.

Global ETF Performance

Retrieve global ETF performance metrics, including trailing and annual returns.

Get Exchange Rate

Return the current or historical exchange rate for one forex or cryptocurrency pair.

Get exchange schedule

Retrieve trading sessions and hours for exchanges by date, including pre-market, main, and post-market sessions.

Get Fund Holders

Tool to retrieve mutual fund holders for a company.

Get Funds

Tool to fetch a daily updated list of available investment funds.

Get Heikin Ashi Candles

Tool to retrieve Heikin Ashi candlestick data that smooths price action by averaging values.

Get HLC3 Average

Tool to calculate the High, Low, Close Average (HLC3) for a security over a specified period.

Get Hilbert Transform Sine Wave

Fetch Hilbert Transform Sine Wave (HT_SINE) data for an instrument and interval, including sine and lead-sine components, for analyzing market cycles and potential turning points.

Get Ichimoku Cloud Indicator

Tool to retrieve Ichimoku Kinko Hyo indicator data for analyzing trend direction, support/resistance levels, and trading opportunities.

Income Statement

Tool to retrieve a company's income statement data (annual or quarterly).

Insider Transactions

REQUIRES PRO, ULTRA, OR ENTERPRISE PLAN.

Get Available Intervals

Tool to retrieve a list of available time intervals supported by the API.

Get Keltner Channel

Retrieve Keltner Channel indicator data for volatility-based technical analysis.

Key Executives

REQUIRES ULTRA OR ENTERPRISE PLAN.

Get Last Change

Tool to retrieve the latest update timestamps for a fundamentals dataset.

Get Latest Price

Return only the latest available price for one market symbol; use Get Quote when OHLC, volume, change, or market status is needed.

Get Linear Regression Angle

Tool to calculate the linear regression angle for a given time series of stock prices.

Get Linear Regression Intercept

Retrieve linear regression intercept indicator values for a financial instrument over a specified period.

Get Linear Regression Slope

Retrieve linear regression slope indicator values for a financial instrument over a specified period.

Get Base-10 Logarithm (LOG10)

Retrieve base-10 logarithm (LOG10) indicator values for a financial instrument's selected price or volume series.

Get Logo

Tool to retrieve official logo URLs for a symbol.

Get MACD

Tool to calculate the Moving Average Convergence Divergence (MACD) for a specified financial instrument.

Get MAMA

Tool to fetch MESA Adaptive Moving Average (MAMA) indicator data.

Market Movers

Retrieve a snapshot of top gainers or losers for a specified market.

Get Market State

Tool to report current open/closed status for exchanges.

Get Maximum Value

Retrieve the maximum-value technical indicator for a financial instrument's selected price or volume series over a given period.

Get McGinley Dynamic Indicator

Tool to calculate the McGinley Dynamic indicator, which provides a refined moving average that adapts to market volatility.

Get Median Price

Tool to calculate and retrieve the Median Price (MEDPRICE) technical indicator for a security.

Get Minus Directional Indicator

Tool to calculate and return the Minus Directional Indicator (MINUS_DI) for a security.

Global Mutual Fund Performance

Get global mutual fund performance metrics, including trailing, annual, quarterly, and load-adjusted returns.

Mutual Funds World Risk

Fetch global mutual fund risk metrics, including standard deviation, beta, and Sharpe ratio.

Global Mutual Fund Summary

Retrieve a global mutual fund summary snapshot with key identifiers and attributes.

Global Mutual Fund Sustainability

Get global mutual fund sustainability and ESG metrics, including scores and pillar breakdowns.

Get Plus Directional Indicator

Tool to fetch the Plus Directional Indicator (PLUS_DI) time series data for a security.

Price Target

Tool to fetch analysts' price target dataset for equities.

Get Profile

Tool to retrieve company profile.

Get Quote

Return the latest quote for one symbol, including OHLC, volume when available, change, market-open status, and 52-week range.

Recommendations

Retrieve aggregated analyst recommendations for a stock.

Get Rate of Change (ROC)

Tool to retrieve Rate of Change (ROC) indicator data for a security.

Get ROCP (Rate of Change Percentage)

Tool to calculate and return the Rate of Change Percentage (ROCP) for a financial security.

Get ROCR100

Tool to calculate the Rate of Change Ratio 100 (ROCR100) for a security.

Get Relative Volume

Tool to fetch relative volume (RVOL) data for a security.

Get Simple Moving Average

Return a bounded simple moving average series for one symbol, interval, price field, and averaging period.

Stock Splits

Tool to retrieve historical stock split events.

Splits Calendar

Tool to retrieve a calendar of stock split events.

Get Statistics

Tool to retrieve key company statistics including valuation and financial overview.

Get Stochastic RSI

Tool to calculate the Stochastic Relative Strength Index (Stochastic RSI) for a specified financial instrument.

Get Summation (SUM)

Tool to calculate the cumulative total (Summation) of a specified data series over a defined time period.

Get Technical Indicators List

Tool to retrieve a comprehensive list of available technical indicators.

Get TEMA (Triple Exponential Moving Average)

Tool to calculate the Triple Exponential Moving Average (TEMA) for a financial instrument.

Get Time Series

Return a bounded OHLCV history window for one symbol and interval; this does not paginate or fetch an unbounded history.

Get Usage Limits

Retrieve the connected key's current minute usage, limit, and timestamp, along with daily usage, daily limit, and plan category when available.

Get Variance (VAR)

Tool to calculate the statistical variance of a financial data series.

Get Weighted Close Price

Tool to calculate and retrieve the Weighted Close Price (WCLPRICE) for a security.

Get Weighted Moving Average (WMA)

Tool to calculate and retrieve the Weighted Moving Average (WMA) for a security over a specified period.

List market indices

Tool to retrieve a list of market indices.

Institutional Holders

Tool to retrieve institutional holders positions for a company.

List Stocks

List and filter stocks in Twelve Data's reference directory, one explicit page at a time.

Mutual Funds Family

List the mutual fund families available from investment companies.

Mutual Funds List

Tool to retrieve a daily updated list of mutual funds sorted by total assets.

Mutual Funds World Composition

Fetch global mutual fund portfolio composition, including sectors, asset allocation, top holdings, and bond metrics.

Options Chain

Tool to retrieve the options chain for a given symbol and optional expiration date.

Options Expiration

Tool to retrieve available option expiration dates.

Search Symbols

Find tradable instrument symbols and exchange identifiers by ticker or name; returns a bounded match list with no pagination.

Technical Indicators

Tool to fetch time-series data for a specific technical indicator.

SETUP GUIDE

Connect Twelve data MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["twelve_data"],
  mcp: true,
});
Create a session scoped to Twelve data and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Show me the latest dividend payouts for AAPL over the last 3 years.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Twelve data request
SETUP GUIDE

Connect Twelve data API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["twelve_data"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Twelve data
3

Run Twelve data tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Show me the latest dividend payouts for AAPL over the last 3 years." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Twelve data tool calls through the session, and print the final answer

Why Use Composio?

AI Native Twelve data Integration

  • Supports both Twelve data MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Twelve data data

Managed Auth

  • Built-in API key handling with secure storage
  • Central place to manage, scope, and revoke Twelve data access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Twelve data
  • Scoped, least privilege access to Twelve data resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Twelve data.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Twelve data tool your agent needs.Free to start.

Start building