1. Conduid
  2. Developer Tools
  3. Pinescript MCP Server
MCP server · Developer Tools

Pinescript MCP Server

MCP server: Pinescript MCP Server

Unclaimed last commit a year ago devtools
42Fair

Scored 3 months ago · breakdown

About Pinescript MCP Server

Pinescript MCP Server is an MCP server published by CyberBOB07 in the Developer Tools category: mCP server: Pinescript MCP Server. It has been installed 0 times through Conduid.

The repository has 46 stars and 9 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx pinescript-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Pinescript MCP Server

Powered by Claude · Grounded in docs

I know everything about Pinescript MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

TradingView PineScript MCP Server

A Model Context Protocol (MCP) server for working with TradingView PineScript. This server provides tools for validating, fixing, and generating PineScript code through a standardized API.

Features

  • PineScript Validation - Automatically validates PineScript code for syntax errors and warnings
  • Error Fixing - Automatically fixes common PineScript syntax errors
  • Template Generation - Provides validated templates for various PineScript strategies and indicators

Getting Started

Prerequisites

  • Node.js 16.x or higher
  • npm 8.x or higher

Installation

  1. Clone the repository
git clone https://github.com/yourusername/pinescriptproject1.git
cd pinescriptproject1
  1. Install dependencies
npm install
  1. Build the project
npm run build

Running the Server

Start the MCP server:

npm run start-server

This will start the server with stdio transport, which allows it to communicate with MCP clients.

API

Tools

The MCP server exposes the following tools:

1. validate_pinescript

Validates PineScript code for syntax errors and warnings.

Parameters:

  • script (string): The PineScript code to validate
  • version (string, optional): Expected PineScript version (e.g., 'v5', 'v4')

Returns:

  • valid (boolean): Whether the script is valid
  • errors (string[]): List of syntax errors
  • warnings (string[]): List of warnings

2. fix_pinescript_errors

Automatically fixes common syntax errors in PineScript code.

Parameters:

  • script (string): The PineScript code to fix

Returns:

  • fixed (boolean): Whether any fixes were applied
  • fixedCode (string): The fixed script
  • changes (string[]): List of changes made

3. get_pinescript_template

Provides validated templates for common PineScript strategies and indicators.

Parameters:

  • template_type (string): Type of template ('strategy' or 'indicator')
  • name (string): Template name

Returns:

  • template (string): The template code
  • message (string): Confirmation message

Supported PineScript Features

Syntax Validation

The validator currently checks for:

  • Empty scripts
  • Version annotations
  • Balanced parentheses
  • String quotes
  • Comma placement in function calls
  • Deprecated functions in PineScript v5
  • Incorrect variable export syntax

Error Fixing

The fixer can automatically fix:

  • Missing version annotations
  • Unbalanced parentheses
  • Unclosed string literals
  • Missing commas in function calls
  • Deprecated study() function
  • Incorrect variable export syntax

Development

Running Tests

npm test

Debugging

To run the server in development mode with automatic reloading:

npm run dev

License

ISC

Contributing

Contributions are welcome!

README mirrored from the source repository 3 months ago. The original is authoritative.

Questions

About Pinescript MCP Server

How do I install Pinescript MCP Server?

Run npx pinescript-mcp-server, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Pinescript MCP Server safe to use with an AI agent?

Its trust score is 42 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Pinescript MCP Server still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.