PineScript MCP Project

by cklose2000

102 stars
391 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server for working with TradingView PineScript

Details

Author
cklose2000
GitHub stars
102
Downloads
391
Categories
Other

- Strategy creation and editing
- Backtesting capabilities
- Performance analysis
- Strategy optimization
- TradingView integration
- Claude Desktop integration for AI-assisted development

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PineScript MCP Project
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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.

pine_search

Full-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'.

pine_reference

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.

pine_guide

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.

pine_examples

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'.

pine_categories

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pinescript mcp project": {
            "pinescript-mcp-server": {
                "command": "npx",
                "args": [
                    "pinescript-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "pinescript-mcp-server": {
        "command": "npx",
        "args": [
            "pinescript-mcp-server"
        ]
    }
}

PineScript MCP Project

A comprehensive tool for creation, optimization, and management of PineScript trading strategies.

Project Structure

├── src/             # Core application code
├── ui/              # Next.js web interface
├── dist/            # Compiled JavaScript
├── docs/            # Documentation
├── scripts/         # Utility scripts
│   ├── server/      # Server management scripts
│   ├── network/     # Network diagnostics scripts
│   └── docs/        # Documentation
├── data/            # Data files
├── tests/           # Application tests
├── examples/        # Example scripts and strategies
└── memory-bank/     # Project context and information

Quick Start

1. Install dependencies:

   npm install

2. Start the UI (choose one method):

   # Standard Next.js development server
npm run ui

# Clean start with port cleanup
npm run ui:clean

# Alternative Express server (if Next.js has issues)
npm run ui:express

# Desktop app (no web server required)
npm run ui:electron

3. Access the web interface at:

   http://localhost:3001

(Not required for the desktop app option)

UI Options

The project includes multiple ways to access the UI:

1. Next.js Development Server

```bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.