Summary
Add minimal heuristics to prevent spawning LSP servers in projects where they're not applicable. This prevents the MCP server from exposing useless tools.
Context
Related discussion: #34 (comment)
When servers spawn outside their relevant project contexts (e.g., rust-analyzer in a Python project), they create noise and expose tools that can't be used.
Proposed Solution
Implement server-specific heuristics in spawn_batch() to check for project markers before spawning:
fn should_spawn_server(name: &str, config: &ServerConfig) -> bool {
match name {
"rust-analyzer" => Path::new("Cargo.toml").exists(),
"pyright" => Path::new("pyproject.toml").exists() || Path::new("setup.py").exists(),
_ => true // unknown servers get a chance
}
}
Implementation Considerations
- Check markers from workspace root
- Graceful fallback for unknown servers (allow them)
- Document which servers have heuristics
- Add tests for heuristic logic
Related Issues
Summary
Add minimal heuristics to prevent spawning LSP servers in projects where they're not applicable. This prevents the MCP server from exposing useless tools.
Context
Related discussion: #34 (comment)
When servers spawn outside their relevant project contexts (e.g., rust-analyzer in a Python project), they create noise and expose tools that can't be used.
Proposed Solution
Implement server-specific heuristics in
spawn_batch()to check for project markers before spawning:Implementation Considerations
Related Issues