MCP ExplorerExplorer

Mcp Multilspy

@asimihsanon a year ago
3 MIT
FreeCommunity
AI Systems
MCP-Multilspy is an MCP server providing LSP features for language models.

Overview

What is Mcp Multilspy

mcp-multilspy is an MCP server that exposes Language Server Protocol (LSP) capabilities through multilspy, allowing language models to access language intelligence features.

Use cases

Use cases include enhancing code completion suggestions, performing static analysis, finding symbol definitions and references, and supporting multiple programming languages in a unified environment.

How to use

To use mcp-multilspy, you can start the server directly by running ‘mcp-multilspy’ in your terminal, or you can install it in Claude Desktop using ‘mcp install mcp-multilspy’.

Key features

Key features include language intelligence for code completions, finding definitions and references, multi-language support (Python, Java, TypeScript, etc.), easy integration with MCP-compatible clients, and static analysis capabilities.

Where to use

mcp-multilspy can be used in software development environments where language intelligence and code understanding are required, particularly in IDEs and code editors.

Content

MCP-MultilspyLSP

An MCP server that exposes Language Server Protocol (LSP) capabilities through multilspy.

What is this?

This project provides an MCP (Model Context Protocol) server that
gives language models access to language intelligence features from the Language Server Protocol (LSP).
It uses multilspy, a Python library that simplifies
interfacing with various language servers.

Features

  • Language Intelligence: Get code completions, find definitions, references, and more
  • Multi-language Support: Works with multiple programming languages including Python, Java, TypeScript, and more
  • Easy Integration: Works with any MCP-compatible client like Claude Desktop
  • Static Analysis: Leverage the power of language servers for code understanding

Installation

pip install mcp-multilspy

Usage

Start the server directly:

mcp-multilspy

Or install it in Claude Desktop:

mcp install mcp-multilspy

Supported Languages

  • Java (Eclipse JDTLS)
  • Python (jedi-language-server)
  • Rust (Rust Analyzer)
  • C# (OmniSharp/RazorSharp)
  • TypeScript (TypeScriptLanguageServer)
  • JavaScript (TypeScriptLanguageServer)
  • Go (gopls)
  • Dart (Dart Language Server)
  • Ruby (Solargraph)

Example

Here’s how to use this server with an MCP client:

# Initialize a TypeScript language server session
session = await initialize_language_server(
    session_id="ts-session", 
    project_root="/path/to/project",
    language="typescript"
)

# Find where a symbol is defined
definitions = await request_definition(
    session_id="ts-session",
    file_path="src/index.ts",
    line=10,  # 0-indexed
    column=15  # 0-indexed
)

# Find all references to a symbol
references = await request_references(
    session_id="ts-session",
    file_path="src/index.ts",
    line=10,
    column=15
)

# Get code completion suggestions
completions = await request_completions(
    session_id="ts-session",
    file_path="src/index.ts", 
    line=10,
    column=15
)

# Get hover information
hover_info = await request_hover(
    session_id="ts-session",
    file_path="src/index.ts",
    line=10,
    column=15
)

# Get document symbols
symbols = await request_document_symbols(
    session_id="ts-session",
    file_path="src/index.ts"
)

# Clean up when done
await shutdown_language_server(session_id="ts-session")

Requirements

  • Python 3.12 or higher
  • Language-specific requirements:
    • For Java: JDK 17.0.6 or higher
    • For JavaScript/TypeScript: Node.js v18.16.0 or higher

License

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers