Pine Script v6 Documentation

io.github.paulieb89Published by GitHub account paulieb89v0.6.17Updated Oct 24, 2026

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

VerifiedStreamable HTTPWeb executableKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Serves bundled Pine Script v6 documentation so an assistant can look up functions, read reference sections and validate function names before writing Trading-

What you can do
Search and resolve documentation topics across the bundled Pine Script v6 docs, with ranked section previews and follow-up hints. Browse and read documentation files, list their sections and fetch a named section by header. List valid v6 functions by namespace and validate a function name, returning replacement hints for deprecated or unknown names. List and render built-in prompt templates, such as debugging a compilation error or converting v5 code to v6.
When to use it
Useful when an assistant writes or reviews Pine Script v6 indicators and strategies and needs grounded function names, parameter guidance and concept explanations instead of guessing. Also handy for checking whether a function exists or for converting older v5 code.
Requirements
Either connect to the hosted remote endpoint over streamable HTTP, or run the PyPI package locally with uvx (Python tooling required). No account, API key or environment variable is declared. Documentation is bundled in the package, so no network access is needed for local use.
Before you install
Read-only documentation lookup; no writes, payments or credentials are involved. The hosted endpoint receives your queries, so avoid sending sensitive code or data to it. Unpinned local installs fetch the latest version, which may change the bundled documentation snapshot; pin a version for reproducible behaviour.

Installation

In SourceWeft

  1. Open Pine Script v6 Documentation in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.paulieb89%2Fpinescript-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "pine-script-v6-documentation": {
      "type": "http",
      "url": "https://pinescript-mcp.fly.dev/mcp"
    }
  }
}

README

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:

json
{  "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):

json
{  "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:

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:

json
{  "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

bash
# Clone and install locallygit clone https://github.com/paulieb89/pinescript-mcpcd pinescript-mcppip install -e .
# Run the serverpinescript-mcp

License

MIT

Source: README.md at commit 28acf2c

Tools

10

list_docs

USE WHEN discovering what Pine Script v6 documentation is available. Returns a categorised list of doc file paths with one-line descriptions. AFTER calling this tool, call get_doc(path) for small files or list_sections(path) then get_section(path, header) for large files (ta.md, strategy.md, collections.md, drawing.md, general.md). Data sourced from bundled Pine Script v6 documentation.

Takes no parameters.

list_sections

USE WHEN navigating a large documentation file before reading a specific section. Returns a newline-separated list of # and ## headers (### excluded) in the file. AFTER calling this tool, call get_section(path, header) with a header from this list. Data sourced from bundled Pine Script v6 documentation.

Parameterspathrequired

get_doc

USE WHEN reading the full content of a Pine Script v6 documentation file. Returns the file content; when limit is set, a header shows the char range and offset to continue reading. AFTER calling this tool, use offset=<end> to continue if the header indicates more content is available. For large files (ta.md, strategy.md, collections.md, drawing.md, general.md), prefer list_sections() + get_section() instead. Data sourced from bundled Pine Script v6 documentation.

Parameterspathrequiredlimitoffset

get_section

USE WHEN reading a specific named section from a Pine Script v6 documentation file. Returns the section content from the matched header to the next same-level header, with file path and line range. AFTER calling this tool, call list_sections(path) if the header was not found, or get_section() again with a child header for a narrower subsection. Data sourced from bundled Pine Script v6 documentation.

Parameterspathrequiredheaderrequiredinclude_children

search_docs

USE WHEN finding documentation sections that match specific terms across all Pine Script v6 docs. Returns up to max_results sections ranked by match count, each with a preview and a get_section() call hint. AFTER calling this tool, call get_section(file, header) for each result you want to read in full. Data sourced from bundled Pine Script v6 documentation.

Parametersqueryrequiredmax_results

get_functions

USE WHEN browsing valid Pine Script v6 functions, optionally filtered to a namespace. Returns function names grouped by namespace (e.g. ta.*, strategy.*) or filtered to the requested namespace. AFTER calling this tool, call validate_function(fn_name) to check a specific name, or get_section() to read its documentation. Data sourced from bundled pine_v6_functions.json.

Parametersnamespace

validate_function

USE WHEN confirming a Pine Script v6 function name is valid before using it in code. Returns a valid/invalid verdict with namespace suggestions or known replacement hints (e.g. ta.adx → ta.dmi, security → request.security). AFTER calling this tool, call get_functions(namespace) to list all valid functions in the relevant namespace if the function is invalid. Data sourced from bundled pine_v6_functions.json.

Parametersfn_namerequired

resolve_topic

USE WHEN looking up an exact Pine Script API term or known concept keyword. Returns the best-matching doc paths with matched keywords and a retrieval suggestion (get_doc or list_sections + get_section). AFTER calling this tool, follow the suggestion: call get_doc() for small files or list_sections() + get_section() for large files. For natural language questions use search_docs() instead. Data sourced from bundled TOPIC_MAP and doc file content scan.

Parametersqueryrequired

list_prompts

List all available prompts. Returns JSON with prompt metadata including name, description, and optional arguments.

Takes no parameters.

get_prompt

Get a prompt by name with optional arguments. Returns the rendered prompt as JSON with a messages array. Arguments should be provided as a dict mapping argument names to values.

Parametersnamerequiredarguments

Version history

1
  1. v0.6.17LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts