An Model Context Protocol (MCP) server that provides LLMs/AI Agents with the capabilities of a language server protocol (LSP) server. This gives the AI the abil
An Model Context Protocol (MCP) server that provides LLMs/AI Agents with the capabilities of a language server protocol (LSP) server. This gives the AI the abil
An Model Context Protocol (MCP) server that provides LLMs/AI Agents with the capabilities of a language server protocol (LSP) server. This gives the AI the ability to get language aware context from the codebase.
Input:
Use lsp to give me insights into the following typescript code:
let foo = "bar";
function x() {
let foo = 123;
console.log(foo);
}
x();
console.log(foo);Output:
…This is in a POC state.
Modify claude_desktop_config.json (As described in the MCP Docs) with the following:
{
"mcpServers": {
"lsp": {
"command": "docker",
"args": ["run", "-i", "--rm", "docker.io/jonrad/lsp-mcp:0.3.1"]
}
}
}You'll likely want to share some files with the container by passing docker -v /local_dir:/remote_dir. Then you can ask Claude about the files in /remote_dir/.
Note: Claude Desktop is finicky with npx it seems. Sometimes it says the mcp fails but the tools still work. I'll look into this... later
{
"mcpServers": {
"lsp": {
"command": "npx",
"args": ["-y", "--silent", "git+https://github.com/jonrad/lsp-mcp", "--lsp", "npx -y --silent -p '[email protected]' -p '[email protected]' typescript-language-server --stdio"]
}
}
}This will provide Claude with the LSP capabilities of the typescript language server. You can modify the language server by switching the --lsp argument (and then restarting Claude).
Multiple LSPs at the same time is not yet supported.
Follow the instructions provided by Cursor. For settings, choose Type = command and Command = docker run ... as mentioned above for claude (eg docker run -i --rm -v : jonrad/lsp-mcp:)
Follow the instructions for Claude but the config file is located in ~/.llm/config.json
yarn
yarn mcp-cli # Interactive MCP tool to help with development
yarn dev --help # Get the CLI helpThis is just a list of things I'd like to do eventually. There is no timeline or order for these.
No open issues yet, or sync has not completed.