Chromia LSP MCP

Chromia LSP MCP

Enables AI assistants to query and analyze Rell code via Language Server Protocol features like hover information, completions, diagnostics, and code actions. Automatically manages the Rell LSP server and provides resource-based access with real-time subscriptions.

Category
访问服务器

README

LSP MCP Server for Rell

A Model Context Protocol (MCP) server that provides access to Rell Language Server Protocol (LSP) capabilities through AI assistants.

Documentation

Overview

The LSP MCP Server for Rell enables AI agents like Claude to query and analyze Rell code by providing programmatic access to LSP features. This is only used for AI agents that don't have LSP built-in like Cursor:

  • Hover Information - Get type information, documentation, and contextual details about symbols
  • Code Completions - Get completion suggestions based on current context
  • Diagnostics - Get errors, warnings, and other diagnostic messages
  • Code Actions - Get available refactorings and quick fixes
  • Resource-Based Access - Access LSP features via URI-based resources with real-time subscriptions

The server automatically downloads and manages the Rell LSP server, eliminating manual setup steps.

Requirements

  • Node.js 20 or later or Bun

Installation

The MCP server is published to npm as @chromia/chromia-lsp-mcp.

Claude Code

claude mcp add chromia-lsp -- npx -y @chromia/chromia-lsp-mcp

Copilot in VS Code

code --add-mcp "{\"name\":\"chromia-lsp\",\"command\":\"npx\",\"args\":[\"-y\",\"@chromia/chromia-lsp-mcp\"]}"

Cursor and other editors

Add the server to the editor's MCP config, which in Cursor's case is ~/.cursor/mcp.json:

{
  "mcpServers": {
    "chromia-lsp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@chromia/chromia-lsp-mcp"]
    }
  }
}

Some editors use servers instead of mcpServers; the entry itself is the same either way.

Bun and version pinning

To run on Bun, use "command": "bunx" and drop the -y argument.

Two versions can be pinned independently: the MCP server the usual npm way, and the Rell LSP it drives as a positional argument, as in "args": ["-y", "@chromia/chromia-lsp-mcp@0.0.4", "0.16.2"]. Without the latter, the newest published Rell LSP is downloaded and cached.

Building from source

Only needed to work on the server itself. See Setup & Development.

Features

MCP Tools

  • start_lsp - Start the LSP server with a specified root directory (required before using other tools)
  • get_info_on_location - Get hover information at a specific location in a file
  • get_completions - Get completion suggestions at a specific location in a file
  • get_code_actions - Get code actions for a specific range in a file
  • open_document - Open a file in the LSP server for analysis
  • save_document - Save a file in the LSP server to refresh diagnostics
  • close_document - Close a file in the LSP server
  • get_diagnostics - Get diagnostic messages (errors, warnings) for open files
  • restart_lsp_server - Restart the LSP server without restarting the MCP server
  • set_log_level - Change the server's logging verbosity level at runtime

MCP Resources

  • lsp-diagnostics:// resources for accessing diagnostic messages with real-time updates via subscriptions
  • lsp-hover:// resources for retrieving hover information at specific file locations
  • lsp-completions:// resources for getting code completion suggestions at specific positions

Usage

Your MCP client launches the server; you never run it by hand. Ask the assistant to work on Rell code and it drives the tools itself, starting with start_lsp, which needs a project root. If it picks the wrong directory, name the right one:

Start the Rell LSP server with root directory /path/to/my/dapp

The Rell language server is downloaded to ~/.chromia/lsp-mcp/ the first time it starts and reused afterwards.

Logging

The server reports what it is doing to the client as MCP log notifications. To make it more verbose, ask the assistant to set the log level to debug, or start it that way from the client config:

{
  "mcpServers": {
    "chromia-lsp": {
      "command": "npx",
      "args": ["-y", "@chromia/chromia-lsp-mcp"],
      "env": { "LOG_LEVEL": "debug" }
    }
  }
}

In Claude Code, claude --mcp-debug additionally shows the raw traffic between client and server.

Troubleshooting

On supported platforms the server runs the Rell LSP with a self-contained runtime bundle downloaded to ~/.chromia/lsp-mcp/ and no local Java is involved. If no bundle exists for your platform or the chosen LSP version, it falls back to your own Java: JAVA_HOME first, then PATH (which java / where java on Windows). If startup fails asking for Java, check that java -version reports 21 or later. Editors launched from the desktop rather than a terminal do not inherit your shell's PATH, so a JDK installed through a version manager such as SDKMAN or jenv is often invisible to them; set JAVA_HOME, install a system-wide JDK, or start the client from a terminal.

Version 0.16.x not found in GitLab registry means the pinned Rell LSP version does not exist. Drop the version argument to take the latest release.

LSP server not started. Call start_lsp first with a root directory. is expected right after the client connects. Ask the assistant to start the LSP server on your project root.

If the language server itself misbehaves, delete ~/.chromia/lsp-mcp/; the runtime bundle or jar is downloaded again on the next start.

License

MIT License

Acknowledgments

Built on @Tritlo/lsp-mcp, the original LSP-over-MCP implementation.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选