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 look up market prices, fetch time series, analyze technical indicators, and review fundamentals through natural language.

Twelve Data MCP logoTwelve Data MCP
Dcr Oauth

Twelve Data MCP is a hosted financial market data service for stocks, forex, crypto, ETFs, and funds. It provides structured, agent-ready access to prices, indicators, fundamentals, and research data.

25 Tools

Try Twelve Data MCP now

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

TOOL ROUTER PLAYGROUND
Twelve Data MCP
Try asking
TOOLS

Supported Tools

Every Twelve Data MCP action and event your agent gets out of the box.

Auth status

Show whether the current connection is authenticated.

Currency conversion

Get exchange rate or convert an amount between currencies (fiat or crypto).

Get analyst data

Get analyst ratings, consensus price targets, and forward estimates for stocks and ETFs.

Get api usage

Check Twelve Data API credit consumption and plan limits.

Get company info

Get company profile, executives, or logo.

Get company news

Latest news, press releases, and announcements for a company.

Get dividends

Get dividend history for a stock or the upcoming dividend calendar.

Get earliest timestamp

Get the earliest available datetime for an instrument at a given interval.

Get earnings

Get earnings data or the market-wide earnings calendar.

Get etf data

Get ETF analytics.

Get financials

Get financial statements for a company.

Get ipo calendar

Get the IPO calendar — upcoming and recent initial public offerings.

Get market cap

Get market capitalization for a company.

Get market movers

Get top market movers — biggest gainers, losers, or most-active instruments.

Get market state

Get current trading status and hours for exchanges.

Get mutual fund data

Get mutual fund data — summary, performance, risk, ratings, holdings, and more.

Get price

Get the current real-time price for one or more symbols.

Get quote

Get a full real-time quote: open, high, low, close, volume, change %, 52-week range.

Get reference data

Get reference and dictionary data — exchanges, countries, instrument types, and more.

Get regulatory data

Get regulatory and ownership data.

Get splits

Get stock split history for a company or the market-wide splits calendar.

Get statistics

Get key fundamental statistics for a stock or ETF.

Get technical indicator

Calculate any technical indicator for a symbol.

Get time series

Get historical OHLCV (Open, High, Low, Close, Volume) time series data.

Search symbol

Search for financial instruments by name or partial ticker, or find cross-listings.

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"],
  mcp: true,
});
Create a session scoped to Twelve Data MCP 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: "Get the latest price and daily trading volume for Apple stock (AAPL), and summarize its five-day price trend.",
  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 MCP request
SETUP GUIDE

Connect Twelve Data MCP 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_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Twelve Data MCP
3

Run Twelve Data MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Get the latest price and daily trading volume for Apple stock (AAPL), and summarize its five-day price trend." }],
});

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 MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Twelve Data MCP Integration

  • Supports both Twelve Data MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for querying prices, indicators, fundamentals, and market data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Twelve Data MCP 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 MCP
  • Scoped, least privilege access to Twelve Data MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Twelve Data MCP with any AI Agent Framework

Choose a Framework you want to connect Twelve Data MCP with

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 MCP.It takes 30 seconds.

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

Start building