LSP-MCP
Bridges a Roslyn C# language server to AI agents via the GitHub Copilot CLI, enabling code intelligence tools such as diagnostics, call hierarchy, and type hierarchy queries.
Click on "Install 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-MCPfind callers of the Main method in Program.cs"
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
Minimal MCP server that bridges a Roslyn C# language server to AI agents (e.g. GitHub Copilot CLI).
Tools Exposed
Tool | Description |
| Compiler errors/warnings for a file or all open files |
| Find all callers of a symbol |
| Find all functions called by a symbol |
| Base types and interfaces |
| Derived types and implementations |
Setup
pip install -e .Configuration
Create .github/lsp.json in your workspace root:
{
"lspServers": {
"csharp": {
"command": "path/to/Microsoft.CodeAnalysis.LanguageServer.exe",
"args": ["--stdio", "--autoLoadProjects"]
}
}
}Usage with Copilot CLI
Add to .copilot/mcp-config.json:
{
"mcpServers": {
"roslyn": {
"type": "stdio",
"command": "lsp-mcp",
"args": ["--workspace", "/path/to/your/project"]
}
}
}How It Works
On startup, reads
.github/lsp.jsonto find the LSP server commandSpawns Roslyn with
--stdioand performs the LSP initialize handshakeCaches diagnostics pushed by Roslyn via
textDocument/publishDiagnosticsExposes 5 MCP tools that agents can call for code intelligence
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/morrow-addref/LSP-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server