MCP-MultilspyLSP is an MCP server that provides Language Server Protocol (LSP) capabilities to language models through multilspy. It enables AI assistants to access powerful language intelligence features like code completions, finding definitions, and references across multiple programming languages.
You can install the MCP-MultilspyLSP server using pip:
pip install mcp-multilspy
You can start the server directly:
mcp-multilspy
Or install it in Claude Desktop:
mcp install mcp-multilspy
The server supports multiple programming languages through various language servers:
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")
This example demonstrates how to initialize a language server session, request various types of language intelligence information, and properly shut down the session when you're done.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.