
Twelve Data
com.twelvedata由 twelvedata.com 发布官方发布者v2.0.1更新于 Nov 4, 2026
Real-time and historical market data: stocks, forex, crypto, ETFs, fundamentals and 60+ indicators.
概览
Twelve Data 托管的 MCP 服务器,让助手获取股票、外汇、加密货币和 ETF 的实时与历史行情、基本面数据以及 60 多种技术指标。
- 可以做什么
- 查询代码并获取股票、ETF、外汇、加密货币和商品的实时与历史价格
- 计算 RSI、MACD、SMA、BBANDS、ATR 等 60 多种技术指标
- 获取基本面数据:财务报表、财报、股息、拆股、公司简介和关键统计
- 查看 ETF 与共同基金的简介、表现、持仓和风险
- 阅读公司新闻与新闻稿
- 获取市场情报与监管数据:涨跌榜、汇率、分析师评级、目标价、SEC/EDGAR 文件、内部人交易和机构持仓
- 适用场景
- 适合让助手回答行情问题、筛选或研究标的、计算指标和调取监管文件,而无需自己编写 API 代码。托管方式适合不想本地安装的用户。
- 运行要求
- 需要 Twelve Data 账户,且套餐覆盖所请求的数据。推荐的云服务器是远程端点,通过浏览器 OAuth 登录,无需粘贴 API 密钥。自托管方式需要 Python 3.10+ 并在 .env 文件中配置 Twelve Data API 密钥,或使用 Docker。
安装
在 SourceWeft 中
- 打开 控制台中的 Twelve Data,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/com.twelvedata%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"twelve-data": {
"type": "http",
"url": "https://mcp.twelvedata.com/mcp"
}
}
}README
Twelve Data MCP Server
Connect Claude, ChatGPT, and other AI assistants to the Twelve Data financial API — real-time and historical prices, 60+ technical indicators, fundamentals, earnings, dividends, ETFs, company news, market movers, and more.
You need a Twelve Data account. Sign up at twelvedata.com.
There are two ways to use it. Most people should use the cloud server (Option 1) — there is nothing to install.
Option 1 — Use our cloud server (recommended)
Connect your AI assistant to our hosted server:
That's it. No installation, no API key to copy and paste. When you connect, a browser window opens and you log in with your Twelve Data account — your personal API key is linked automatically and stays tied to your account.
How to add it
Claude (Desktop / Web) and ChatGPT support custom connectors / MCP servers:
- Open your assistant's Connectors (or Integrations / MCP servers) settings.
- Add a new connector with the URL
https://mcp.twelvedata.com/mcp. - When prompted, click Connect / Log in — a Twelve Data login page opens in your browser.
- Authorize, and you're done. Ask things like "What's the RSI for AAPL?" or "Show me TSLA's latest earnings."
The exact menu names differ between apps and versions, but the flow is always the same: add the URL, then log in via the browser popup.
The MCP host does not issue tokens. The connector URL is https://mcp.twelvedata.com/mcp. The client must follow that URL's protected-resource metadata to the authorization server named there. Do not point a connector at the host root (it answers 404), or at this host's /register or /.well-known/oauth-authorization-server.
Perplexity (custom remote connector)
Perplexity Pro, Max, and Enterprise users can add the hosted server as a custom remote connector. That is a per-account setup, not a listing in Perplexity's public curated directory.
- In Perplexity, open Account settings → Connectors → + Custom connector and select Remote. On Enterprise, an admin may need to allow custom connectors first.
- Set Name to
Twelve Dataand MCP Server URL tohttps://mcp.twelvedata.com/mcp. - Choose OAuth for authentication and Streamable HTTP for transport. Leave the Client ID and Client Secret blank so Perplexity can use dynamic client registration on the authorization server named in the server's protected-resource metadata.
- Accept Perplexity's custom connector acknowledgement and click Add. Then click the Twelve Data connector card to start authentication, sign in to your Twelve Data account, and authorize access.
- Once the connector is enabled, try these prompts:
- "Use Twelve Data to find the AAPL symbol."
- "Use Twelve Data to get the latest quote for AAPL, including price and volume."
- "Use Twelve Data to show the last five daily closing prices for AAPL."
- "Use Twelve Data to show AAPL RSI."
Each person signs in with their own Twelve Data account. If an Enterprise admin shares the connector, require individual authentication for each member. Do not paste a Twelve Data API key into the connector's API Key authentication field.
If the OAuth window is blocked, login fails, or tools stop after idle time, open the Twelve Data connector, disable it, enable it again, and sign in. Reconnect this way rather than switching the connector to API Key auth. Confirm the URL is exactly https://mcp.twelvedata.com/mcp with no trailing slash, and that the Twelve Data plan includes the requested data. See Perplexity's custom remote connector guide for the current settings screens.
Codex (CLI, desktop, and IDE)
Add the hosted MCP server to Codex without installing this repository or copying an API key:
The add command starts OAuth: complete the Twelve Data sign-in in your browser. If you need to authorize again later, run codex mcp login twelvedata. In Codex, use /mcp to check the connection, then ask: "Use Twelve Data to get the latest quote for AAPL." and "Use Twelve Data to show AAPL RSI." To disconnect, run codex mcp remove twelvedata.
The public plugin repository is https://github.com/MazeBraker/twelvedata-skills. It installs the skills and the same hosted MCP:
Option 2 — Run it yourself with an API key
Prefer to run the server on your own machine? You only need your Twelve Data API key — no OAuth setup. Get it at twelvedata.com → your dashboard → API Keys.
1. Install
Requires Python 3.10+ (3.12 recommended; on macOS brew install [email protected] or make python-install).
2. Add your API key
Create a .env file in the project root with your key, readable only by you:
The server reads the key from .env and every request uses it. No login step needed.
3. Connect over stdio
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Use the .venv/bin/python path (not the system Python — macOS ships 3.9, and this server needs 3.10+). Restart Claude Desktop after editing the config.
Claude Code:
4. Connect over HTTP
5. Run it in Docker
--env-file keeps the key out of your shell history. Connect to http://localhost:8000/mcp as in step 4. OAuth login is not supported in Docker.
6. Security
make runand Docker serve/mcpwith no authentication, on0.0.0.0by default.- Every call is served under your credential.
- Anyone who reaches the port can call
auth_statusandoauth_configure. That includes a web page you open, through DNS rebinding, because the default bind checks neither theHostnor theOriginheader. MCP_HOST=127.0.0.1 make runkeeps the server local and turns on the MCP SDK'sHostandOrigincheck.- With
MCP_HOST=127.0.0.1, ngrok works only when started with--host-header=rewrite.
7. Troubleshooting
Call auth_status from your client first. It shows whether an API key is configured, the stored token, the detected host and the redirect URI — usually enough to see what is missing.
What you can ask
- Prices — stocks, ETFs, forex, crypto, commodities (real-time & historical)
- Technical indicators — RSI, MACD, SMA, BBANDS, ATR, and 60+ more
- Fundamentals — financial statements, earnings, dividends, splits, company profiles, market cap, key stats, IPO calendar
- Funds — ETF & mutual fund profiles, performance, holdings, risk
- News — company news & press releases
- Market intelligence — movers, exchange rates, analyst ratings, price targets
- Regulatory — SEC/EDGAR filings, insider transactions, institutional holdings
Symbol formats: stocks AAPL, crypto BTC/USD, forex EUR/USD.
Partners
Running your own public instance or setting up a dedicated OAuth login? That's a partner arrangement — reach out to us at twelvedata.com and we'll provide the setup guide and OAuth credentials.
来源:README.md,提交 d139a77
工具
0版本历史
2- v2.0.1最新Nov 4, 2026
- v2.0.0Sep 16, 2026
评分
已满足适用检查项的 75%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。

