language-server-mcp
언어 서버-mcp MCP 서버
코드 편집을 위한 언어 지원을 제공하는 MCP(Model Context Protocol) 서버입니다.
이는 호버 정보, 코드 완성, 진단 등의 기능을 제공하여 코드 편집 경험을 향상시키도록 설계된 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
개발
종속성 설치:
지엑스피1
서버를 빌드하세요:
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
| Name | Required | Description | Default |
|---|---|---|---|
| character | Yes | Zero-based character offset for completion position | |
| content | Yes | The current content of the file | |
| filePath | Yes | Absolute or relative path to the source file | |
| languageId | Yes | The language identifier (e.g., "typescript", "javascript") | |
| line | Yes | Zero-based line number for completion position | |
| projectRoot | Yes | Important: Root directory of the project for resolving imports and node_modules where the tsconfig.json or jsconfig.json is located |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but provides minimal information. It mentions getting 'completion suggestions' but doesn't describe what format these suggestions come in, whether there are rate limits, authentication requirements, or any side effects. The description doesn't contradict annotations (since none exist), but it fails to provide the behavioral context needed for a tool with 6 required parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for the tool's complexity and front-loads the core purpose immediately. Every word earns its place in communicating the essential function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 6 required parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what kind of completions are returned, in what format, or any behavioral characteristics. The agent would need to guess about the tool's behavior and output based solely on the parameter schema, which is inadequate for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description mentions 'for a position in a document' which hints at the line/character parameters, but provides no additional semantic context beyond what's already in the schema (which has 100% coverage). The schema descriptions already clearly explain each parameter's purpose, so the description adds minimal value. This meets the baseline of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and resource 'completion suggestions' with the context 'for a position in a document', making the purpose immediately understandable. It distinguishes from sibling tools like get_diagnostics and get_hover by focusing specifically on completion suggestions rather than diagnostics or hover information. However, it doesn't specify what type of completions (e.g., code completions, text completions) or from what source.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are no explicit instructions about when this tool is appropriate, what prerequisites might be needed, or how it differs from other completion-related tools that might exist. The agent must infer usage purely from the tool name and parameter schema.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_diagnosticsC
Get diagnostic information for a document
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The current content of the file | |
| filePath | Yes | Absolute or relative path to the source file | |
| languageId | Yes | The language identifier (e.g., "typescript", "javascript") | |
| projectRoot | Yes | Important: Root directory of the project for resolving imports and node_modules where the tsconfig.json or jsconfig.json is located |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action. It doesn't reveal whether this is a read-only operation, if it has side effects, performance characteristics, or what the output looks like (e.g., error messages, warnings). This leaves significant gaps for a tool with four required parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of four required parameters and no annotations or output schema, the description is incomplete. It doesn't explain what 'diagnostic information' includes (e.g., errors, linting results) or provide context for parameter usage, leaving the agent with insufficient information to use the tool effectively beyond basic invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, clearly documenting all four parameters (content, filePath, languageId, projectRoot). The description adds no additional semantic context beyond the schema, such as how parameters interact or examples of valid values, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('diagnostic information for a document'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_completions' or 'get_hover', which likely also operate on documents but provide different types of information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_completions' or 'get_hover'. It lacks context about what 'diagnostic information' entails or scenarios where it's appropriate, offering no explicit or implied usage instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_hoverC
Get hover information for a position in a document
| Name | Required | Description | Default |
|---|---|---|---|
| character | Yes | Zero-based character offset for hover position | |
| content | Yes | The current content of the file | |
| filePath | Yes | Absolute or relative path to the source file | |
| languageId | Yes | The language identifier (e.g., "typescript", "javascript") | |
| line | Yes | Zero-based line number for hover position | |
| projectRoot | Yes | Important: Root directory of the project for resolving imports and node_modules where the tsconfig.json or jsconfig.json is located |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe behavioral traits like whether it's read-only, what the output format might be, potential errors, or performance characteristics. For a tool with 6 required parameters and no annotations, this leaves significant gaps in understanding how the tool behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the purpose clearly without unnecessary words. It's appropriately sized and front-loaded with the essential information. Every word earns its place in this concise formulation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 required parameters, no annotations, no output schema), the description is insufficiently complete. It doesn't explain what 'hover information' entails, what format the response might have, or any behavioral aspects. For a tool that likely returns structured data about code elements at a specific position, more context about the expected output would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('hover information') with specific context ('for a position in a document'). It distinguishes from sibling tools like 'get_completions' and 'get_diagnostics' by focusing on hover functionality rather than completions or diagnostics. However, it doesn't explicitly differentiate from siblings beyond the inherent difference in purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools, prerequisites, or specific contexts for invocation. It lacks explicit instructions on when this tool is appropriate compared to other tools in the server.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
get_completions - First observed
get_diagnostics - First observed
get_hover
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.
Maintenance
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.11 npm46MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that exposes Language Server Protocol features to external clients, allowing access to hover information, definitions, completions, references, and rename functionalities.6 npm42MIT
- 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.4086 npm3MIT
- AlicenseNot gradedqualityBmaintenanceA 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.6 npm1MIT