
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 分
請在儲存庫或註冊中心條目中宣告授權條款。

