Dart LSP MCP
Provides Dart language analysis capabilities including diagnostics, code navigation, symbol search, and hover information for Dart projects.
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., "@Dart LSP MCPget diagnostics for lib/main.dart"
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.
Dart LSP MCP
A Model Context Protocol (MCP) server that provides Dart language analysis capabilities to Claude Code. This tool uses the Dart language server to provide real-time diagnostics, code navigation, and symbol search for Dart projects.
Features
Real-time Diagnostics: Get errors, warnings, and hints from the Dart analyzer
Go to Definition: Navigate to symbol definitions
Find References: Find all usages of a symbol
Hover Information: Get type information and documentation
Document Symbols: List all symbols in a file
Workspace Symbol Search: Search for symbols across the project
Related MCP server: mcp-server-tree-sitter
Prerequisites
Installation
Clone this repository
Install dependencies:
uv syncUsage
As MCP Server (for Claude Code)
Add to your Claude Code MCP configuration:
{
"mcpServers": {
"dart-lsp": {
"type": "stdio",
"command": "uv",
"args": ["--directory", "D:\\GIT\\BenjaminKobjolke\\dart-lsp-mcp", "run", "python", "-m", "dart_lsp_watcher.mcp_server"]
}
}
}As CLI Tool
Watch a Dart project for diagnostics:
# Watch mode (continuous)
start.bat path/to/dart/project
# Check a single file
check.bat lib/main.dart path/to/dart/project
# Get server capabilities
capabilities.bat path/to/dart/projectAvailable CLI Commands
Command | Description |
| Watch folder for Dart diagnostics |
| Check a single file |
| Go to definition |
| Find references |
| Get hover info |
| List document symbols |
| Search workspace symbols |
| Show LSP capabilities |
MCP Tools
When used as an MCP server, the following tools are available:
Tool | Description |
| Get Dart diagnostics for a project or specific file |
| Find all references to a symbol at a position |
| Navigate to symbol definition |
| Get documentation and type info for a symbol |
| List all symbols in a file |
| Search for symbols across the workspace |
| Get LSP server capabilities |
| Re-scan workspace to detect new/removed Dart files |
Configuration
Create a dart_lsp.json file in your project root to configure ignore patterns:
{
"ignore": [
"build/**",
".dart_tool/**",
"**/*.g.dart"
]
}Development
Run tests:
tools\tests.batLicense
MIT
Maintenance
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/BenjaminKobjolke/dart-lsp-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server