PineScript Syntax Checker

PineScript Syntax Checker

erevus-cn

Validates TradingView PineScript code syntax using TradingView's official API to catch compilation errors in trading scripts.

Validates TradingView PineScript code syntax by interfacing with TradingView's official pine-facade API, providing real-time compilation error detection for automated trading script development workflows.

13720 views6RemoteLocal (stdio)

What it does

  • Check PineScript syntax against TradingView's API
  • Detect compilation errors in trading scripts
  • Get detailed error reports with line numbers
  • Validate automated trading script code

Best for

Traders developing PineScript indicatorsAutomated trading script developmentCode validation before TradingView deployment
Uses TradingView's official APIReal-time syntax validationDetailed error location reporting

About PineScript Syntax Checker

PineScript Syntax Checker is a community-built MCP server published by erevus-cn that provides AI assistants with tools and capabilities via the Model Context Protocol. Use PineScript Syntax Checker to validate TradingView PineScript code instantly, detect errors, and streamline your auto It is categorized under developer tools. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.

How to install

You can install PineScript Syntax Checker in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport. This server supports remote connections over HTTP, so no local installation is required.

License

PineScript Syntax Checker is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (1)

check_syntax

Check PineScript syntax using TradingView's API Args: pine_code: PineScript code to check Returns: result: Dictionary containing syntax check results

PineScript Syntax Checker MCP Server

A Model Context Protocol (MCP) server for checking PineScript syntax using TradingView's API.

Features

  • Check PineScript syntax using TradingView's official API
  • MCP-compatible server with httpx for async HTTP requests
  • Detailed error reporting with line and column information

Quick Start

Option 1: Using uvx (Recommended)

# Run directly (will install automatically if needed)
uvx pinescript-syntax-checker

Option 2: Using uv (Development)

# Clone and run
git clone https://github.com/erevus-cn/pinescript-syntax-checker.git
cd pinescript-syntax-checker
uv sync
uv run python -m pinescript_syntax_checker.server

Option 3: Using pip

# Install from PyPI
pip install pinescript-syntax-checker

# Run directly
pinescript-syntax-checker

# Or as module
python -m pinescript_syntax_checker.server

MCP Integration

Configure in Cursor

To use this MCP server in Cursor:

  1. Open Cursor Settings:

    • Press Cmd+, (macOS) or Ctrl+, (Windows/Linux)
    • Go to "Extensions" → "MCP"
  2. Add Server Configuration:

    Method 1 - Using uvx (Recommended):

    {
      "mcpServers": {
        "pinescript-syntax-checker": {
          "command": "uvx",
          "args": ["pinescript-syntax-checker"]
        }
      }
    }
    

    Method 2 - Using installed package:

    {
      "mcpServers": {
        "pinescript-syntax-checker": {
          "command": "python",
          "args": ["-m", "pinescript_syntax_checker.server"]
        }
      }
    }
    
  3. Restart Cursor to load the MCP server

Verify Installation

To verify the MCP server is working correctly:

  1. In Cursor: After configuration, try asking:
    Can you check this PineScript code for syntax errors?
    
    //@version=5
    indicator("Test", overlay=true)
    plot(close)
    

API

check_syntax

Checks PineScript syntax using TradingView's API.

Parameters:

  • pine_code (str): The PineScript code to check

Example

Input:

//@version=5
strategy("Test")
plot(close)

Output:

{
  "success": true,
  "result": {
    "variables": [],
    "functions": [],
    "types": [],
    "enums": [],
    "scopes": []
  }
}

License

MIT License

Alternatives

Related Skills

Browse all skills
slidev

Comprehensive guide for Slidev - a web-based presentation framework for developers. Covers Markdown syntax, layouts, components, animations, theming, and exporting. Use this skill when creating or working with developer presentations using Slidev.

264
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

4
ruby-coder

This skill guides writing of new Ruby code following modern Ruby 3.x syntax, Sandi Metz's 4 Rules for Developers, and idiomatic Ruby best practices. Use when creating new Ruby files, writing Ruby methods, or refactoring Ruby code to ensure adherence to clarity, simplicity, and maintainability standards.

4
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

4