Skip to main content
Glama

language-server-mcp

by alexwohletz

language-server-mcp MCP 服务器

模型上下文协议 (MCP) 服务器为代码编辑提供语言支持。

这是一个基于 TypeScript 的 MCP 服务器,旨在通过提供悬停信息、代码补全和诊断等功能来增强代码编辑体验。它通过提供以下功能演示了核心 MCP 概念:

  • 用于代码分析和操作的特定语言工具
  • 与模型上下文协议集成,实现无缝通信

特征

语言支持

  • 提供代码中符号的悬停信息
  • 提供代码完成建议
  • 报告诊断信息(错误、警告)
  • 仅使用 TypeScript 测试,理论上应该支持 Python。如果可能的话,希望能添加其他语言服务器,或者提供更多语言无关性。

MCP 集成

  • 实现 MCP 协议与客户端通信
  • 将语言特性公开为 MCP 工具

工具

  • get_hover :获取文档中某个位置的悬停信息
    • 将 languageId、filePath、内容、行和字符作为必需参数
  • get_completions :获取文档中某个位置的完成建议
    • 将 languageId、filePath、content、line 和 character 作为必需参数
  • get_diagnostics :获取文档的诊断信息
    • 将 languageId、filePath 和 content 作为必需参数

发展

安装依赖项:

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 来访问浏览器中的调试工具。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

基于 TypeScript 的 MCP 服务器旨在通过提供悬停信息、代码完成和诊断等功能来增强代码编辑体验。

  1. 特征
    1. 语言支持
    2. MCP 集成
    3. 工具
  2. 发展
    1. 安装
      1. 调试

    Related MCP Servers

    • A
      security
      F
      license
      A
      quality
      A TypeScript-based MCP server designed for experimentation and integration with Calude Desktop and Cursor IDE, offering a modular playground for extending server capabilities.
      Last updated -
      2
      1,012
      4
      JavaScript
    • -
      security
      F
      license
      -
      quality
      A TypeScript-based MCP server that enables users to manage text notes and generate summaries, showcasing key MCP concepts like resource representation and LLM integration.
      Last updated -
      1,667
      JavaScript
      • Apple
    • -
      security
      F
      license
      -
      quality
      A TypeScript-based server project that can be integrated with Cursor IDE as an MCP (Model Control Protocol) server, enabling enhanced development capabilities.
      Last updated -
      4
      TypeScript
    • -
      security
      A
      license
      -
      quality
      A TypeScript framework for building MCP servers with client session management capabilities, supporting tools definition, authentication, image content, logging, and error handling.
      Last updated -
      6,371
      TypeScript
      MIT License

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexwohletz/language-server-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server