Kandle MCP server
Commit 3 Nov 2026Memungkinkan AI agent untuk membaca chart crypto, stock, atau forex secara live, menggambar level teknikal, menambahkan indikator, dan menjalankan script backtesting.
Juga dikenal sebagai Kernel-Hunter/kandle
- Stars
- 9
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- 0.11.0
- Commit terakhir
- 3 Nov 2026
- Lisensi
- MIT
Apa itu Kandle MCP?
Memungkinkan AI agent untuk membaca chart crypto, stock, atau forex secara live, menggambar level teknikal, menambahkan indikator, dan menjalankan script backtesting.
Ringkasan dibuat dari README proyek
Tentang Kandle MCP server
Analis finansial dan developer dapat menggunakan Kandle untuk memberikan akses real-time kepada AI agent ke chart crypto, stock, dan forex. Dengan menghubungkan agent seperti Claude Code, Cursor, atau Gemini CLI melalui kandle-mcp server, AI dapat berinteraksi dengan interface charting berbasis browser melalui koneksi WebSocket lokal. Setup ini memungkinkan agent untuk melakukan analisis teknikal dengan membaca data pasar, menggambar Fibonacci retracements, menambahkan indikator seperti RSI, dan mengelola watchlist.
User berinteraksi dengan sistem dengan memasangkan agent mereka ke aplikasi browser menggunakan pairing code yang unik. Server beroperasi secara lokal di 127.0.0.1, memastikan data pasar mengalir langsung ke browser dan informasi sensitif seperti API keys atau custom script tetap berada di local storage. Toolkit ini mencakup 28 tools spesifik, yang memungkinkan agent untuk menjalankan script backtesting, mengambil screenshot chart dalam format PNG, dan mengelola layout multi-chart. Kandle mendukung data crypto live dari lima exchange tanpa memerlukan akun atau API keys.
Apa yang bisa Anda lakukan dengannya
- 1Automated technical analysisAI agent dapat mengidentifikasi dan menandai struktur pasar tertentu seperti swing highs dan lows pada sebuah chart.
- 2Executing strategy backtestsDeveloper dapat menginstruksikan agent untuk menjalankan custom script dan mengambil ringkasan performa untuk strategi trading.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Konfigurasi
BASE_PATH
| Nama | Deskripsi | Tipe |
|---|---|---|
| BASE_PATH | — |
Pengecekan otomatis
Berjalan 12 Nov 2026Laporan lengkap →Belum diverifikasi. Sebuah server memerlukan skor 80, tidak ada temuan serius, dan data yang cukup untuk kami periksa. Cara kerja checks · Yang perlu diperbaiki untuk menambah poin
- Source repository terhubung dan dapat dijangkauLolos
- Lisensi open source (OSI)Lolos
- Ada commit atau release dalam satu tahun terakhirLolos
- Nama package tidak mirip dengan package populerTidak diperiksa
- Remote endpoint menggunakan HTTPSTidak diperiksa
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Tidak ada instruksi tersembunyi untuk modelLolos
- Tidak ada advisory kritis pada paket atau dependensinyaTidak diperiksa
README
Lihat di GitHubKandle is a free, open source charting app for crypto, stocks and forex that runs in your browser. You don't need an account, and Kandle has no server of its own: market data goes from each provider straight to your browser, and your charts, scripts and API keys stay in local storage. It also ships an MCP server, so Claude Code, Codex, Cursor or Gemini CLI can read the chart, draw levels, add indicators and run scripts while you watch.
Get started
Open kernel-hunter.github.io/kandle. There is nothing to install, and live crypto data from five exchanges works without a key. Type any letter to search for a symbol, press / for indicators and Alt+S for the script editor.
To run your own copy, see Run it locally.
Use it with your AI agent
Kandle ships an MCP server, kandle-mcp. Your agent starts it, and the Kandle tab in your browser connects to it over a WebSocket on 127.0.0.1. You need Node.js 22.12 or newer.
For Claude Code:
claude mcp add kandle -- npx -y \
--package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.11.0/kandle-mcp-0.11.0.tgz \
kandle-mcp
Other agents are below. Then ask something like "mark the last swing high and low on BTC and draw a Fibonacci retracement between them".
Set up
- Add the server to your agent (the command above, or a snippet below).
- Ask the agent for the Kandle pairing code. It calls
get_bridge_statusand shows a code likeK7QD-9MXR-2HPA. - In Kandle, click Agent in the top bar, paste the code and turn on Agent bridge. The dot on the button turns green when the agent is connected.
The code is saved in your browser and in ~/.kandle/bridge-token, so you only pair once. This works with the hosted app and with a copy you run yourself. With the hosted app, your browser may ask whether the page can reach devices on your local network; allow it so the page can talk to kandle-mcp on 127.0.0.1.
Download kandle-mcp-0.11.0.mcpb and open it to install the server.
In ~/.codex/config.toml:
[mcp_servers.kandle]
command = "npx"
args = ["-y", "--package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.11.0/kandle-mcp-0.11.0.tgz", "kandle-mcp"]
In ~/.cursor/mcp.json (or .cursor/mcp.json in a project) for Cursor, and ~/.gemini/settings.json for Gemini CLI:
{
"mcpServers": {
"kandle": {
"command": "npx",
"args": ["-y", "--package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.11.0/kandle-mcp-0.11.0.tgz", "kandle-mcp"]
}
}
}
Kandle is listed in the MCP Registry as io.github.Kernel-Hunter/kandle, so clients that browse the registry can find it.
npx runs kandle-mcp from a GitHub release. When a new version of Kandle comes out, change the version in the URL; get_bridge_status tells your agent when the app is newer than its server.
To run it from a clone instead, use pnpm install && pnpm build and point your agent at node /path/to/kandle/packages/mcp/bin/kandle-mcp.js.
| Tool | What it does |
|---|---|
get_bridge_status |
Connection state and the pairing code |
get_chart_state |
Symbol, timeframe, last bar, visible range, indicators with latest values, compared symbols, drawings with ids, alerts, replay and layout. Note text is limited to 20 notes of 120 characters and marked as untrusted |
set_symbol, set_timeframe |
Change the market or bar size. Exchange csv opens a dataset you imported |
get_candles |
OHLCV bars by count or time range, optionally with indicator values per bar |
add_indicator, remove_indicator, list_indicators |
Manage indicators and list the 36 available |
add_compare, remove_compare |
Draw other symbols as lines over the main chart, with each one's change since the left edge |
draw |
Trend line, horizontal line or ray, vertical line, ray, extended line, rectangle, Fibonacci retracement, text note, price range, all by price and time |
remove_drawing, clear_drawings |
Remove drawings |
screenshot |
PNG of a chart, returned as an image |
set_alert, list_alerts, remove_alert |
Alerts on price, drawn lines and indicators |
start_replay, step_replay, stop_replay |
Bar replay |
set_layout |
1, 2 or 4 charts, sync options, symbol and timeframe per chart |
set_chart_style |
Chart type (candles, hollow candles, bars, line, area, Heikin Ashi) and price scale (normal, log, percent) of a chart |
get_watchlist, add_to_watchlist, remove_from_watchlist |
Watchlist symbols with last price, change and change percent, and adding or removing them |
run_script |
Adds a Kandle script to the main chart and returns its id, input values and latest plot values, or the error with line and column. inputs sets input values by title and id replaces a script added earlier. For a strategy it also returns the backtest summary and the last 20 trades, and strategy changes its backtest settings |
get_backtest |
Settings (and which ones differ from the script), summary and up to 500 trades of a strategy script on the chart |
get_share_link |
A link that opens the main chart for anyone. include picks what it carries besides the exchange, symbol and timeframe. embed: true adds an iframe for another web page |
Most tools take an optional pane (1 to 4) when several charts are showing. Times can be ISO 8601 dates or Unix times in seconds or milliseconds. Inputs are validated and errors say what to fix.
skills/kandle/SKILL.md is an agent skill with chart analysis workflows: support and resistance, trend, indicator confluence, and annotating a chart with an explanation. Copy it into your agent's skills folder (for Claude Code, ~/.claude/skills/kandle/).
Security model
The bridge is off until you turn it on, only listens on 127.0.0.1, and needs the pairing code on every connection.
- The bridge only listens on
127.0.0.1. Nothing is reachable from other machines. - The app connects to the server, not the other way round, and only after you turn on Agent bridge. It is off by default and you can turn it off at any time.
- Every connection must send the pairing code first. The code has about 59 bits of randomness, is compared in constant time, and the server stops accepting codes for a minute after 5 wrong ones.
- The server rejects WebSocket connections from web pages that are not served from
localhost,127.0.0.1or[::1], so a website you visit cannot connect even if it guesses the port. The hosted app athttps://kernel-hunter.github.iois also allowed. Add other origins, such as your own hosted copy, withKANDLE_ALLOWED_ORIGINS. - The server rejects requests whose
Hostheader is not a loopback address, which blocks DNS rebinding. - Drawing notes can come from a link someone else shared, so
get_chart_statereturns the text of at most 20 notes, 120 characters each, withuntrusted_text: true. The tool description and the server instructions tell the agent that drawing text, script code and alert messages are data, not instructions. - The agent can only do what the tools allow: read chart data, change symbols, chart types, indicators, drawings, alerts, replay, layout and the watchlist, take screenshots of the chart and make share links. It cannot read other tabs, your files or your browser storage.
- Only one Kandle tab is connected at a time. A newer tab takes over and the older one shows that it was replaced.
- Programs running as your user on the same computer can read
~/.kandle/bridge-token. That is the same trust level as the agent itself.
Settings: --port or KANDLE_PORT (default 7457, change the port in the Agent dialog to match), KANDLE_TOKEN for a fixed code, KANDLE_HOME for the token folder.
Features
- Live crypto with no key. Binance, Coinbase, Bybit, OKX and Kraken, with history over REST and updates over websockets.
- Stocks, ETFs and forex. Twelve Data, Alpaca or Polygon with your own free API key, or your own CSV files.
- 36 indicators and the usual drawing tools. Ichimoku Cloud, a volume profile, trend lines, channels, Fibonacci retracement, price ranges and notes.
- Your own scripts. Write indicators in Kandle Script in an editor under the chart, with 15 examples and
request.security. See Scripts. - Strategy backtests. Trades on the chart, net profit, drawdown, win rate, an equity curve and every trade. See Strategies.
- Compare symbols. Draw up to 5 other markets over the chart, such as ETH and SOL over BTC, on a percent scale. See Compare symbols.
- Alerts, bar replay and up to 4 charts. See Alerts, Bar replay and Layouts.
- Share links and embeds. The link carries the chart itself, and an iframe puts a live chart on any page. See Share a chart.
- An agent bridge. 28 MCP tools to read the chart, draw, compare symbols, set alerts, run scripts and take screenshots. See above.
Let an agent mark up the chart
Ask for levels and the agent draws them on your chart: here the 120-bar high and a Fibonacci retracement from it down to the 120-bar low.
Write an indicator, press Ctrl+Enter
Backtest a strategy
Fills show as arrows on the chart, and the Strategy tab has the numbers and the list of trades.
Compare symbols
BTC/USDT with ETH/USDT and SOL/USDT on the same percent scale, all starting at 0% on the left edge.
Ichimoku and a volume profile
The volume profile covers the bars on screen and updates as you scroll and zoom.
Pick a data source
Keys stay in your browser and only go to that provider's API.
- Live crypto candles from Binance, Coinbase, Bybit, OKX and Kraken public market data, with no key. History loads over REST and updates stream over websockets.
- US and global stocks, ETFs and forex from Twelve Data, Alpaca or Polygon with your own free API key. See Data sources.
- Your own OHLCV data from a CSV file, kept in your browser. See CSV import.
- Symbol search for the chosen source, with Crypto, Stock, ETF, Forex, Index and CSV badges.
- Timeframes: 1m, 5m, 15m, 1H, 4H, 1D, 1W. Scroll left to load older history.
- Chart types: candles, hollow candles, bars (OHLC), line, area and Heikin Ashi, with a normal, logarithmic or percent price scale. Each chart in a layout keeps its own. Heikin Ashi only changes how bars are drawn: indicators, scripts, backtests, alerts and the agent tools keep using the real prices, and the legend shows the Heikin Ashi values on their own line.
- 36 indicators, with as many on the chart as you like: MA, EMA, SMA, WMA, HMA, Bollinger Bands, Donchian Channel, VWAP, Supertrend, Parabolic SAR, Ichimoku Cloud, Volume Profile, Volume, MACD, RSI, Stochastic RSI, KDJ, ATR, OBV, CCI, DMI/ADX, Williams %R, ROC, Momentum, TRIX, Awesome Oscillator and more. Every parameter can be edited.
- Ichimoku Cloud with the cloud drawn ahead of the last candle, and a volume profile of the bars on screen that marks the point of control and the value area. The profile updates as you scroll and zoom.
- Drawing tools: trend line, ray, extended line, horizontal line and ray, vertical line, parallel channel, rectangle, Fibonacci retracement, price range, text notes and price labels. Select a drawing to move it or delete it. An optional magnet snaps points to candle prices.
- Your symbol, timeframe, chart type, price scale, theme, indicators, and drawings (saved per symbol) come back when you reload.
- Dark and light themes.
- Keyboard shortcuts for most actions. Press
?in the app to see them all. - Export the chart as a PNG image.
- Share a chart as a link: symbol, timeframe, chart type, indicators and drawings, plus scripts and the multi-chart layout if you choose. The link carries the chart itself. See Share a chart. The same popover gives an iframe that shows the chart on a blog or docs page, see Embed a chart.
- Scripts: write your own indicators in Kandle Script, with an editor under the chart and 15 example scripts. Scripts can read other timeframes and other symbols with
request.security. - Strategy backtests: write a strategy script, see its trades on the chart, and get net profit, drawdown, win rate, an equity curve and the list of trades.
- Alerts on price levels, drawn lines and indicator values, with browser notifications.
- Bar replay to step through history one candle at a time.
- 1, 2 or 4 charts on screen, each with its own symbol, timeframe and indicators.
- A watchlist next to the charts with live prices and 24 hour change for crypto, and the change since the previous close for stocks and forex. Click a symbol to open it.
- An MCP server so AI agents can read the chart, draw on it, set alerts and take screenshots.
- Works on desktops, tablets and phones. On a narrow screen the top bar keeps the symbol, timeframe and price in view and moves the other tools into the ... menu.
| Keys | Action |
|---|---|
| Any letter or digit | Search symbols |
/ or Alt+I |
Indicators |
Alt+S |
Script editor |
Ctrl+Enter or Cmd+Enter |
Add or update the script on the chart (in the editor) |
Alt+1 to Alt+7 |
Timeframes 1m to 1W |
Alt+C |
Next chart type |
Alt+T |
Trend line |
Alt+R |
Ray |
Alt+H |
Horizontal line |
Alt+V |
Vertical line |
Alt+B |
Rectangle |
Alt+F |
Fibonacci retracement |
Alt+P |
Price range |
Alt+N |
Text note |
Alt+M |
Magnet on or off |
Delete |
Delete the selected drawing |
Esc |
Cancel the current drawing or close a dialog |
Alt+L |
Switch between light and dark |
Alt+W |
Show or hide the watchlist |
Alt+K |
Share a link to this chart |
Data sources
Click Data in the top bar to see every source, add keys and test them. In symbol search, pick the source above the results.
| Source | Markets | Key needed | Updates |
|---|---|---|---|
| Binance | Crypto | No | Live |
| Coinbase | Crypto | No | Live |
| Bybit | Crypto | No | Live |
| OKX | Crypto | No | Live |
| Kraken | Crypto | No | Live. History is limited to the latest 720 bars per timeframe. |
| Twelve Data | Stocks, ETFs, forex, crypto | Free key | Live for the symbols your plan streams, otherwise refreshed once a minute |
| Alpaca | US stocks and ETFs | Free key ID and secret | Live from the IEX feed (volume covers IEX trades only) |
| Polygon | Stocks, ETFs, forex, crypto, indices | Free key | End of day on the free plan, marked Delayed |
| CSV | Your own data | No | Never. See CSV import |
Free keys:
- Twelve Data: sign up at twelvedata.com. The free plan allows 8 requests a minute and 800 a day.
- Alpaca: open a free account at alpaca.markets (paper trading is enough) and create an API key. The free plan uses the IEX feed and allows 200 requests a minute.
- Polygon: sign up at polygon.io. The free plan has 2 years of end-of-day data and 5 requests a minute.
Finnhub is not included: its free plan does not include historical candles, so it cannot draw a chart.
How keys are handled:
- Keys stay in this browser. They are saved in local storage under
kandle:apikey:<source>and are never sent anywhere except to that provider's own API. Kandle has no server. - Keys go in request headers where the provider allows it. The Twelve Data websocket only accepts the key in its URL, which goes to Twelve Data only.
- Remove key in the Data dialog deletes it from the browser.
Free plans have tight limits, so Kandle caches responses, counts requests against each plan's per-minute limit, and backs off when a provider answers 429. When a limit is reached the chart says "Free plan limit reached, try again in N s" instead of retrying in a loop.
Stock charts only have bars for trading hours. Nights, weekends and holidays get no empty bars, and the chart places bars side by side, so there are no gaps on the time axis.
Market data comes straight from each provider's official public API in your browser. Kandle does not store or redistribute it, and each provider's terms apply. Exchange availability depends on your region; for Binance the app uses the public market data hosts first.
CSV import
Load your own OHLCV data: click Import CSV in symbol search or in the CSV card of the Data dialog and pick a file, or drop a file on the chart. Kandle reads it in your browser and shows what it found, you give the dataset a name, and it opens on the chart. Nothing is uploaded.
Accepted files:
- A header row with a time column (
time,date,datetime,timestamporopen time),open,high,low,closeand an optionalvolume, in any order and any case. Separatedateandtimecolumns are joined. A file with no header is read as time, open, high, low, close and volume. - Comma, semicolon or tab separated. In semicolon files a decimal comma (
1234,5) works. - Times as ISO 8601 (
2024-03-05T14:30:00Z, with a zone),YYYY-MM-DD,YYYY-MM-DD HH:mmorYYYY-MM-DD HH:mm:ss(read as UTC), or Unix time in seconds or milliseconds. - Rows are sorted by time. When two rows have the same time the later one is kept. Rows with an unreadable time or price, or a high below the low, are skipped and counted.
The timeframe comes from the median gap between bars, so daily stock data without weekends is still 1D. Bars that fit no timeframe but divide one, such as 30-minute bars, are combined into the next one (1H). The chart can show a dataset in its own timeframe and longer ones, which are built from its bars; shorter timeframe buttons are disabled.
Datasets are saved in this browser's local storage (up to 2.5 MB each and 4 MB in total, about 40,000 bars per dataset), appear in symbol search under CSV with a CSV badge, come back when you reload, and can be deleted in the Data dialog. Scripts, strategy backtests, request.security on higher timeframes, drawings, bar replay and multi-chart layouts work on them. The data never updates, so alerts on a CSV chart never fire. Agents can open a dataset with set_symbol and exchange csv.
Scripts
Kandle Script lets you write your own indicators and backtest strategies. It is compatible with the scripting language most chart users already know, so many existing indicator scripts run with few or no changes.
Click Scripts (or press Alt+S) to open the editor under the chart. Write a script, or pick one from Examples, and press Ctrl+Enter (Cmd+Enter on a Mac) to add it to the chart. Errors are underlined as you type, with the line, column and message below the editor. Pick a script from the list at the top left of the editor to change it later.
//@version=5
indicator("EMA cross", overlay = true)
fastLen = input.int(9, "Fast", minval = 1)
slowLen = input.int(21, "Slow", minval = 1)
fast = ta.ema(close, fastLen)
slow = ta.ema(close, slowLen)
plot(fast, "Fast", color.orange, 2)
plot(slow, "Slow", color.blue, 2)
plotshape(ta.crossover(fast, slow), "Up", shape.triangleup, location.belowbar, color.green)
Scripts with overlay = true draw on the price chart; the others get their own pane. Inputs show up in the Indicators dialog, where you can change them without touching the code. Scripts and their input values are saved with your layout. When a new candle arrives or the last one changes, only the last bar is calculated again; a full run over 1,500 bars takes a few milliseconds for typical scripts.
The indicator examples are a moving average cross, RSI with bands, MACD, Bollinger Bands, Supertrend, VWAP bands, Stochastic, an ATR trailing stop, a Donchian breakout, volume spikes and a daily EMA trend filter that uses request.security. The strategy examples are an EMA cross that is always in the market, RSI mean reversion with a stop and a target, a Donchian channel breakout, and a range breakout that waits with a buy stop above the range and a sell stop below it in one order group and stops trading after a set drawdown.
One run of a script may use 10,000,000 operations (each bar and each loop iteration counts as one, including loops inside request.security) and 1 second. A loop may repeat 100,000 times on one bar, and an array may hold up to 100,000 elements. The examples use about 5,000 operations on 5,000 bars. A script that goes over stops with an error and does not run again until you change it, its inputs or the symbol, so a heavy script cannot keep the tab busy.
Pertanyaan tentang Kandle MCP
Bagaimana cara menghubungkan AI agent saya ke Kandle?
Tambahkan server ke agent Anda menggunakan perintah npx yang tersedia, minta pairing code ke agent melalui get_bridge_status, lalu tempelkan code tersebut ke bagian Agent di aplikasi Kandle.
Apakah Kandle memerlukan akun atau server untuk menangani data saya?
Tidak, Kandle adalah aplikasi berbasis browser yang tidak memerlukan akun; data pasar langsung dikirim ke browser Anda dan chart, script, serta API keys Anda disimpan di local storage.
Apa saja yang bisa dilakukan AI agent dengan Kandle MCP server?
Agent dapat membaca status chart, mengubah symbol dan timeframe, mengelola indikator, menggambar level teknikal seperti Fibonacci retracements, mengambil screenshot, dan menjalankan backtest strategi.
Apakah koneksi antara agent dan browser aman?
Ya, bridge hanya mendengarkan pada 127.0.0.1, memerlukan pairing code untuk setiap koneksi, dan aplikasi harus mengaktifkan Agent bridge secara manual.