Bring Market Data
to Pydantic AI
Twelve Data MCP Server · 16 tools available to AI Agents
What is the Twelve Data MCP Server?
Connect Twelve Data financial API to any AI agent and access real-time stock quotes, cryptocurrency prices, forex rates, and professional technical indicators through natural language.
What you can do
- Real-Time Quotes — Get current price, open, high, low, volume, and change for any stock
- Historical Data — Retrieve OHLCV candlestick data from 1-minute to monthly intervals
- Technical Analysis — Calculate SMA, EMA, RSI, MACD, Bollinger Bands, and Stochastic Oscillator
- Market Scanning — Search and browse available stocks, crypto pairs, and forex instruments
- Company Profiles — Access fundamental data including market cap, P/E ratio, and sector info
- Currency Conversion — Get exchange rates and convert amounts between any currency pair
How it works
1. Subscribe to this server
2. Enter your free Twelve Data API Key
3. Start analyzing markets from Claude, Cursor, or any MCP-compatible client
Built-in capabilities (16)
Convert an amount between currencies
Price touching upper band may indicate overbought, lower may indicate oversold. Get Bollinger Bands
Get company profile and fundamentals
Can filter by exchange. List available crypto pairs
EMA gives more weight to recent prices than SMA. Get Exponential Moving Average (EMA)
Get currency exchange rate
List available forex pairs
Used for trend following and momentum. Get Moving Average Convergence Divergence (MACD)
Get real-time stock quote
Faster and lighter than a full quote. Get current price only
Values above 70 indicate overbought, below 30 indicate oversold conditions. Get Relative Strength Index (RSI)
Common periods: 20, 50, 200. Get Simple Moving Average (SMA)
Values above 80 indicate overbought, below 20 indicate oversold. Get Stochastic Oscillator
Can filter by exchange and partial symbol match. List available stocks
Supports intervals from 1min to 1month. Get historical OHLCV candle data
Can filter by instrument type and exchange. Search for financial instruments
Why Pydantic AI?
Pydantic AI validates every Twelve Data tool response against typed schemas, catching data inconsistencies at build time. Connect 16 tools through Vinkius and switch between OpenAI, Anthropic, or Gemini without changing your integration code. full type safety, structured output guarantees, and dependency injection for testable agents.
- —
Full type safety: every MCP tool response is validated against Pydantic models, catching data inconsistencies before they reach your application
- —
Model-agnostic architecture. switch between OpenAI, Anthropic, or Gemini without changing your Twelve Data integration code
- —
Structured output guarantee: Pydantic AI ensures tool results conform to defined schemas, eliminating runtime type errors
- —
Dependency injection system cleanly separates your Twelve Data connection logic from agent behavior for testable, maintainable code
Twelve Data in Pydantic AI
Twelve Data and 2,500 other MCP servers. One platform. One governance layer.
Teams that connect Twelve Data to Pydantic AI through Vinkius don't need to source, host, or maintain individual MCP servers. Every tool call runs inside a hardened runtime with credential isolation, DLP, and a signed audit chain.
Raw MCP | Vinkius | |
|---|---|---|
| Server catalog | Find and host yourself | 2,500+ managed |
| Infrastructure | Self-hosted | Sandboxed V8 isolates |
| Credential handling | Plaintext in config | Vault + runtime injection |
| Data loss prevention | None | Configurable DLP policies |
| Kill switch | None | Global instant shutdown |
| Financial circuit breakers | None | Per-server limits + alerts |
| Audit trail | None | Ed25519 signed logs |
| SIEM log streaming | None | Splunk, Datadog, Webhook |
| Honeytokens | None | Canary alerts on leak |
| Custom domains | Not applicable | DNS challenge verified |
| GDPR compliance | Manual effort | Automated purge + export |
Why teams choose Vinkius for Twelve Data in Pydantic AI
The Twelve Data MCP Server runs on Vinkius-managed infrastructure inside AWS — a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts. All 16 tools execute in hardened sandboxes optimized for native MCP execution.
Your AI agents in Pydantic AI only access the data you authorize, with DLP that blocks sensitive information from ever reaching the model, kill switch for instant shutdown, and up to 60% token savings. Enterprise-grade infrastructure, zero maintenance.

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
How Vinkius secures
Twelve Data for Pydantic AI
Every tool call from Pydantic AI to the Twelve Data MCP Server is protected by DLP redaction, cryptographic audit chains, V8 sandbox isolation, kill switch, and financial circuit breakers.
Frequently asked questions
How do I get a Twelve Data API Key?
Visit Twelve Data, sign up for a free account, and copy your API key from the dashboard. Free tier includes 800 API credits/day.
What technical indicators are available?
SMA (Simple Moving Average), EMA (Exponential MA), RSI (Relative Strength Index), MACD, Bollinger Bands, and Stochastic Oscillator — all with customizable periods.
Can I get real-time crypto and forex prices?
Yes! Use get_quote or get_real_time_price with any symbol. Crypto pairs like BTC/USD and forex pairs like EUR/USD are supported.
How does Pydantic AI discover MCP tools?
Create an MCPServerHTTP instance with the server URL. Pydantic AI connects, discovers all tools, and generates typed Python interfaces automatically.
Does Pydantic AI validate MCP tool responses?
Yes. When you define result types as Pydantic models, every tool response is validated against the schema. Invalid data raises a clear error instead of silently corrupting your pipeline.
Can I switch LLM providers without changing MCP code?
Absolutely. Pydantic AI abstracts the model layer. your Twelve Data MCP integration works identically with OpenAI, Anthropic, Google, or any supported provider.
MCPServerHTTP not found
Update: pip install --upgrade pydantic-ai
Connect Twelve Data with your favorite client
Step-by-step setup guides for every MCP-compatible client and framework:
Anthropic's native desktop app for Claude with built-in MCP support.
AI-first code editor with integrated LLM-powered coding assistance.
GitHub Copilot in VS Code with Agent mode and MCP support.
Purpose-built IDE for agentic AI coding workflows.
Autonomous AI coding agent that runs inside VS Code.
Anthropic's agentic CLI for terminal-first development.
Python SDK for building production-grade OpenAI agent workflows.
Google's framework for building production AI agents.
TypeScript toolkit for building AI-powered web applications.
TypeScript-native agent framework for modern web stacks.
Python framework for orchestrating collaborative AI agent crews.
Leading Python framework for composable LLM applications.
Data-aware AI agent framework for structured and unstructured sources.
Microsoft's framework for multi-agent collaborative conversations.
Give your AI agents the power of Twelve Data MCP Server
Production-grade Twelve Data MCP Server. Verified, monitored, and maintained by Vinkius. Ready for your AI agents — connect and start using immediately.
