Skip to main content
Glama

language-server-mcp MCP サーバー

コード編集用の言語サポートを提供するモデル コンテキスト プロトコル (MCP) サーバー。

これはTypeScriptベースのMCPサーバーで、ホバー情報、コード補完、診断機能などの機能を提供することで、コード編集エクスペリエンスを向上させるように設計されています。以下の機能を提供することで、MCPのコアコンセプトを実証しています。

  • コード分析と操作のための言語固有のツール

  • シームレスな通信のためのモデルコンテキストプロトコルとの統合

特徴

言語サポート

  • コード内のシンボルのホバー情報を提供します

  • コード補完の提案を提供する

  • 診断情報(エラー、警告)を報告します

  • TypeScriptでのみテストしていますが、理論的にはPythonもサポートされるはずです。可能であれば、言語サーバーを追加したり、より非依存にしたりしたいと考えています。

MCP統合

  • クライアントとの通信にMCPプロトコルを実装します

  • 言語機能をMCPツールとして公開する

ツール

  • get_hover : ドキュメント内の位置のホバー情報を取得する

    • 必須パラメータとして languageId、filePath、content、line、character を取ります

  • get_completions : 文書内の位置の補完候補を取得する

    • 必須パラメータとして languageId、filePath、content、line、character を取ります

  • get_diagnostics : ドキュメントの診断情報を取得する

    • 必須パラメータとして languageId、filePath、content を取ります

Related MCP server: VSCode LSP MCP Server

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "language-server-mcp": {
      "command": "/path/to/language-server-mcp/build/index.js"
    }
  }
}

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

Available Tools

3 tools
get_completionsC

Get completion suggestions for a position in a document

Inputs: character (required), content (required), filePath (required), languageId (required), +2 more.

get_diagnosticsC

Get diagnostic information for a document

Inputs: content (required), filePath (required), languageId (required), projectRoot (required).

get_hoverC

Get hover information for a position in a document

Inputs: character (required), content (required), filePath (required), languageId (required), +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_completions provides suggestions, get_diagnostics provides error/warning information, and get_hover provides documentation. There is no overlap or ambiguity between these three core language server operations.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with 'get_' prefix and descriptive nouns (completions, diagnostics, hover). The naming is perfectly uniform and predictable throughout the set.

    Tool Count3/5

    With only 3 tools, the server feels somewhat thin for a language server domain. While these cover fundamental operations, typical language servers would include more capabilities like formatting, references, definitions, or rename operations. The count is borderline minimal.

    Completeness2/5

    The tool surface is significantly incomplete for a language server. Missing are essential operations like formatting, finding references, getting definitions, renaming symbols, and code actions. Agents will encounter dead ends when trying to perform common language server tasks beyond the three provided.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A lightweight MCP server that provides 40 tools for TypeScript/JavaScript refactoring and code intelligence, directly mapping to TypeScript's tsserver protocol commands for accurate structural changes and workspace analysis.
      40
      29 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A standalone MCP server that provides TypeScript type inference and hover information using tsgo, enabling AI agents to get type details, diagnostics, references, and more without needing an editor.
      1
      MIT