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

mseep_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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mseep_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 mseep_mcp_multilspy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ac8fd5117d7b8e35f7b7c318455500d9d5e79c4c59e5bd2c9572ea880fe6aaa
MD5 6f16e9ea2777aa6d522c99ad817fec14
BLAKE2b-256 bf1d2e0ab054b010d89b499112e9813910ad17f832fec7211f9c5476bf232b82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mseep_mcp_multilspy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04fe512c61ec09e804b7d004879c6ff48b4bc860ae335cde3edf9dcda70c260e
MD5 a4566a8662951fb33e5d20f916dc32c0
BLAKE2b-256 13474ecccce069b7e55f7ff516c6badb1a80da908a2ad2887f4acdd97d6bbaff

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