pinescript-mcp
Provides comprehensive Pine Script v6 documentation and tools to help AI assistants look up functions, validate syntax, and generate accurate code. It enables linting, version conversion from v5 to v6, and deep conceptual analysis to prevent code hallucinations.
README
pinescript-mcp
<!-- mcp-name: io.gitlab.articat1066/pinescript-v6-mcp -->
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.ai, modern clients):
{
"mcpServers": {
"pinescript-docs": {
"type": "http",
"url": "https://pinescript-mcp.fly.dev/mcp"
}
}
}
SSE (Cursor, Cline, Windsurf, ChatGPT):
{
"mcpServers": {
"pinescript-docs": {
"type": "sse",
"url": "https://pinescript-mcp.fly.dev/sse"
}
}
}
Version Pinning
Documentation is bundled in the package - each version contains a frozen snapshot. For reproducible agent behavior, pin to a specific version:
{
"mcpServers": {
"pinescript-docs": {
"command": "uvx",
"args": ["pinescript-mcp==0.6.16"]
}
}
}
Without pinning, uvx pinescript-mcp gets the latest version.
Available Tools (13)
| 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 |
lint_script(script) |
Lint Pine Script (17 rules, free, no API cost) |
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
| 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 |
Available Resources
| 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) |
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.hulldoesn't exist, useta.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://gitlab.com/articat1066/pinescript-v6-mcp
cd pinescript-mcp
pip install -e .
# Run the server
pinescript-mcp
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.