Common issues and solutions when using mcpls.
- Installation Issues
- Claude Code Integration
- LSP Server Issues
- Configuration Issues
- Performance Issues
- Common Error Messages
- Getting Help
Problem: mcpls binary not in PATH after cargo install
Solution:
# Add Cargo bin directory to PATH
export PATH="$HOME/.cargo/bin:$PATH"
# For permanent fix, add to ~/.bashrc or ~/.zshrc
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcVerify:
which mcpls
# Should output: /Users/username/.cargo/bin/mcplsProblem: Rust version too old
Solution:
# Update to Rust 1.85 or later
rustup update stable
rustc --version
# Should output: rustc 1.85.0 or higherProblem: Missing build dependencies
Solution (Linux):
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential pkg-config libssl-dev
# Fedora/RHEL
sudo dnf install gcc pkg-config openssl-develProblem: Not in the project directory
Solution:
# Clone the repository first
git clone https://github.com/bug-ops/mcpls
cd mcpls
# Then install
cargo install --path crates/mcpls-cliChecklist:
- Verify mcpls is installed:
mcpls --version - Check MCP configuration file exists
- macOS/Linux:
~/.claude/mcp.json - Windows:
%APPDATA%\Claude\mcp.json
- macOS/Linux:
- Verify JSON syntax is valid (no trailing commas)
- Restart Claude Code completely (quit and reopen)
- Check Claude Code logs for errors
Example valid configuration:
{
"mcpServers": {
"mcpls": {
"command": "mcpls",
"args": []
}
}
}Invalid configurations:
{
"mcpServers": {
"mcpls": {
"command": "mcpls",
"args": [], // ❌ Trailing comma!
}, // ❌ Trailing comma!
}
}Problem: mcpls binary not found or not executable
Solution:
# Find the mcpls binary
which mcpls
# If found, use absolute path in config
{
"mcpServers": {
"mcpls": {
"command": "/Users/username/.cargo/bin/mcpls",
"args": []
}
}
}Test manually:
# Test mcpls stdio communication
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' | mcplsExpected output should include:
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05",...}}Problem: LSP server not configured or not installed
Symptoms:
- Claude sees tools in the list
- Tool calls return "LSP server not available for file type"
Solution:
- Install required language server:
# For Rust
rustup component add rust-analyzer
# For Python
npm install -g pyright
# For TypeScript
npm install -g typescript-language-server- Verify language server works:
rust-analyzer --version
pyright --version
typescript-language-server --version- Configure in
~/.config/mcpls/mcpls.tomlif needed (Rust works zero-config)
Problem: No LSP server configured for the file extension
Solution:
Create ~/.config/mcpls/mcpls.toml:
[[lsp_servers]]
language_id = "python"
command = "pyright-langserver"
args = ["--stdio"]
file_patterns = ["**/*.py"]Verify configuration:
mcpls --log-level debug
# Check logs for "Registered LSP server for language: python"Problem: Language server taking too long to respond
Symptoms:
- First requests are slow
- Large projects time out
- Tools return timeout errors
Solution 1: Increase timeout in configuration:
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = []
file_patterns = ["**/*.rs"]
timeout_seconds = 120 # Increase from default 30Solution 2: Wait for initial indexing to complete:
# rust-analyzer needs time to index on first run
# Monitor with debug logging
mcpls --log-level debugSolution 3: Reduce workspace size:
[workspace]
# Limit to active project only
roots = ["/Users/username/current-project"]Problem: Large codebase with many dependencies
Symptoms:
- High CPU usage on first run
- Slow response times
- Timeout errors
Solutions:
- Wait for initial indexing (one-time cost):
# Tail logs to monitor progress
mcpls --log-level info 2>&1 | grep "rust-analyzer"- Exclude build artifacts:
[lsp_servers.initialization_options]
files.excludeDirs = ["target", ".git", "node_modules"]- Disable on-save checking temporarily:
[lsp_servers.initialization_options]
checkOnSave.enable = false- Close unnecessary workspaces:
[workspace]
# Don't include entire home directory!
roots = ["/Users/username/active-project"]Problem: Language server process died unexpectedly
Symptoms:
- Tools suddenly stop working
- "Server connection closed" errors
- Need to restart mcpls
Debug steps:
- Check server logs:
mcpls --log-level debug 2>&1 | tee mcpls-debug.log- Test server manually:
# For rust-analyzer
rust-analyzer --help
# For pyright
pyright-langserver --help- Update language server:
# rust-analyzer
rustup update
rustup component add rust-analyzer
# pyright
npm update -g pyright- Report bug to language server maintainers if reproducible
Problem: mcpls not finding mcpls.toml
Debug:
# Check searched locations
mcpls --log-level debug 2>&1 | grep "config"Solution 1: Specify config explicitly:
mcpls --config /path/to/mcpls.tomlSolution 2: Set environment variable:
export MCPLS_CONFIG=/path/to/mcpls.toml
mcplsSolution 3: Place in default location:
mkdir -p ~/.config/mcpls
cp mcpls.toml ~/.config/mcpls/Problem: TOML syntax error or missing required field
Common mistakes:
# ❌ Missing required fields
[[lsp_servers]]
command = "rust-analyzer"
# Missing: language_id, file_patterns
# ✅ Correct
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = []
file_patterns = ["**/*.rs"]Solution: Validate TOML syntax:
# Use online TOML validator
# Or check with mcpls debug mode
mcpls --config mcpls.toml --log-level debugProblem: Language server not in PATH
Solution 1: Install language server:
rustup component add rust-analyzerSolution 2: Use absolute path:
[[lsp_servers]]
command = "/Users/username/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rust-analyzer"Solution 3: Add to PATH:
export PATH="$HOME/.rustup/toolchains/stable-x86_64-apple-darwin/bin:$PATH"Problem: Multiple LSP servers or large workspace
Symptoms:
- High memory usage (>500MB)
- System slowdown
- Out of memory errors
Solutions:
- Configure only needed language servers:
# Don't configure servers you don't use
[[lsp_servers]]
language_id = "rust" # Only if working with Rust
# ...- Limit workspace roots:
[workspace]
# Only active projects
roots = ["/Users/username/current-project"]- Restart mcpls periodically:
# If using with Claude, restart Claude Code
# Or restart mcpls if running standalone- Exclude large directories:
[lsp_servers.initialization_options]
files.excludeDirs = ["target", "node_modules", ".git", "dist"]Problem: Cold start or large files
Symptoms:
- First request takes >5 seconds
- Subsequent requests fast
- Tools time out
Solutions:
- Increase timeout:
[[lsp_servers]]
timeout_seconds = 60- Pre-warm LSP server:
# Keep mcpls running between requests
# Don't restart for every interaction- Enable debug logging to identify bottleneck:
mcpls --log-level debug 2>&1 | grep "duration\|took\|elapsed"- Check system resources:
# Monitor CPU and memory
top -pid $(pgrep mcpls)Problem: Language server indexing or checking
Temporary solutions:
[lsp_servers.initialization_options]
# For rust-analyzer
checkOnSave.enable = false # Disable cargo check on save
# For pyright
python.analysis.diagnosticMode = "openFilesOnly"Long-term solution: Wait for indexing to complete (one-time)
Cause: File path not in workspace or doesn't exist
Fix:
- Ensure file exists:
ls -la /path/to/file - Verify file is in workspace roots
- Use absolute path, not relative path
Cause: No LSP server configured for file extension
Fix: Add LSP server configuration for that language
Example:
[[lsp_servers]]
language_id = "go"
command = "gopls"
args = []
file_patterns = ["**/*.go"]Cause: Line/character position exceeds file content
Fix:
- Verify line number is valid (1-based indexing)
- Verify character is within line length
- Remember: character is UTF-8 code points, not bytes
Example:
// File with 10 lines
get_hover(file, line: 15, ...) // ❌ Line 15 doesn't exist
get_hover(file, line: 5, ...) // ✅ ValidCause: LSP server returned invalid JSON or unexpected format
Debug:
# Enable trace logging
mcpls --log-level trace 2>&1 | tee mcpls-trace.log
# Look for malformed JSON in logsSolutions:
- Update language server to latest version
- Check for server bugs or incompatibilities
- Report issue to mcpls maintainers with trace logs
Cause: Server startup failed or initialization timeout
Debug:
# Test server manually
rust-analyzer --help # Should show help message
# Check initialization options
mcpls --log-level debug 2>&1 | grep "initialization"Solutions:
- Verify server is installed and executable
- Check initialization_options in config
- Increase timeout
- Remove invalid initialization options
- Enable debug logging:
mcpls --log-level debug 2>&1 | tee mcpls-debug.log- Collect system information:
mcpls --version
rust-analyzer --version # or other LSP server
rustc --version
uname -a # OS info- Verify configuration:
cat ~/.config/mcpls/mcpls.toml- Test minimal example:
# Create minimal config
cat > test-mcpls.toml <<EOF
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = []
file_patterns = ["**/*.rs"]
EOF
mcpls --config test-mcpls.toml --log-level debug-
GitHub Issues: https://github.com/bug-ops/mcpls/issues
- Search existing issues first
- Include debug logs and configuration
- Provide minimal reproduction steps
-
GitHub Discussions: https://github.com/bug-ops/mcpls/discussions
- For questions and general help
- Community support
-
Documentation:
When reporting bugs, include:
# System information
mcpls --version
rust-analyzer --version # or other LSP server
rustc --version
uname -a
# Configuration
cat ~/.config/mcpls/mcpls.toml
# Debug logs (run command that fails)
mcpls --log-level trace 2>&1 | tee bug-report.log
# Minimal reproduction steps
echo "1. Create file test.rs with content: ..."
echo "2. Run: mcpls ..."
echo "3. Expected: ..."
echo "4. Actual: ..."For feature requests, include:
- Use case: What problem are you trying to solve?
- Proposed solution: How should it work?
- Alternatives: What workarounds exist?
- Examples: Show example configuration or usage
Maximum verbosity for debugging:
export MCPLS_LOG=trace
mcpls 2>&1 | tee trace.logBypass mcpls to test LSP server:
# Start rust-analyzer
rust-analyzer
# Send initialize request (JSON-RPC)
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":null,"rootUri":"file:///path/to/project","capabilities":{}}}Test mcpls MCP implementation:
# Send MCP initialize
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' | mcpls
# List tools
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | mcplsWatch configuration file:
# macOS
fswatch ~/.config/mcpls/mcpls.toml | xargs -n1 echo "Config changed:"
# Linux
inotifywait -m ~/.config/mcpls/mcpls.tomlIf using TCP transport (future feature):
# Monitor network traffic
tcpdump -i lo0 -A port 8080
# Test with netcat
nc localhost 8080# 1. Kill any running mcpls processes
pkill mcpls
# 2. Clear any cached state (if applicable)
rm -rf ~/.cache/mcpls # Future feature
# 3. Restart Claude Code
# Quit and reopen Claude Code application
# 4. Verify clean start
mcpls --version# Backup existing config
cp ~/.config/mcpls/mcpls.toml ~/.config/mcpls/mcpls.toml.backup
# Start with minimal config
cat > ~/.config/mcpls/mcpls.toml <<EOF
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = []
file_patterns = ["**/*.rs"]
EOF# Recent errors
mcpls --log-level error 2>&1 | tail -20
# All debug output
mcpls --log-level debug 2>&1 | less
# JSON logs for parsing
mcpls --log-json 2>&1 | jq- Getting Started - Quick start guide
- Configuration - Detailed configuration
- Tools Reference - MCP tools documentation