Get the FREE Ultimate OpenClaw Setup Guide →

mcp -pinescript

AI-optimized MCP server for PineScript v6 development with documentation access and code review capabilities

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio iamrichardd-mcp-server-pinescript node /path/to/mcp-server-pinescript/index.js

How to use

This PineScript MCP server provides documentation access and code review capabilities tailored for Pine Script v6. It exposes two core tools: pinescript_reference for semantic documentation search across Pine Script functions and variables, and pinescript_review for code validation and review of Pine Script projects. The server emphasizes a memory-first architecture with preloaded documentation to deliver sub-15ms responses and supports streaming JSON outputs for large results. Typical workflows involve querying Pine Script references to quickly surface function definitions or syntax, and running code reviews to detect issues like long titles or precision violations with actionable fixes. You can validate capabilities by sending prompts through Claude using the pinescript tools and observing structured JSON outputs with severity levels and suggested fixes. For example, you can validate a snippet and expect errors such as SHORT_TITLE_TOO_LONG and INVALID_PRECISION, along with performance metrics showing rapid response times.

How to install

Prerequisites:

  • Node.js 18+ installed
  • npm installed
  • Git available

Installation steps:

  1. Install the MCP server package directly from Git: npm install git+git@github.com:iamrichardD/mcp-server-pinescript.git

  2. Register the MCP server with your agent tool (example using Claude): claude mcp add pinescript-docs node ./node_modules/mcp-server-pinescript/index.js

  3. Verify the server connection: claude mcp list # Should show "pinescript-docs: Connected ✓"

  4. Run a basic test to ensure the server responds: claude -p "Use pinescript_review to check: [your PineScript code]"

  5. If you clone locally, you can run in development mode: git clone https://github.com/iamrichardD/mcp-server-pinescript.git cd mcp-server-pinescript && npm install && npm start

    Should show: "PineScript MCP Server ready with preloaded documentation!"

Additional notes

Tips and considerations:

  • This server preloads Pine Script documentation into memory to achieve sub-15ms response times; ensure sufficient memory for larger projects.
  • Use format=stream when dealing with very large result sets to enable streaming outputs.
  • Validation rules include patterns like SHORT_TITLE_TOO_LONG and INVALID_PRECISION; the system reports these with severity and suggested fixes.
  • If you encounter connection or module errors, ensure you have run npm install in the project directory and that the MCP server process is running.
  • Environment customization can include adjusting the path to the index.js when deploying in different environments or using containerized setups.
  • The integration example demonstrates how to configure Claude Desktop integration via @claude_desktop_config.json to point to the Pinescript MCP server.

Common issues:

  • Command not found: claude — install Claude Code CLI from its official repository.
  • Module not found — run npm install in the project directory.
  • Connection refused — ensure the MCP registration path is correct and the server is active.

Related MCP Servers

Sponsor this space

Reach thousands of developers