Skip to main content
Glama

pinescript-mcp

PyPI Glama Install in VS Code Install in VS Code Insiders Install in Cursor Install in VS Code (local)

MCP server providing Pine Script v6 documentation for AI assistants (Claude, etc.).

Enables AI to:

  • Look up Pine Script functions and validate syntax

  • Access official documentation for indicators, strategies, and visuals

  • Understand Pine Script concepts (execution model, repainting, etc.)

  • Generate correct v6 code with proper function references

Quick Start (stdio)

Works with Claude Code, Claude Desktop, Gemini CLI, and any MCP client that supports stdio:

{
  "mcpServers": {
    "pinescript-docs": {
      "type": "stdio",
      "command": "uvx",
      "args": ["pinescript-mcp"]
    }
  }
}

Related MCP server: TradingView MCP Server

Public Server (No Install Required)

No Python or uvx needed — connect directly to the hosted server.

Streamable HTTP — Claude Code, mcpServers with type field):

{
  "mcpServers": {
    "pinescript-docs": {
      "type": "http",
      "url": "https://pinescript-mcp.fly.dev/mcp"
    }
  }
}

Windsurf — uses its own shape (see Windsurf docs). Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "pinescript-docs": {
      "serverUrl": "https://pinescript-mcp.fly.dev/mcp"
    }
  }
}

ChatGPT — no config file. In ChatGPT, go to Settings → Connectors → Create and paste https://pinescript-mcp.fly.dev/mcp into the Server URL field. Developer Mode must be enabled (see OpenAI Developer Mode guide).

Claude.ai — add via the web UI's MCP connector settings, not a JSON file.

Version Pinning

Documentation is bundled in the package — each version contains a frozen snapshot. For reproducible agent behaviour, pin to a specific version:

{
  "mcpServers": {
    "pinescript-docs": {
      "command": "uvx",
      "args": ["pinescript-mcp==0.7.6"]
    }
  }
}

Without pinning, uvx pinescript-mcp gets the latest version.

Available Tools

Tool

Description

resolve_topic(query)

Fast lookup for exact API terms (ta.rsi, repainting)

search_docs(query)

Grep for exact strings across all docs

list_docs()

List all documentation files with descriptions

list_sections(path)

List ## headers in a doc file (for navigating large files)

get_doc(path)

Read a specific documentation file

get_section(path, header)

Read a specific section by header

get_functions(namespace)

List valid functions (ta, strategy, etc.)

validate_function(name)

Check if a function exists in Pine v6

list_resources()

Browse available documentation resources

read_resource(uri)

Read a doc resource by URI (e.g. docs://manifest)

list_prompts()

List available prompt templates

get_prompt(name, arguments)

Render a prompt template with arguments

Available Prompts

Prompt

Description

debug_error(error, code)

Analyze a Pine Script compilation error

convert_v5_to_v6(code)

Convert Pine Script v5 code to v6 syntax

explain_function(name)

Explain a Pine Script function in detail

Available Resources

URI

Description

docs://manifest

Start here — routing guide for Pine Script questions

docs://functions

Complete Pine Script v6 function list (JSON)

docs://{path}

Any doc file by path (e.g. concepts/timeframes.md)

Example Queries

  • "How do I create a trailing stop in Pine Script?"

  • "What's the difference between var and varip?"

  • "Is ta.supertrend a valid function?"

  • "How do I avoid repainting with request.security?"

Documentation Coverage

The server bundles comprehensive Pine Script v6 documentation:

  • Concepts: Execution model, timeframes, colors, methods, objects, common errors

  • Reference: Types, variables, constants, keywords, operators, annotations

  • Functions: Technical analysis (ta.*), strategies, requests, drawings, collections

  • Visuals: Plots, fills, shapes, tables, lines, boxes, backgrounds

  • Writing Scripts: Style guide, debugging, optimization, limitations

Why Use This?

AI models often hallucinate Pine Script functions or use deprecated v5 syntax. This MCP server grounds the AI in actual v6 documentation, preventing:

  • Made-up function names (e.g., ta.hull doesn't exist, use ta.hma)

  • Deprecated syntax from v4/v5

  • Incorrect parameter orders

  • Missing required arguments

Skills

Combine with skills for even more control available at bouch.dev/products/pine-strategy-builder.

Development

# Clone and install locally
git clone https://github.com/paulieb89/pinescript-mcp
cd pinescript-mcp
pip install -e .

# Run the server
pinescript-mcp

License

MIT

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
5dRelease cycle
4Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    F
    maintenance
    Provides accurate Pine Script v6 coding assistance through search, completion, and reference lookup tools using a comprehensive Japanese manual database. Enables developers to quickly find functions, constants, annotations, and API specifications for TradingView Pine Script development.
    Last updated
    1
  • A
    license
    -
    quality
    B
    maintenance
    Enables trading analysis across Forex, Stocks, and Crypto with 25+ technical indicators, real-time market data, and Pine Script v6 development tools including syntax validation, autocomplete, and version conversion.
    Last updated
    49
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Backtest PineScript v6 strategies locally from your AI agent: transpiles Pine to C++ and runs it on the deterministic, TradingView-validated PineForge engine via Docker. Tools for single backtests, parameter-grid sweeps, and Binance OHLCV fetch — no API key, data never leaves your machine.
    Last updated
    11
    548
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.

  • 500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.

  • @latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/pinescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server