pinescript-mcp CLAUDE.md

pinescript-mcp CLAUDE.md is an instructions file for coding agents from paulieb89/pinescript-mcp. It costs 981 tokens per session, scanned C, original, MIT.

A documentation server that gives AI coding assistants access to Pine Script version 6 references, including functions, topics, and sections. Pine Script is the language used to create indicators and strategies on TradingView.

In plain words
What is it for?
It helps assistants look up Pine Script terms, search and read documentation, list valid functions, and validate function usage.
Why use it?
It reduces the need to search scattered or outdated Pine Script references when writing or checking TradingView code.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/paulieb89/pinescript-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/paulieb89/pinescript-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pinescript-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/paulieb89/pinescript-mcp/claude-md.svg)](https://agentmods.dev/instructions/paulieb89/pinescript-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/paulieb89/pinescript-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/paulieb89/pinescript-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 981 This file is loaded in full into every session.
When invoked 981 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00981 $0.00981
Opus 5 $0.00491 $0.00491
Sonnet 5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

Measured 5d ago against content hash b6d8a8c4f51f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

pinescript-mcp CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf dist/ && uv build && uvx twine upload dist/* # Publish PyPI
CLAUDE.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md - pinescript-mcp

MCP server providing Pine Script v6 documentation to AI assistants.

PyPI: https://pypi.org/project/pinescript-mcp/ Fly.io: https://pinescript-mcp.fly.dev/mcp

Key Files

  • src/pinescript_mcp/server.py - All MCP tools and middleware. Tool docstrings = AI-visible descriptions
  • pyproject.toml - Package metadata, dependencies
  • .bumpversion.toml - Version sync (pyproject.toml, init.py, server.json, mcp.json)
  • fly.toml - Fly.io deployment config + [metrics] for Prometheus scraping

.gitignore - Files exist that you may not see;

  • .claude/
  • reddit/
  • dist/

MCP Surface (10 tools, 3 resources, 3 prompts)

Tools (8 direct + 2 synthetic)

Tool Purpose
resolve_topic Fast lookup for exact API terms (ta.rsi, repainting)
search_docs Search docs — multi-word queries use AND logic
list_docs List all available docs
list_sections List ## headers in a doc (navigate large files)
get_doc Read a specific doc file (limit/offset)
get_section Get section by markdown header
get_functions List valid Pine v6 functions by namespace
validate_function Check if function name is valid (known replacements for common mistakes)
list_prompts Synthetic — list prompt templates
get_prompt Synthetic — render a prompt with arguments

Resources

URI Content
docs://manifest START HERE — LLM routing guide for Pine Script questions
docs://functions pine_v6_functions.json allowlist
docs://{path*} Any doc file (e.g. concepts/timeframes.md)

Prompts

Prompt Purpose
debug_error Analyze Pine Script compilation errors
convert_v5_to_v6 Guide v5 → v6 migration
explain_function Explain a Pine Script function in detail

Commands

uv run python -m pinescript_mcp              # Run locally (stdio)
uv run python -m pinescript_mcp --http       # Run locally (HTTP)
uvx bump-my-version bump patch               # Version bump
rm -rf dist/ && uv build && uvx twine upload dist/*  # Publish PyPI
fly deploy                                   # Deploy Fly.io
uvx mcp-inspector uvx pinescript-mcp         # Test with inspector

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 84 lines · 981 tokens per session scan C b6d8a8c4f51f

Subscribe to this mod's changes

pinescript-mcp CLAUDE.md is an instructions file published in the GitHub repository paulieb89/pinescript-mcp (9 stars, last pushed 8d ago), licensed MIT. It adds 981 tokens to every session, about $0.0049 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.