Individual TradingView Backtest Assistant

Individual TradingView Backtest Assistant

exposes a remote MCP endpoint so agents can: run strategy backtests by symbol/timeframe/date range, pass strategy inputs programmatically, receive structured backtest results (trades, win rate, profit, drawdown), keep long-running runs observable via progress notifications, support Binance Futures tickers only, enforce a maximum of 1440 candles per backtest, apply a rate limit of 3 backtests per

Category
Visit Server

README

Backtesting engine for your AI Agent with PineScript support for TradingView usage


TV PineScript Backtest MCP


Beta Supports Limits

Production-ready MCP server for running TradingView Pine Script strategy backtests (Binance data) from AI agents.

<p align="left"> <a href="#quick-overview">Overview</a> • <a href="#connect-to-your-agent">Connect</a> • <a href="#supported-agents">Supported Agents</a> • <a href="#troubleshooting">Troubleshooting</a> • <a href="https://backtest-engine-mcp.click/dashboard" target="_blank" rel="noopener noreferrer">Get API Key</a> • <a href="https://backtest-engine-mcp.click/" target="_blank" rel="noopener noreferrer">Website</a> </p>

Quick Overview

tv-pinescript-backtest-mcp exposes a remote MCP endpoint so agents can:

  • run strategy backtests by symbol/timeframe/date range,
  • pass strategy inputs programmatically,
  • receive structured backtest results (trades, win rate, profit, drawdown),
  • keep long-running runs observable via progress notifications,
  • support Binance Futures tickers only,
  • enforce a maximum of 1440 candles per backtest,
  • apply a rate limit of 3 backtests per minute per user,
  • ask your agent to write a strategy and backtest it.

Connect To Your Agent

Get API key: <a href="https://backtest-engine-mcp.click/dashboard" target="_blank" rel="noopener noreferrer">https://backtest-engine-mcp.click/dashboard</a>

You need:

  1. Your MCP server URL (https://backtest-engine-mcp.click/mcp/backtest)
  2. Your API key (Bearer token)

Use HTTP transport and pass the API key in Authorization: Bearer <API_KEY>.

Supported Agents

Claude Code

CLI:

claude mcp add --transport http tvmcp https://backtest-engine-mcp.click/mcp/backtest --header "Authorization: Bearer <API_KEY>"

Project file (.mcp.json):

{
  "mcpServers": {
    "tvmcp": {
      "type": "http",
      "url": "https://backtest-engine-mcp.click/mcp/backtest",
      "headers": {
        "Authorization": "Bearer <API_KEY>"
      }
    }
  }
}

OpenCode

opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "tvmcp": {
      "type": "remote",
      "url": "https://backtest-engine-mcp.click/mcp/backtest",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer <API_KEY>"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "tvmcp": {
      "url": "https://backtest-engine-mcp.click/mcp/backtest",
      "headers": {
        "Authorization": "Bearer <API_KEY>"
      }
    }
  }
}

Note: the same MCP configuration is used by cursor-agent CLI.

Codex

Add to ~/.codex/config.toml (or .codex/config.toml in a trusted project):

[mcp_servers.tvmcp]
url = "https://backtest-engine-mcp.click/mcp/backtest"
http_headers = { Authorization = "Bearer <API_KEY>" }

Note: Codex CLI and IDE extension share the same config.toml.

VS Code

Open MCP configuration (.vscode/mcp.json or user mcp.json) and add:

{
  "servers": {
    "tvmcp": {
      "type": "http",
      "url": "https://backtest-engine-mcp.click/mcp/backtest",
      "headers": {
        "Authorization": "Bearer <API_KEY>"
      }
    }
  }
}

If needed, use Command Palette: MCP: Open User Configuration.

Minimal Test Prompt

Try these prompts with your agent:

Optimize my strategy: <pinescript code>
Optimize my strategy from file: sma20.pine
Find a strategy on the internet and backtest it using the tvmcp backtest tool.
Backtest my strategy on BTCUSDT 1h from 2026-03-01 to 2026-03-10, Pine code:
//@version...

Troubleshooting

The backtest-engine server has been tested on 30 strategies and tuned to match TradingView backtests 1:1 as closely as possible. Some operators may still be unsupported.

If you hit this case, please create a minimal strategy that reproduces the issue and submit it in Issues. We will do our best to add support quickly.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured