mcpls-core
The translation layer that lets AI agents understand code semantically.
mcpls-core is the library behind mcpls. It turns MCP tool calls into language server requests, manages the language server processes, and translates the answers back. Use it to embed the bridge in your own application; to just use mcpls, install the mcpls binary.
User documentation: https://bug-ops.github.io/mcpls/. API documentation: https://docs.rs/mcpls-core.
Installation
[]
= "0.8"
Enable the transport-http feature to serve over Streamable HTTP:
[]
= { = "0.8", = ["transport-http"] }
Usage
use ;
async
Features
- Protocol translation between MCP tools and LSP requests, with 1-based to 0-based position and encoding conversion
- Language server lifecycle management: spawn, initialize, restart, shutdown
- Non-blocking startup: the MCP server accepts connections while language servers initialize
- Lazy document tracking and a diagnostics cache for push-based notifications, refreshed from disk edits for subscribed resources
- TOML configuration, server discovery by project markers, and trust controls (untrusted launcher, open-then-verify file access)
- Cancellation of in-flight tool calls, forwarded to the language server as
$/cancelRequest - stdio and optional HTTP transports
Learn more
License
Dual-licensed under Apache 2.0 or MIT.