mcpField
P
Pine Script v6 Documentation

Pine Script v6 Documentation

Remote
bouch.devDeveloper Tools9Updated 15w ago

About Pine Script v6 Documentation

Pine Script v6 Documentation is an MCP server for AI assistants and Pine Script developers. It bundles v6 references and provides function checks and prompt templates to ground code generation in documentation.

Key features

  1. 01Search and read Pine Script documentation
  2. 02Check valid v6 functions
  3. 03Browse documentation resources
  4. 04Analyze errors or explain functions with prompts
  5. 05Convert v5 code to v6 syntax

Use cases

  1. 01Verify function names and parameters before generating code
  2. 02Look up concepts such as repainting and the execution model
  3. 03Investigate Pine Script compilation errors
  4. 04Convert v5 code to v6 syntax

MCP support

The MCP server provides documentation lookup, function validation, resource access, and prompt tools to clients. It can run locally over stdio or be accessed through its hosted Streamable HTTP service.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://pinescript-mcp.fly.dev/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://pinescript-mcp.fly.dev/mcp
SSEhttps://pinescript-mcp.fly.dev/sse
Packages
pypipinescript-mcp0.6.17

Tools

10

This tool takes no parameters.

Details

From the project 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:

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.