Skip to main content

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

Metadata

Release files for iflow-mcp_erevus-pinescript_syntax_checker 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_erevus-pinescript_syntax_checker 0.1.0
File Size Uploaded
iflow_mcp_erevus_pinescript_syntax_checker-0.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_erevus-pinescript_syntax_checker 0.1.0
File Interpreter ABI Platform
iflow_mcp_erevus_pinescript_syntax_checker-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / iflow_mcp_erevus_pinescript_syntax_checker-0.1.0.tar.gz

Download URL iflow_mcp_erevus_pinescript_syntax_checker-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c1c29936ed3c9db45564e9ea4d96e937c8f4b51e040a4241fbc814efa976ecd7
BLAKE2b-256 checksum
How to use checksums
b8779f90767e40183dd0671f99d1c65fafd8778b2ba07b16c4ad89479333590a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_erevus_pinescript_syntax_checker-0.1.0-py3-none-any.whl

Download URL iflow_mcp_erevus_pinescript_syntax_checker-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd171eb4de0f33782c016e5afbe7f1a3d26338e7a69927f399628c3142ef6346
BLAKE2b-256 checksum
How to use checksums
c7ade4681cd0b08c6652a44371a4c717077380faf5faaa0089ba078427d48574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page