language-server-mcp
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 toolsget_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
Scored across 3 tools
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.
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.
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.
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
The official Svelte MCP server providing docs and autofixing tools for Svelte development
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to understand and work with TypeScript APIs they haven't been trained on by providing structured access to TypeScript type definitions and documentation.46MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes Language Server Protocol features to external clients, allowing access to hover information, definitions, completions, references, and rename functionalities.43MIT
- AlicenseAqualityDmaintenanceA 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.4029 npm3MIT
- AlicenseNot gradedqualityDmaintenanceA 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.1MIT