PineScript MCP Project
@cklose2000
About PineScript MCP Project
A Model Context Protocol (MCP) server for working with TradingView PineScript
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"pinescript-mcp-server": {
"command": "npx",
"args": [
"pinescript-mcp-server"
]
}
}
}Tools
5Full-text search across all Pine Script v6 documentation. Use this for general queries about concepts, patterns, or topics when you don't know the exact function name. Returns ranked results from both the reference manual and user guide. Prefer pine_reference for known function/variable names, and pine_guide for conceptual topics like 'execution model' or 'strategies'.
Look up a specific Pine Script v6 function, variable, or type by exact name. Returns the full signature, parameters, description, and code examples. This should be your FIRST choice when you know the function name (e.g., 'ta.sma', 'strategy.entry', 'close', 'request.security'). Supports short names like 'sma' which auto-resolve to 'ta.sma'. Use the format parameter to get just the signature or just examples.
Retrieve conceptual guide topics from the Pine Script user guide. Use for learning how something works β execution model, strategies, plotting, timeframes, etc. NOT for function lookups (use pine_reference instead). Set listTopics=true to discover all available topics before searching.
Search for Pine Script code examples by keyword. Extracts and deduplicates code blocks from documentation. Use when you need executable code patterns rather than documentation text. For the official example of a specific function, prefer pine_reference with format='examples'.
Discover what's available in Pine Script by browsing categories. Call without arguments to list all categories (ta, strategy, request, math, etc.) and their entry counts. Provide a category name to see all functions/variables in that category with descriptions. Great for exploration when you're not sure what functions exist.
Overview
What is PineScript MCP Project?
The PineScript MCP Project is a comprehensive tool for the creation, optimization, and management of PineScript trading strategies. It integrates with Claude Desktop for AI-assisted development and provides multiple user interfaces, including Next.js, Express, and Electron desktop app options.
How to use PineScript MCP Project?
Install dependencies with npm install, then start one of the UI options: npm run ui for Next.js, npm run ui:express for Express, or npm run ui:electron for the desktop app. Access the web interface at http://localhost:3001. For Claude Desktop integration, run npx pinescript-mcp-server (macOS) or add it via the Claude CLI. Detailed setup is in the documentation.
Key features of PineScript MCP Project
- Strategy creation and editing
- Backtesting capabilities
- Performance analysis
- Strategy optimization
- TradingView integration
- Claude Desktop integration for AI-assisted development
Use cases of PineScript MCP Project
- Develop and test PineScript trading strategies with an intuitive web UI or desktop app
- Leverage AI assistance from Claude Desktop to generate and refine PineScript code
- Perform historical backtesting and parameter optimization on trading strategies
- Troubleshoot connectivity and firewall issues with bundled network scripts
- Run strategy development entirely offline using the Electron desktop application
FAQ from PineScript MCP Project
What are the system requirements for PineScript MCP Project?
Node.js v18 or higher and npm v8 or higher are required.
How do I troubleshoot UI connection issues?
Check firewall settings, run the firewall exception script (npm run firewall:allow), and refer to docs/ui-connect-guide.md. The Electron desktop app (npm run ui:electron) avoids web server connectivity problems entirely.
Where does the project store data and configuration?
Data files are stored in the data/ directory. Example MCP configurations are provided in .mcp.json.example files for macOS and Windows.
How do I integrate PineScript MCP Project with Claude Desktop?
On macOS, run npx pinescript-mcp-server or use claude mcp add pinescript-server npx --args pinescript-mcp-server. On Windows, run claude mcp add pinescript-server cmd --args /c npx pinescript-mcp-server.
What alternative UI options are available besides the web interface?
You can use the Next.js development server, a simpler Express server, a basic HTML test page server (npm run ui:test), or the Electron desktop application which does not require a web server.
Frequently asked questions
What are the system requirements for PineScript MCP Project?
Node.js v18 or higher and npm v8 or higher are required.
How do I troubleshoot UI connection issues?
Check firewall settings, run the firewall exception script (`npm run firewall:allow`), and refer to `docs/ui-connect-guide.md`. The Electron desktop app (`npm run ui:electron`) avoids web server connectivity problems entirely.
Where does the project store data and configuration?
Data files are stored in the `data/` directory. Example MCP configurations are provided in `.mcp.json.example` files for macOS and Windows.
How do I integrate PineScript MCP Project with Claude Desktop?
On macOS, run `npx pinescript-mcp-server` or use `claude mcp add pinescript-server npx --args pinescript-mcp-server`. On Windows, run `claude mcp add pinescript-server cmd --args /c npx pinescript-mcp-server`.
What alternative UI options are available besides the web interface?
You can use the Next.js development server, a simpler Express server, a basic HTML test page server (`npm run ui:test`), or the Electron desktop application which does not require a web server.
Basic information
More Other MCP servers
ghidraMCP
LaurieWiredMCP Server for Ghidra
π Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
MCP Go π
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
FastMCP v2 π
jlowinπ The fast, Pythonic way to build MCP servers and clients.
Comments