PluginBench
MCP Server
Maintained
MIT

Pine Script v6 Documentation MCP Server

io.github.paulieb89/pinescript-mcp

Pine Script v6 documentation lookup and function validation for AI code generation

What is the Pine Script v6 Documentation MCP server?

The Pine Script v6 Documentation MCP server provides AI assistants with access to official Pine Script v6 documentation, function validation, and linting capabilities. It enables Claude and other AI models to look up functions, validate syntax, and generate correct Pine Script code by grounding responses in actual v6 documentation rather than hallucinated or deprecated syntax.

This server helps AI assistants write accurate Pine Script v6 code by providing real-time access to official documentation, function validation, and concept explanations. It prevents common mistakes like using non-existent functions, deprecated v5 syntax, or incorrect parameter orders by grounding the AI in a comprehensive, bundled documentation snapshot.

How to install Pine Script v6 Documentation

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "pinescript-mcp": {
      "command": "uvx",
      "args": [
        "pinescript-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • resolve_topic — Fast lookup for exact API terms (e.g., ta.rsi, repainting)
  • search_docs — Grep for exact strings across all documentation
  • list_docs — List all documentation files with descriptions
  • list_sections — List section headers in a doc file for navigation
  • get_doc — Read a specific documentation file
  • get_section — Read a specific section by header
  • get_functions — List valid functions in a namespace (ta, strategy, etc.)
  • validate_function — Check if a function exists in Pine Script v6
  • list_resources — Browse available documentation resources
  • read_resource — Read a doc resource by URI (e.g., docs://manifest)
  • list_prompts — List available prompt templates
  • get_prompt — Render a prompt template with arguments
  • debug_error — Analyze a Pine Script compilation error
  • convert_v5_to_v6 — Convert Pine Script v5 code to v6 syntax
  • explain_function — Explain a Pine Script function in detail

Use cases

  • Generate Pine Script v6 indicators and strategies with correct function references
  • Debug Pine Script compilation errors with AI assistance
  • Convert Pine Script v5 code to v6 syntax automatically
  • Understand Pine Script concepts like execution model, repainting, and timeframes
  • Validate function names and parameters before code generation

Pine Script v6 Documentation MCP server FAQ

What is the Pine Script v6 Documentation MCP server?

It's an MCP server that gives AI assistants like Claude access to official Pine Script v6 documentation, function validation, and linting tools. It prevents hallucinated functions and deprecated syntax by grounding responses in actual v6 docs.

Is it free to use?

Yes. The server is open-source (MIT license) and available via PyPI. A public hosted version is also available at https://pinescript-mcp.fly.dev/mcp with no installation required.

How do I install it in Cursor?

Use the one-click install badge in the README, or manually add the remote HTTP server URL (https://pinescript-mcp.fly.dev/mcp) to your Cursor MCP config. No local installation needed.

How do I install it in Claude Desktop?

Add the server to your Claude Desktop config file using either the local stdio method (uvx pinescript-mcp) or the remote HTTP URL (https://pinescript-mcp.fly.dev/mcp).

Does it require authentication?

No authentication is required. The public server is freely accessible, and the local version uses only standard Python tooling.

What Pine Script versions does it support?

The server provides comprehensive Pine Script v6 documentation and can help convert v5 code to v6, but it is specifically designed for v6 syntax and functions.

README (reference)

Source of truth, from the repository.

pinescript-mcp

<!-- mcp-name: io.github.paulieb89/pinescript-mcp -->

PyPI Glama smithery badge 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"]
    }
  }
}

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

ToolDescription
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

PromptDescription
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

URIDescription
docs://manifestStart here — routing guide for Pine Script questions
docs://functionsComplete 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

Related MCP servers

UKUK Property Data logo

UK property data in one package: Land Registry comps, EPC, Rightmove, yields, stamp duty, and Companies House.

15
Python
MIT
View repository →

UK due diligence — Companies House, Charity Commission, Land Registry, Gazette, HMRC VAT

3
Python
MIT
View repository →
UKUK Legal Research logo

Access UK case law, legislation, Hansard, bills, votes, and HMRC guidance for AI-assisted legal research.

12
Python
MIT
View repository →
BABAILII UK Case Law logo

Search UK case law on BAILII — court judgments with section extraction. Runs locally.

4
Python
View repository →

MCP server para gerenciamento de certidoes de cartorio via IA.

View repository →

Vendedores da Amazon Brasil com CNPJ conferido na Receita Federal: razão social, porte e sócios