Get started

AI · CLI · MCP

Let an AI write your script.
In a chat like ChatGPT, the app copies everything the AI needs.
In AI coding tools, the MCP server lets the AI check and backtest its own script.

Which one to use

Where you workUseWhat happens
ChatGPT, Claude… (chat)The app’s “Make it with AI” buttonCopies the docs and your request; you paste the code back and the app checks it
Claude Code, Cursor… (AI tools)MCP server + skillThe AI reads, writes, checks and backtests by itself
TerminalCLICheck, run on real prices and backtest a file
Anything elsellms.txtThe whole language in one file, the source of all of the above

In a chat (ChatGPT, Claude…)

A chat AI can’t run code, so the app does the checking.
It takes four steps.

  1. In the app’s script editor, press Make it with AI under the code.
    The docs and a request are copied.
  2. Paste it into the chat and write what you want after “What I want:”.
  3. Paste the code you get back into the editor.
    The app checks and runs it right away.
  4. If there’s an error, press Paste the error into an AI and paste that into the chat.
    It carries the error, the line and how to fix it.
What gets copied is llms.txt, the whole language in one file.
Sending just the link often fails: many chats can’t open it, and it’s long.

MCP server

  • Claude Code, Claude Desktop, Cursor and other MCP clients can use it.
  • It runs on your computer with npx.
    Prices come straight from the exchanges’ public APIs (Binance, Upbit, Bybit, OKX), not through Funnest.
Claude Code
claude mcp add funnest-script -- npx -y @funnest/script-mcp
Claude Desktop · Cursor (MCP config)
{
  "mcpServers": {
    "funnest-script": {
      "command": "npx",
      "args": ["-y", "@funnest/script-mcp"]
    }
  }
}

Tools

ToolKindDefaultWhat it does
get_docstool—The whole language (llms.txt).
The AI reads it first
list_functionstool—The list of functions
get_functiontool—One function: signature, description, example
get_examplestool—Example scripts
check_scripttool—Type-check and a test run on sample bars
run_scripttool—Run on real exchange prices
backtest_scripttool—Backtest a strategy: return, win rate, drawdown

Skill

A skill isn’t more docs.
It tells an AI coding agent how to work: read the docs, write, check, fix, backtest, and the mistakes models often make (arithmetic with + on series, a condition straight in if, porting Pine Script).

  • It loads only when the task is about Funnest Script, so it doesn’t take the AI’s context the rest of the time.
  • Use it with the MCP server: the server gives the AI the tools, the skill says how to use them well.

skills/funnest-script: copy the folder into your agent’s skills folder (for Claude Code, ~/.claude/skills/).

CLI

  • Check a script file, run it on real prices and backtest it.
  • Symbols: BINANCEF, BINANCE, UPBIT, BYBIT, OKX (e.g.
    BINANCEF:BTCUSDT, UPBIT:KRW-BTC).
    Timeframes 1 3 5 15 30 60 120 240 1D 1W, up to 1000 bars.
  • Pass - as the file to read the script from stdin.
Terminal
npx @funnest/script-cli check my.js                    # type-check and a test run (no network)
npx @funnest/script-cli run my.js --symbol UPBIT:KRW-BTC --tf 60
npx @funnest/script-cli backtest my.js --symbol BINANCEF:BTCUSDT --tf 1D --bars 1000
npx @funnest/script-cli docs                           # the docs for AI (llms.txt)
npx @funnest/script-cli fn ta.rsi                      # one function
npx @funnest/script-cli examples cross                 # find examples
npx @funnest/script-cli backtest my.js --json          # machine-readable output