Skip to content
Back to search

mcp

Twelve Data MCP (Model Context Protocol) Server provides seamless, real-time access to financial market data via WebSocket, enabling reliable streaming of price quotes, market metrics, and events directly into your applications.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/twelvedata/mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/twelvedata/mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/twelvedata--mcp/badge.svg)](/listings/twelvedata--mcp)

HTML

<a href="/listings/twelvedata--mcp"><img src="/api/listings/twelvedata--mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Requires **Python 3.10+** (3.12 recommended; on macOS `brew install python@3.12` or `make python-install`).

make install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 169 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Twelve Data MCP Server
  2. Connect Claude, ChatGPT, and other AI assistants to the [Twelve Data](https://twelvedata.com) financial API — real-time and historical prices, 60+ technical indicators, fundamentals, earnings, dividends, ETFs, company news, market movers, and more.
  3. You need a Twelve Data account. Sign up at [twelvedata.com](https://twelvedata.com).
  4. There are two ways to use it. **Most people should use the cloud server (Option 1)** — there is nothing to install.
  5. ---
  6. ## Option 1 — Use our cloud server (recommended)
  7. Connect your AI assistant to our hosted server:
  8. ```
  9. https://mcp.twelvedata.com/mcp
  10. ```
  11. 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.
  12. ### How to add it
  13. **Claude (Desktop / Web) and ChatGPT** support custom connectors / MCP servers:
  14. 1. Open your assistant's **Connectors** (or **Integrations** / **MCP servers**) settings.
  15. 2. Add a new connector with the URL `https://mcp.twelvedata.com/mcp`.
  16. 3. When prompted, click **Connect / Log in** — a Twelve Data login page opens in your browser.
  17. 4. Authorize, and you're done. Ask things like *"What's the RSI for AAPL?"* or *"Show me TSLA's latest earnings."*
  18. > 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.
  19. 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`.
  20. ### Perplexity (custom remote connector)
  21. 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.
  22. 1. In Perplexity, open **Account settings → Connectors → + Custom connector** and select **Remote**. On Enterprise, an admin may need to allow custom connectors first.
  23. 2. Set **Name** to `Twelve Data` and **MCP Server URL** to `https://mcp.twelvedata.com/mcp`.
  24. 3. 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.
  25. 4. 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.
  26. 5. Once the connector is enabled, try these prompts:
  27. - "Use Twelve Data to find the AAPL symbol."
  28. - "Use Twelve Data to get the latest quote for AAPL, including price and volume."
  29. - "Use Twelve Data to show the last five daily closing prices for AAPL."
  30. - "Use Twelve Data to show AAPL RSI."
  31. 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.
  32. 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](https://www.perplexity.ai/help-center/en/articles/13915507-adding-custom-remote-connectors) for the current settings screens.
  33. ### Codex (CLI, desktop, and IDE)
  34. Add the hosted MCP server to Codex without installing this repository or copying an API key:
  35. ```bash
  36. codex mcp add twelvedata --url https://mcp.twelvedata.com/mcp
  37. codex mcp list
  38. ```
  39. 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`.
  40. The public plugin repository is https://github.com/MazeBraker/twelvedata-skills. It installs the skills and the same hosted MCP:
  41. ```bash
  42. codex plugin marketplace add https://github.com/MazeBraker/twelvedata-skills
  43. codex plugin add twelvedata@twelvedata-skills
  44. ```
  45. ---
  46. ## Option 2 — Run it yourself with an API key
  47. 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](https://twelvedata.com) → your dashboard → **API Keys**.
  48. ### 1. Install
  49. Requires **Python 3.10+** (3.12 recommended; on macOS `brew install python@3.12` or `make python-install`).
  50. ```bash
  51. make install
  52. ```
  53. ### 2. Add your API key
  54. Create a `.env` file in the project root with your key, readable only by you:
  55. ```bash
  56. echo 'TWELVE_DATA_API_KEY=your_api_key_here' > .env
  57. chmod 600 .env
  58. ```
  59. The server reads the key from `.env` and every request uses it. No login step needed.
  60. ### 3. Connect over stdio
  61. **Claude Desktop** — add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
  62. ```json
  63. {
  64. "mcpServers": {
  65. "twelvedata": {
  66. "command": "/path/to/mcp/.venv/bin/python",
  67. "args": ["/path/to/mcp/src/server.py"]
  68. }
  69. }
  70. }
  71. ```
  72. 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.
  73. **Claude Code**:
  74. ```bash
  75. claude mcp add twelvedata -- /path/to/mcp/.venv/bin/python /path/to/mcp/src/server.py
  76. ```
  77. ### 4. Connect over HTTP
  78. ```bash
  79. make run # serves http://localhost:8000/mcp
  80. ```
  81. ```bash
  82. claude mcp add --transport http twelvedata http://localhost:8000/mcp
  83. ```
  84. ### 5. Run it in Docker
  85. ```bash
  86. docker build -t twelvedata-mcp .
  87. docker run --rm --env-file .env -p 127.0.0.1:8000:8000 twelvedata-mcp
  88. ```
  89. `--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.
  90. ### 6. Security
  91. - `make run` and Docker serve `/mcp` with **no authentication**, on `0.0.0.0` by default.
  92. - Every call is served under **your** credential.
  93. - Anyone who reaches the port can call `auth_status` and `oauth_configure`. That includes a web page you open, through DNS rebinding, because the default bind checks neither the `Host` nor the `Origin` header.
  94. - `MCP_HOST=127.0.0.1 make run` keeps the server local and turns on the MCP SDK's `Host` and `Origin` check.
  95. - With `MCP_HOST=127.0.0.1`, ngrok works only when started with `--host-header=rewrite`.
  96. ### 7. Troubleshooting
  97. 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.
  98. ---
  99. ## What you can ask
  100. - **Prices** — stocks, ETFs, forex, crypto, commodities (real-time & historical)
  101. - **Technical indicators** — RSI, MACD, SMA, BBANDS, ATR, and 60+ more
  102. - **Fundamentals** — financial statements, earnings, dividends, splits, company profiles, market cap, key stats, IPO calendar
  103. - **Funds** — ETF & mutual fund profiles, performance, holdings, risk
  104. - **News** — company news & press releases
  105. - **Market intelligence** — movers, exchange rates, analyst ratings, price targets
  106. - **Regulatory** — SEC/EDGAR filings, insider transactions, institutional holdings
  107. Symbol formats: stocks `AAPL`, crypto `BTC/USD`, forex `EUR/USD`.
  108. ---
  109. ## Partners
  110. Running your own public instance or setting up a dedicated OAuth login? That's a
  111. partner arrangement — reach out to us at [twelvedata.com](https://twelvedata.com)
  112. and we'll provide the setup guide and OAuth credentials.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.