Hosted MCP server · #98 most used on Smithery
pinescript
bouch/pinescript
MCP server providing Pine Script v6 documentation for AI assistants. 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
- Uses
- 5.8k
- Tools
- 10
- Runs
- Hosted
- Prompts
- 3
- Listed
- 6mo ago
Get started
Add it to your agent
npx -y @smithery/cli@latest install bouch/pinescript --client claudeSwap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.
claude mcp add --transport http pinescript https://server.smithery.ai/bouch/pinescript/mcpA hosted server: nothing to install. Run /mcp in Claude Code to sign in if it asks.
[mcp_servers.pinescript]
url = "https://server.smithery.ai/bouch/pinescript/mcp"Add to ~/.codex/config.toml.
{
"mcpServers": {
"pinescript": {
"url": "https://server.smithery.ai/bouch/pinescript/mcp"
}
}
}Add to ~/.cursor/mcp.json.
{
"servers": {
"pinescript": {
"type": "http",
"url": "https://server.smithery.ai/bouch/pinescript/mcp"
}
}
}Add to .vscode/mcp.json.
gemini mcp add --transport http pinescript https://server.smithery.ai/bouch/pinescript/mcpSaved to .gemini/settings.json.
What it can do
10 tools
list_docsList all available Pine Script v6 documentation files with descriptions. Returns files organised by category with descriptions. For small…
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_section(path, header).
list_sections1 paramList all section headers in a doc file. Use before get_section() to find the right header. Especially useful for large files like ta.md, …
List 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.
| Parameter | Type | Description |
|---|---|---|
path | string | Documentation file path (e.g., "reference/functions/ta.md") |
get_doc3 paramsRead a specific Pine Script v6 documentation file. For large files (ta.md, strategy.md, collections.md, drawing.md, general.md) prefer li…
Read 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.
| Parameter | Type | Description |
|---|---|---|
path | string | Relative path to the documentation file (e.g., "reference/functions/ta.md") |
limit | integer | Maximum characters to return. Use 30000 for large files to avoid token limits. |
offset | integer | Character offset to start reading from (default: 0) |
get_section3 paramsGet a specific section from a documentation file by its header. Use after list_sections() shows available headers, or after resolve_topic…
Get 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.
| Parameter | Type | Description |
|---|---|---|
path | string | Documentation file path (e.g., "reference/functions/strategy.md") |
header | string | Header text to find (e.g., "strategy.exit()" or "## strategy.exit()") |
include_children | boolean | Include nested subsections under the header (default: True) |
search_docs2 paramsSearch Pine Script v6 documentation and return matching sections. Finds sections containing the query and returns previews with get_secti…
Search 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.
| Parameter | Type | Description |
|---|---|---|
query | string | Exact string to search for (case-insensitive). |
max_results | integer | Maximum sections to return (default: 5) |
get_functions1 paramGet valid Pine Script v6 functions, optionally filtered by namespace. Use before writing Pine Script to see which functions exist. For ch…
Get 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.
| Parameter | Type | Description |
|---|---|---|
namespace | string | Filter by namespace (e.g., "ta", "strategy", "request"). Empty string returns all functions grouped by namespace. |
validate_function1 paramCheck if a Pine Script v6 function name is valid.
| Parameter | Type | Description |
|---|---|---|
fn_name | string | Function name to validate (e.g., "ta.sma", "strategy.entry", "plot") |
resolve_topic1 paramFast lookup for exact Pine Script API terms and known concepts. Use for exact function names and Pine Script vocabulary (e.g., "ta.rsi", …
Fast 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, then use get_doc() or list_sections() + get_section().
| Parameter | Type | Description |
|---|---|---|
query | string | Exact Pine Script term or known concept keyword. |
list_promptsList all available prompts. Returns JSON with prompt metadata including name, description, and optional arguments.
get_prompt2 paramsGet a prompt by name with optional arguments. Returns the rendered prompt as JSON with a messages array. Arguments should be provided as …
Get 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.
| Parameter | Type | Description |
|---|---|---|
name | string | The name of the prompt to get |
arguments | Optional arguments for the prompt |
Ready-made
Prompts
debug_errorDebug a Pine Script compilation error.convert_v5_to_v6Convert Pine Script v5 code to v6.explain_functionExplain a Pine Script function in detail.
Readable data
Resources
LLM ManifestSTART HERE — routing guide that maps Pine Script questions to documentation files and tool call sequencesPine Script v6 FunctionsComplete list of valid Pine Script v6 functions as JSON