Pine Script v6 MCP Server

Pine Script v6 MCP Server

Provides accurate Pine Script v6 coding assistance through search, completion, and reference lookup tools using a comprehensive Japanese manual database. Enables developers to quickly find functions, constants, annotations, and API specifications for TradingView Pine Script development.

Category
Visit Server

README

Pine Script v6 MCP(manual.json 利用)

Repository: https://github.com/harunamitrader/pinescriptV6_MCP

Pine Script v6 のリファレンスマニュアルを JSON 化した manual.json を用いて、Claude Code / Codex CLI / Gemini CLI などの MCP クライアントから正確な Pine Script コーディングを支援するシンプルな MCP サーバです。

  • 目的: 正確な API 仕様・定数名・用例への素早いアクセス
  • 前提: manual.json(UTF-8, v6, ja)を同梱済み
  • 方針: 最小依存・読み取り専用・メモリ内インデックス

機能概要

  • stdio ベースの MCP サーバ(Node.js)
  • 起動時に manual.json を読み込み、軽量インデックスを構築
  • 提供ツール
    • search_docs: クエリで関数/定数/アノテーション等を横断検索
    • get_entry: id で単一エントリの詳細(最小情報)を取得
    • complete_symbol: プレフィックス補完(例: plot, ta.r, color.
    • list_categories: 種別ごとの件数集計(annotation/const/function/type 等)

返却は LLM が引用しやすい JSON(structuredContent を含む)です。


ツール詳細(AIコーディング視点)

  • search_docs: あいまい探索に最適

    • 用途: 正式名称が曖昧/断片だけ分かるときの横断検索。
    • 強み: 前方一致優先+部分一致で広く当たりを取得。kind で絞り込み可。
    • 例: {"query":"plot"} / {"query":"ta.r","kind":"function"}
    • 活用: 新規実装の関数候補を洗い出し、未知のアノテーションや定数を探索。
  • get_entry: コード確定前の最終確認

    • 用途: 検索/補完で特定した id の詳細確認(タイトル・種別・URL、将来的にシグネチャ等)。
    • 強み: LLM が structuredContent をそのまま参照でき、引数名や戻り値の取り違えを抑制。
    • 例: {"id":"fun_color.b"}color.b() の詳細を返却。
    • 活用: 実装直前の仕様チェック、レビュー時の根拠提示(source_url 付き)。
  • complete_symbol: 名前空間ベースの高速補完

    • 用途: コーディング中に ta.color. のような接頭辞から候補を即時取得。
    • 強み: 前方一致で低オーバーヘッド。名前空間配下の網羅把握にも便利。
    • 例: {"prefix":"color."} / {"prefix":"strategy.","limit":50}
    • 活用: 実装中の記述補助、同名関数が多い領域の候補比較。
  • list_categories: 全体像の把握と探索起点作り

    • 用途: annotation/const/function/type など、領域ごとの件数を把握。
    • 強み: ドキュメントの偏りや対象範囲を俯瞰でき、検索条件の当たりを付けやすい。
    • 例: 引数なしで呼び出し。戻り値は {kind,count} の配列。
    • 活用: 初学者のナビゲーション、探索開始時のスコープ設定。

おすすめ構成(CLI で AI が効率良くコーディングする前提)

  • コンパクト重視: complete_symbol + get_entry
  • 横断探索重視: search_docs + get_entry
  • 快適性重視: search_docs + complete_symbol + get_entry(通常はこれで十分)
  • 補助: 必要に応じて list_categories を追加

インストール / 実行

  1. クローン導入(推奨)
git clone https://github.com/harunamitrader/pinescriptV6_MCP.git
cd pinescriptV6_MCP/pinescriptMCP
  1. 依存インストール
npm i
  1. 起動(手動起動の例)
node server.mjs --manual ./manual.json
# 既存の別の manual.json を使う場合
node server.mjs --manual C:/path/to/manual.json

環境変数 PINE_MANUAL_PATH でも指定できます。


Codex CLI 設定(TOML)

~/.codex/config.toml に以下を追記します。

[mcp_servers]
[mcp_servers.pinescript_mcp]
command = "C:/Program Files/nodejs/node.exe"
args = [
  "C:/path/to/pinescriptV6_MCP/pinescriptMCP/server.mjs",
  "--manual",
  "C:/path/to/pinescriptV6_MCP/pinescriptMCP/manual.json"
]

Codex を再起動し、/mcppinescript_mcp とツール群が表示されることを確認してください。


Claude Desktop(JSON)

設定 → Developer → MCP Servers → Add で、次の JSON を追加します。

{
  "mcpServers": {
    "pinescript_mcp": {
      "command": "node",
      "args": [
        "C:/path/to/pinescriptV6_MCP/pinescriptMCP/server.mjs",
        "--manual",
        "C:/path/to/pinescriptV6_MCP/pinescriptMCP/manual.json"
      ]
    }
  }
}

Gemini CLI(JSON)

Gemini CLI の MCP 設定に次を追加します(設定パスは CLI 実装に依存)。

{
  "mcpServers": {
    "pinescript_mcp": {
      "command": "node",
      "args": [
        "C:/path/to/pinescriptV6_MCP/pinescriptMCP/server.mjs",
        "--manual",
        "C:/path/to/pinescriptV6_MCP/pinescriptMCP/manual.json"
      ]
    }
  }
}

使い方(例)

  • search_docs{"query":"plot"} を検索 → 候補から get_entry で詳細取得
  • complete_symbol{"prefix":"color."} を補完
  • list_categories で種別件数を把握

注意・ライセンス

  • 本サーバは読み取り専用です。外部への書き込みや外部呼び出しは行いません。
  • manual.json は本リポジトリ同梱のユーザー生成データです。出典 URL は含まれますが、配布権限はリポジトリ作者の許諾に基づきます。

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured