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)
# Install and run directly
uvx pinescript-syntax-checker
# Or install first, then run
uvx install pinescript-syntax-checker
uvx run pinescript-syntax-checker
Option 2: Using uv
# Clone and run
git clone https://github.com/erevus-cn/pinescript-syntax-checker.git
cd pinescript-syntax-checker
uv sync
uv run python run_server.py
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
Install MCP Server
# If using uvx
uvx pinescript-syntax-checker --mcp-install
# If using local development
uv run mcp install run_server.py
Configure in Cursor
Method 1: No Configuration Required (Recommended)
After installing with uvx, the server will be automatically available in Cursor.
Method 2: Manual Configuration
If you need manual configuration:
-
Open Cursor Settings:
- Press
Cmd+,(macOS) orCtrl+,(Windows/Linux) - Go to "Extensions" → "MCP"
- Press
-
Add Server Configuration:
{ "mcpServers": { "pinescript-syntax-checker": { "command": "python", "args": ["-m", "pinescript_syntax_checker.server"] } } }
-
Restart Cursor to load the MCP server
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 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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pinescript_syntax_checker-0.1.0.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pinescript_syntax_checker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / pinescript_syntax_checker-0.1.0.tar.gz
| Download URL | pinescript_syntax_checker-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ac1c1a6b090d9daa883a8420e7c7037ca6d56f5715045d0a64d8949ece3723f
|
|
BLAKE2b-256 checksum How to use checksums |
3d83817720bd169c6a6469df576b6ce54eebea8cd2dbd483204ab3f2e272a27d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / pinescript_syntax_checker-0.1.0-py3-none-any.whl
| Download URL | pinescript_syntax_checker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3890b68df3945f44c4d494070b7bf2c8eeaf89074386d32b8f1aed49323be11
|
|
BLAKE2b-256 checksum How to use checksums |
90ece942dd964ce4878cb125f865ce5dc44baa8dcdd088a31871b44015147d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for pinescript-syntax-checker 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.