JM

jpablo/metals-standalone-client

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

36 stars 8 forks 品質 53 トレンド 12

最小限の金属は金属mcpサーバーを動かすことを可能にするだけクライアントを立てます

概要

金属v1.6.6(オスミウム)と同様に、金属は、Coursier(cs install Metals-mcp)を介してインストールできる内蔵スタンドアローンMCPサーバー(金属mcp)を含みます。 これにより、金属スタンドアロン・クライエント・プロジェクトは不要になります。 代わりに公式のmetals-mcpコマンドを使用してください。 MCP (Model Context Protocol) 対応で、Metals 言語サーバーを起動するスタンドアローンクライアントで、AI アシスタントが Scala プロジェクトとやり取りできるようにします。 迅速なコンパイルと簡単な配布のためのスケーラクライで構築。 このツールは、MCP 機能を使用して、Metals 言語サーバーを実行するためのヘッドレスな方法を提供し、Claude のような AI コード アシスタントが Scala コードベースを理解し、作業できるようにします。 金属のインストールを自動的に検出し、言語サーバーの設定を行い、MCPサーバーの健全性を監視します。 メタは、通常、エディタ(VSコード、Neovimなど)内で実行される Scala 言語サーバーです。 エディタは LSP クライアントとして機能します。: 金属を起動し、初期化ハンドシェイクを実行し、設定を送信します.

概要(AI 翻訳)

[!NOTE]

金属v1.6.6(オスミウム)のように、金属は、Coursier(cs install metals-mcp])を介してインストールすることができる組み込みスタンドアロンMCPサーバー([metals-mcp])を含みます。 これにより、金属スタンドアロン・クライエント・プロジェクトは不要になります。 代わりに、公式[metals-mcpコマンドを使用してください。 お知らせ

金属スタンドアロン MCP クライアント

MCP (Model Context Protocol) 対応で、Metals 言語サーバーを起動するスタンドアローンクライアントで、AI アシスタントが Scala プロジェクトとやり取りできるようにします。 迅速なコンパイルと簡単な配布のためのスケーラクライで構築。

目的

このツールは、MCP 機能を使用して、Metals 言語サーバーを実行するためのヘッドレスな方法を提供し、Claude のような AI コード アシスタントが Scala コードベースを理解し、作業できるようにします。 金属のインストールを自動的に検出し、言語サーバーの設定を行い、MCPサーバーの健全性を監視します。

どうしても必要なのか、どのように機能しますか?

メタは、通常、エディタ(VSコード、Neovimなど)内で実行される Scala 言語サーバーです。 エディタは LSP クライアントとして機能します。: 金属を起動し、初期化ハンドシェイクを実行し、設定を送信します。 この作業を行うエディタがなければ、金属は起動しません.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

[!NOTE]

As of Metals v1.6.6 (Osmium), Metals now includes a built-in standalone MCP server (metals-mcp) that can be installed via Coursier (cs install metals-mcp). This makes the metals-standalone-client project unnecessary. Please use the official metals-mcp command instead.

Metals Standalone MCP Client

A standalone client that launches the Metals language server with MCP (Model Context Protocol) support, enabling AI assistants to interact with Scala projects. Built with scala-cli for fast compilation and easy distribution.

Purpose

This tool provides a headless way to run Metals language server with MCP capabilities, allowing AI code assistants like Claude to understand and work with your Scala codebase. It automatically discovers Metals installations, configures the language server, and monitors MCP server health.

Why is this needed and how does it work?

Metals is a Scala language server that normally runs inside an editor (VS Code, Neovim, etc.). The editor acts as an LSP client: it launches Metals, performs the initialization handshake, and sends configuration. Without an editor doing this work, Metals doesn’t start.

This standalone client replaces the editor. It acts as a headless LSP client so that Metals can run without any editor open. Here’s what happens when you run it:

  1. The standalone client discovers and launches Metals as a subprocess (via Coursier).
  2. It performs the LSP handshake over stdin/stdout (initialize, initialized) using JSON-RPC 2.0.
  3. It configures Metals to enable its built-in MCP server by sending startMcpServer: true.
  4. Metals starts the MCP server and writes a .mcp.json file at your project root with the connection URL:
    {
      "mcpServers": {
        "metals": {
          "url": "http://localhost:/mcp",
          "type": "http"
        }
      }
    }
    
  5. The standalone client monitors the MCP server health via HTTP polling to make sure it stays up.

Once this is running, you can open Claude Code (or another MCP-aware AI assistant) in your Scala project directory.

This gives AI assistants access to Scala language intelligence (go-to-definition, find-references, completions, diagnostics, etc.) without requiring an IDE.

For a detailed diagram and component breakdown, see ARCHITECTURE.md.

Quick Start

Download Pre-built Executables

Linux:

wget https://github.com/jpablo/metals-standalone-client/releases/latest/download/metals-standalone-client-linux-executable
chmod +x metals-standalone-client-linux-executable
./metals-standalone-client-linux-executable --help

macOS:

wget https://github.com/jpablo/metals-standalone-client/releases/latest/download/metals-standalone-client-macos-executable
chmod +x metals-standalone-client-macos-executable
./metals-standalone-client-macos-executable --help
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "metals": { "url": "http://localhost:<port>/mcp", "type": "http" } } }