Skip to main content

MCP server that exposes Language Server Protocol functionality via multilspy

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orange_mcp_multilspy-0.1.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orange_mcp_multilspy-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file orange_mcp_multilspy-0.1.0.tar.gz.

File metadata

  • Download URL: orange_mcp_multilspy-0.1.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for orange_mcp_multilspy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e31a0b1278053d8bebd6008aae8b6315bfed2db9ef5f679d80e0b460e6046d62
MD5 ea7493f1e56d1f9f6bdb057c04bea802
BLAKE2b-256 362471801b6676b16a8604810ca29005a3a6416bf8328e5a27bd869ca6ba71fc

See more details on using hashes here.

File details

Details for the file orange_mcp_multilspy-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orange_mcp_multilspy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 818d0b67ebfaa75ed7c04eff96fdbd6f07fc6e515243cf41e861890ee3640ea3
MD5 2417a65e9647dab5d3b4c13ccffc9b56
BLAKE2b-256 b3a8c23855a98d07f38f68ca5970320aad7c2731c8d75de193767aa814cb7406

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page