paulieb89 avatar

Pine Script v6 Documentation

paulieb89/pinescript-mcp

Connects Claude and other MCP clients to Pine Script v6 documentation with lookup, validation, and linting tools. You get exact function checks (like whether ta.supertrend exists), doc searches across concepts like repainting and execution models, and prompts for debugging errors or converting v5 code. Built for traders and quants writing TradingView strategies who need AI to stop hallucinating deprecated syntax or inventing functions. Runs over stdio locally via uvx or hits a hosted endpoint at pinescript-mcp.fly.dev for zero setup. Documentation is bundled and versioned, so pinning to a release keeps your agent behavior consistent. Includes the full v6 reference plus style guides and common gotchas.

GitHub stars
2
tools
10
transport
STDIO, HTTP, SSE
last updated
Apr 4, 2026

Install

From registry metadata
$ npx add-mcp https://pinescript-mcp.fly.dev/mcp --name pinescript-mcp

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http pinescript-mcp https://pinescript-mcp.fly.dev/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 10 tools

Verified live against the running server on Nov 6, 2026.

list_docsUSE 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.m...

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.m...

No parameters. Call it with no arguments.

list_sectionsUSE 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 Pi...1 params

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 Pi...

Parameters* required
path*string
Documentation file path (e.g., 'reference/functions/ta.md').
get_docUSE 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 av...3 params

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 av...

Parameters* required
limitinteger
Maximum characters to return. Use 30000 for large files. 0 = no limit.default: 0
offsetinteger
Character offset to start reading from.default: 0
path*string
Relative path to the documentation file (e.g., 'reference/functions/ta.md').
get_sectionUSE 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,...3 params

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,...

Parameters* required
header*string
Header text to find (e.g., 'strategy.exit()' or '## strategy.exit()').
include_childrenboolean
Include nested subsections under the matched header.default: true
path*string
Documentation file path (e.g., 'reference/functions/strategy.md').
search_docsUSE 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 resul...2 params

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 resul...

Parameters* required
max_resultsinteger
Maximum sections to return.default: 5
query*string
Search terms (case-insensitive). Multi-word queries match sections containing ALL terms.
get_functionsUSE 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,...1 params

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,...

Parameters* required
namespacestring
Filter by namespace (e.g., 'ta', 'strategy', 'request'). Empty string returns all functions grouped by namespace.default:
validate_functionUSE 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...1 params

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...

Parameters* required
fn_name*string
Function name to validate (e.g., 'ta.sma', 'strategy.entry', 'plot').
resolve_topicUSE 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 f...1 params

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 f...

Parameters* required
query*string
Exact Pine Script term or known concept keyword (e.g., 'ta.rsi', 'strategy.entry', 'repainting').
list_promptsList all available prompts. Returns JSON with prompt metadata including name, description, and optional arguments.

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

No parameters. Call it with no arguments.

get_promptGet 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.2 params

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.

Parameters* required
argumentsvalue
Optional arguments for the prompt
name*string
The name of the prompt to get

Sponsors

Readme

Details

Repository
github.com/paulieb89/pinescript-mcp
Website
bouch.dev
Package
pinescript-mcp
Transport
STDIO, HTTP, SSE
Registry
MCP registry, active
Resources
2
Prompts
3
Tools verified
Nov 6, 2026

More from paulieb89