lsp-mcp
Exposes the Rust language server (rust-analyzer) to agents, providing diagnostics, rename, formatting, and other LSP features for Rust projects.
Exposes the TypeScript language server's capabilities to agents, including diagnostics, rename, and formatting for TypeScript projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lsp-mcpShow me the TypeScript diagnostics in src/index.ts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lsp-mcp
npx -y @opticlm/lsp-mcpAn MCP server that exposes a single Language Server Protocol server to agents as a headless editor.
lsp-mcp starts the language server you provide, keeps its document state in sync with the workspace, and exposes the language server's capabilities through MCP tools and resources. It is written in TypeScript and Effect.
Features
stdio and Streamable HTTP MCP transports
Diagnostics exposed both as a tool and subscribable MCP resources
Preview-by-default edits for rename and formatting, with explicit disk application
Language-server crash supervision, restart backoff, and document reopening
Initialization options, workspace settings, language-id mappings, and open-document capacity configuration
Underlying techniques:
On-demand document opening, disk change detection, and an LRU cache of open documents
1-based line and column positions designed for agent-facing use
Capability-aware tool registration: unsupported LSP features are not advertised
Related MCP server: Codex LSP Bridge
Usage
The general form is:
npx -y @opticlm/lsp-mcp [lsp-mcp options] -- <language-server> [language-server args...]The -- separates lsp-mcp options from the executable and arguments passed to the language server.
stdio
stdio is the default transport and is suitable for MCP clients that launch a local server process:
npx -y @opticlm/lsp-mcp --root /path/to/project -- typescript-language-server --stdioFor example, an MCP client configuration can point at the checkout like this:
{
"mcpServers": {
"typescript": {
"command": "npx",
"args": [
"-y",
"@opticlm/lsp-mcp",
"--root",
"/path/to/project",
"--",
"typescript-language-server",
"--stdio"
]
}
}
}Streamable HTTP
Run the MCP endpoint on a local port with --http:
npx -y @opticlm/lsp-mcp --http 9010 --root ./crate -- rust-analyzerThe endpoint is available at:
http://localhost:9010/mcpConfiguration examples
# Pass JSON initialization options to the language server.
npx -y @opticlm/lsp-mcp \
--init-options '{"typescript":{"useInferredProjectPerProjectRoot":true}}' \
-- typescript-language-server --stdio
# Serve workspace/configuration and didChangeConfiguration with JSON settings.
npx -y @opticlm/lsp-mcp \
--settings '{"gopls":{"staticcheck":true}}' \
-- gopls
# Add a file-extension to language-id mapping.
npx -y @opticlm/lsp-mcp --language vue=vue --root ./web -- vue-language-server --stdio
# Keep more documents open, and always restart a crashed language server.
npx -y @opticlm/lsp-mcp --open-documents 64 --restart always -- clangdDevelopment
Requirements:
Node.js 26+
pnpm 12.4.2+
pnpm test # Run the Vitest suite, including the fixture LSP integration tests
pnpm check # Type-check without emitting JavaScript
pnpm lint # Format and lint with BiomeThe main source layout is:
src/Model.ts Agent-facing schemas and 1-based positions
src/Tools.ts MCP tool definitions and capability gating
src/Resources.ts MCP resources and notifications
src/Server.ts Effect layer composition and transports
src/main.ts CLI entry point
src/lsp/ LSP process, document, diagnostic, and editor bridge
test/ Unit and integration tests with a fixture language serverThe vscode-* packages are intentionally confined to src/lsp/; the rest of the application uses the agent-facing schemas and Effect services.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
The official Svelte MCP server providing docs and autofixing tools for Svelte development
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceExposes VSCode's Language Server Protocol features through MCP, enabling AI assistants to perform language-aware operations like symbol navigation, reference tracking, safe renaming, type information retrieval, and hover documentation across codebases.-
- AlicenseNot gradedqualityDmaintenanceExposes Language Server Protocol (LSP) features as MCP tools, enabling IDE-grade semantic navigation including go-to-definition, find references, hover info, and symbols across multiple programming languages (Python, Rust, C/C++, TypeScript/JavaScript, React, HTML, CSS).3MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with language-aware code analysis through the Language Server Protocol, enabling tasks like getting code insights and diagnostics.6 npm191MIT
- AlicenseNot gradedqualityDmaintenanceExposes Language Server Protocol (LSP) functionality as Model Context Protocol (MCP) tools, enabling AI clients to programmatically analyze and edit code in any language supported by VS Code.11 npm33MIT