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.
claude mcp add --transport http pinescript-mcp https://pinescript-mcp.fly.dev/mcpRun in your terminal. Add --scope user to make it available in every project.
Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.
Verified live against the running server on Jun 10, 2026.
list_docsList all available Pine Script v6 documentation files with descriptions. Returns files organised by category with descriptions. For small files use get_doc(path). For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) use list_sections(path) then get_sect...List all available Pine Script v6 documentation files with descriptions. Returns files organised by category with descriptions. For small files use get_doc(path). For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) use list_sections(path) then get_sect...
No parameters — call it with no arguments.
list_sectionsList all section headers in a doc file. Use before get_section() to find the right header. Especially useful for large files like ta.md, strategy.md, collections.md, drawing.md, general.md which have 50-115 sections each.1 paramsList all section headers in a doc file. Use before get_section() to find the right header. Especially useful for large files like ta.md, strategy.md, collections.md, drawing.md, general.md which have 50-115 sections each.
path*stringget_docRead a specific Pine Script v6 documentation file. For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) prefer list_sections() + get_section() to avoid loading 1000-2800 line files into context.3 paramsRead a specific Pine Script v6 documentation file. For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) prefer list_sections() + get_section() to avoid loading 1000-2800 line files into context.
path*stringlimitintegeroffsetintegerget_sectionGet a specific section from a documentation file by its header. Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.3 paramsGet a specific section from a documentation file by its header. Use after list_sections() shows available headers, or after resolve_topic() / search_docs() identifies the relevant file.
path*stringheader*stringinclude_childrenbooleansearch_docsSearch Pine Script v6 documentation and return matching sections. Finds sections containing the query and returns previews with get_section() call hints so you can read the full content. Multi-word queries use AND logic: all terms must appear in the section (not necessarily on...2 paramsSearch Pine Script v6 documentation and return matching sections. Finds sections containing the query and returns previews with get_section() call hints so you can read the full content. Multi-word queries use AND logic: all terms must appear in the section (not necessarily on...
query*stringmax_resultsintegerget_functionsGet valid Pine Script v6 functions, optionally filtered by namespace. Use before writing Pine Script to see which functions exist. For checking a single function name, use validate_function() instead.1 paramsGet valid Pine Script v6 functions, optionally filtered by namespace. Use before writing Pine Script to see which functions exist. For checking a single function name, use validate_function() instead.
namespacestringvalidate_functionCheck if a Pine Script v6 function name is valid.1 paramsCheck if a Pine Script v6 function name is valid.
fn_name*stringresolve_topicFast lookup for exact Pine Script API terms and known concepts. Use for exact function names and Pine Script vocabulary (e.g., "ta.rsi", "strategy.entry", "repainting", "request.security"). For natural language questions, read the docs://manifest resource for routing guidance,...1 paramsFast lookup for exact Pine Script API terms and known concepts. Use for exact function names and Pine Script vocabulary (e.g., "ta.rsi", "strategy.entry", "repainting", "request.security"). For natural language questions, read the docs://manifest resource for routing guidance,...
query*stringlist_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 paramsGet 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.
name*stringargumentsvalueMCP server providing Pine Script v6 documentation for AI assistants (Claude, etc.).
Enables AI to:
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"]
}
}
}
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.
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.
| 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 |
| 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 |
| 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) |
The server bundles comprehensive Pine Script v6 documentation:
AI models often hallucinate Pine Script functions or use deprecated v5 syntax. This MCP server grounds the AI in actual v6 documentation, preventing:
ta.hull doesn't exist, use ta.hma)Combine with skills for even more control available at bouch.dev/products/pine-strategy-builder.
# Clone and install locally
git clone https://github.com/paulieb89/pinescript-mcp
cd pinescript-mcp
pip install -e .
# Run the server
pinescript-mcp
MIT