{
  "markdown": "# pinescript-mcp\n\n<!-- mcp-name: io.github.paulieb89/pinescript-mcp -->\n\n[![PyPI](https://img.shields.io/pypi/v/pinescript-mcp)](https://pypi.org/project/pinescript-mcp/)\n[![Glama](https://img.shields.io/badge/Glama-listed-orange?style=flat-square)](https://glama.ai/mcp/servers/paulieb89/pinescript-mcp)\n[![smithery badge](https://smithery.ai/badge/bouch/pinescript)](https://smithery.ai/servers/bouch/pinescript)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=pinescript-docs&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fpinescript-mcp.fly.dev%2Fmcp%22%7D)\n[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=pinescript-docs&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fpinescript-mcp.fly.dev%2Fmcp%22%7D&quality=insiders)\n[![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-000000?style=flat-square&logoColor=white)](https://cursor.com/en/install-mcp?name=pinescript-docs&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vcGluZXNjcmlwdC1tY3AuZmx5LmRldi9tY3AifQ==)\n[![Install in VS Code (local)](https://img.shields.io/badge/VS_Code-Install_Local-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=pinescript-docs&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22pinescript-mcp%22%5D%7D)\n\nMCP server providing Pine Script v6 documentation for AI assistants (Claude, etc.).\n\nEnables AI to:\n- Look up Pine Script functions and validate syntax\n- Access official documentation for indicators, strategies, and visuals\n- Understand Pine Script concepts (execution model, repainting, etc.)\n- Generate correct v6 code with proper function references\n\n## Quick Start (stdio)\n\nWorks with Claude Code, Claude Desktop, Gemini CLI, and any MCP client that supports stdio:\n\n```json\n{\n  \"mcpServers\": {\n    \"pinescript-docs\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"pinescript-mcp\"]\n    }\n  }\n}\n```\n\n## Public Server (No Install Required)\n\nNo Python or uvx needed — connect directly to the hosted server.\n\n**Streamable HTTP** — Claude Code, `mcpServers` with `type` field):\n\n```json\n{\n  \"mcpServers\": {\n    \"pinescript-docs\": {\n      \"type\": \"http\",\n      \"url\": \"https://pinescript-mcp.fly.dev/mcp\"\n    }\n  }\n}\n```\n\n**Windsurf** — uses its own shape (see [Windsurf docs](https://docs.windsurf.com/windsurf/cascade/mcp#remote-http-mcps)). Edit `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pinescript-docs\": {\n      \"serverUrl\": \"https://pinescript-mcp.fly.dev/mcp\"\n    }\n  }\n}\n```\n\n**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](https://platform.openai.com/docs/mcp)).\n\n**Claude.ai** — add via the web UI's MCP connector settings, not a JSON file.\n\n## Version Pinning\n\nDocumentation is bundled in the package — each version contains a frozen snapshot. For reproducible agent behaviour, pin to a specific version:\n\n```json\n{\n  \"mcpServers\": {\n    \"pinescript-docs\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pinescript-mcp==0.7.6\"]\n    }\n  }\n}\n```\n\nWithout pinning, `uvx pinescript-mcp` gets the latest version.\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `resolve_topic(query)` | Fast lookup for exact API terms (`ta.rsi`, `repainting`) |\n| `search_docs(query)` | Grep for exact strings across all docs |\n| `list_docs()` | List all documentation files with descriptions |\n| `list_sections(path)` | List `##` headers in a doc file (for navigating large files) |\n| `get_doc(path)` | Read a specific documentation file |\n| `get_section(path, header)` | Read a specific section by header |\n| `get_functions(namespace)` | List valid functions (ta, strategy, etc.) |\n| `validate_function(name)` | Check if a function exists in Pine v6 |\n| `list_resources()` | Browse available documentation resources |\n| `read_resource(uri)` | Read a doc resource by URI (e.g. `docs://manifest`) |\n| `list_prompts()` | List available prompt templates |\n| `get_prompt(name, arguments)` | Render a prompt template with arguments |\n\n## Available Prompts\n\n| Prompt | Description |\n|--------|-------------|\n| `debug_error(error, code)` | Analyze a Pine Script compilation error |\n| `convert_v5_to_v6(code)` | Convert Pine Script v5 code to v6 syntax |\n| `explain_function(name)` | Explain a Pine Script function in detail |\n\n## Available Resources\n\n| URI | Description |\n|-----|-------------|\n| `docs://manifest` | **Start here** — routing guide for Pine Script questions |\n| `docs://functions` | Complete Pine Script v6 function list (JSON) |\n| `docs://{path}` | Any doc file by path (e.g. `concepts/timeframes.md`) |\n\n## Example Queries\n\n- \"How do I create a trailing stop in Pine Script?\"\n- \"What's the difference between var and varip?\"\n- \"Is ta.supertrend a valid function?\"\n- \"How do I avoid repainting with request.security?\"\n\n## Documentation Coverage\n\nThe server bundles comprehensive Pine Script v6 documentation:\n\n- **Concepts**: Execution model, timeframes, colors, methods, objects, common errors\n- **Reference**: Types, variables, constants, keywords, operators, annotations\n- **Functions**: Technical analysis (ta.*), strategies, requests, drawings, collections\n- **Visuals**: Plots, fills, shapes, tables, lines, boxes, backgrounds\n- **Writing Scripts**: Style guide, debugging, optimization, limitations\n\n## Why Use This?\n\nAI models often hallucinate Pine Script functions or use deprecated v5 syntax. This MCP server grounds the AI in actual v6 documentation, preventing:\n\n- Made-up function names (e.g., `ta.hull` doesn't exist, use `ta.hma`)\n- Deprecated syntax from v4/v5\n- Incorrect parameter orders\n- Missing required arguments\n\n## Skills\n\nCombine with skills for even more control available at [bouch.dev/products/pine-strategy-builder](https://bouch.dev/products/pine-strategy-builder).\n\n## Development\n\n```bash\n# Clone and install locally\ngit clone https://github.com/paulieb89/pinescript-mcp\ncd pinescript-mcp\npip install -e .\n\n# Run the server\npinescript-mcp\n```\n\n## License\n\nMIT\n",
  "bytes": 6445,
  "sha": "f9d7d00cb70b4133dd135b0bb710fe7ccfdd8f3d0f8d98870cb9fb3857ed2be5",
  "repo_slug": "paulieb89/pinescript-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_paulieb89_pinescript_mcp_055cba40/readme"
}