pinescript-syntax-checker


Namepinescript-syntax-checker JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Model Context Protocol (MCP) server for checking PineScript syntax using TradingView's API
upload_time2025-08-03 13:41:25
maintainererevus-cn
docs_urlNone
authorerevus-cn
requires_python>=3.10
licenseMIT
keywords mcp pinescript syntax-checker trading tradingview
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)

```bash
# 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

```bash
# 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

```bash
# 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

```bash
# 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:

1. **Open Cursor Settings**:
   - Press `Cmd+,` (macOS) or `Ctrl+,` (Windows/Linux)
   - Go to "Extensions" → "MCP"

2. **Add Server Configuration**:
   ```json
   {
     "mcpServers": {
       "pinescript-syntax-checker": {
         "command": "python",
         "args": ["-m", "pinescript_syntax_checker.server"]
       }
     }
   }
   ```

3. **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:**
```pinescript
//@version=5
strategy("Test")
plot(close)
```

**Output:**
```json
{
  "success": true,
  "result": {
    "variables": [],
    "functions": [],
    "types": [],
    "enums": [],
    "scopes": []
  }
}
```

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pinescript-syntax-checker",
    "maintainer": "erevus-cn",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "mcp, pinescript, syntax-checker, trading, tradingview",
    "author": "erevus-cn",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/3d/83/817720bd169c6a6469df576b6ce54eebea8cd2dbd483204ab3f2e272a27d/pinescript_syntax_checker-0.1.0.tar.gz",
    "platform": null,
    "description": "# PineScript Syntax Checker MCP Server\n\nA Model Context Protocol (MCP) server for checking PineScript syntax using TradingView's API.\n\n## Features\n\n- Check PineScript syntax using TradingView's official API\n- MCP-compatible server with httpx for async HTTP requests\n- Detailed error reporting with line and column information\n\n## Quick Start\n\n### Option 1: Using uvx (Recommended)\n\n```bash\n# Install and run directly\nuvx pinescript-syntax-checker\n\n# Or install first, then run\nuvx install pinescript-syntax-checker\nuvx run pinescript-syntax-checker\n```\n\n### Option 2: Using uv\n\n```bash\n# Clone and run\ngit clone https://github.com/erevus-cn/pinescript-syntax-checker.git\ncd pinescript-syntax-checker\nuv sync\nuv run python run_server.py\n```\n\n### Option 3: Using pip\n\n```bash\n# Install from PyPI\npip install pinescript-syntax-checker\n\n# Run directly\npinescript-syntax-checker\n\n# Or as module\npython -m pinescript_syntax_checker.server\n```\n\n## MCP Integration\n\n### Install MCP Server\n\n```bash\n# If using uvx\nuvx pinescript-syntax-checker --mcp-install\n\n# If using local development\nuv run mcp install run_server.py\n```\n\n### Configure in Cursor\n\n#### Method 1: No Configuration Required (Recommended)\n\nAfter installing with `uvx`, the server will be automatically available in Cursor.\n\n#### Method 2: Manual Configuration\n\nIf you need manual configuration:\n\n1. **Open Cursor Settings**:\n   - Press `Cmd+,` (macOS) or `Ctrl+,` (Windows/Linux)\n   - Go to \"Extensions\" \u2192 \"MCP\"\n\n2. **Add Server Configuration**:\n   ```json\n   {\n     \"mcpServers\": {\n       \"pinescript-syntax-checker\": {\n         \"command\": \"python\",\n         \"args\": [\"-m\", \"pinescript_syntax_checker.server\"]\n       }\n     }\n   }\n   ```\n\n3. **Restart Cursor** to load the MCP server\n\n## API\n\n### check_syntax\n\nChecks PineScript syntax using TradingView's API.\n\n**Parameters:**\n- `pine_code` (str): The PineScript code to check\n\n## Example\n\n**Input:**\n```pinescript\n//@version=5\nstrategy(\"Test\")\nplot(close)\n```\n\n**Output:**\n```json\n{\n  \"success\": true,\n  \"result\": {\n    \"variables\": [],\n    \"functions\": [],\n    \"types\": [],\n    \"enums\": [],\n    \"scopes\": []\n  }\n}\n```\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Model Context Protocol (MCP) server for checking PineScript syntax using TradingView's API",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/erevus-cn/pinescript-syntax-checker/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/erevus-cn/pinescript-syntax-checker#readme",
        "Homepage": "https://github.com/erevus-cn/pinescript-syntax-checker",
        "Issues": "https://github.com/erevus-cn/pinescript-syntax-checker/issues",
        "Repository": "https://github.com/erevus-cn/pinescript-syntax-checker"
    },
    "split_keywords": [
        "mcp",
        " pinescript",
        " syntax-checker",
        " trading",
        " tradingview"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "90ece942dd964ce4878cb125f865ce5dc44baa8dcdd088a31871b44015147d21",
                "md5": "b191ba60c81146f6f4d4966f5c05e074",
                "sha256": "f3890b68df3945f44c4d494070b7bf2c8eeaf89074386d32b8f1aed49323be11"
            },
            "downloads": -1,
            "filename": "pinescript_syntax_checker-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b191ba60c81146f6f4d4966f5c05e074",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5426,
            "upload_time": "2025-08-03T13:41:24",
            "upload_time_iso_8601": "2025-08-03T13:41:24.121615Z",
            "url": "https://files.pythonhosted.org/packages/90/ec/e942dd964ce4878cb125f865ce5dc44baa8dcdd088a31871b44015147d21/pinescript_syntax_checker-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3d83817720bd169c6a6469df576b6ce54eebea8cd2dbd483204ab3f2e272a27d",
                "md5": "3fedbfa14a6032d9af5338d7092176de",
                "sha256": "3ac1c1a6b090d9daa883a8420e7c7037ca6d56f5715045d0a64d8949ece3723f"
            },
            "downloads": -1,
            "filename": "pinescript_syntax_checker-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3fedbfa14a6032d9af5338d7092176de",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3963,
            "upload_time": "2025-08-03T13:41:25",
            "upload_time_iso_8601": "2025-08-03T13:41:25.318190Z",
            "url": "https://files.pythonhosted.org/packages/3d/83/817720bd169c6a6469df576b6ce54eebea8cd2dbd483204ab3f2e272a27d/pinescript_syntax_checker-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 13:41:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "erevus-cn",
    "github_project": "pinescript-syntax-checker",
    "github_not_found": true,
    "lcname": "pinescript-syntax-checker"
}
        
Elapsed time: 1.66059s