Troubleshooting¶
Solutions for common issues when installing and using the Linux MCP Server.
Quick Links
- Using MCP Inspector
- Common Installation Issues
- SSH Connection Issues
- Platform-Specific Issues
- Getting Additional Help
Using MCP Inspector for Debugging¶
The MCP Inspector is an official tool for testing and debugging MCP servers.
Install MCP Inspector:
Note
Requires Node.js to be installed on your system.
Run the inspector with your MCP server:
# For uv-installed version
mcp-inspector linux-mcp-server
# For development version
cd /path/to/linux-mcp-server
mcp-inspector uv run linux-mcp-server
The inspector provides a web UI where you can:
- View all available tools
- Test tool calls with different parameters
- See real-time request/response data
- Debug connection issues
- Inspect server capabilities
Common Installation Issues¶
"Permission denied" when reading system logs¶
Cause: The user running the MCP server doesn't have permission to read system logs.
Solutions:
- Add user to
admorsystemd-journalgroup: - Log out and log back in for group changes to take effect
- Only whitelist log files that the user can read in
LINUX_MCP_ALLOWED_LOG_PATHS
"Permission denied" when reading a local application log file¶
Cause: If the server throws an error when starting (e.g., PermissionError: [Errno 13] Permission denied: '.../server.log'), it's usually because the log file or its parent directory is owned by a different user (often root due to a previous sudo run).
Solutions:
- Verify the current user is the owner of the log directory:
- If the owner is not $USER (e.g., if it shows root or a different User ID), reclaim the folder ownership:
Claude Desktop doesn't show the MCP server¶
Common causes:
- Syntax error: Validate JSON at https://jsonlint.com/
- Wrong file location: See Client Configuration
- Command not in PATH: Use full path in
commandfield or ensure command is in PATH - Server won't start: Test command manually; check Claude Desktop logs (
~/Library/Logs/Claude/on macOS,~/.config/Claude/logs/on Linux,%APPDATA%\Claude\logs\on Windows) - Config not reloaded: Completely quit and restart Claude Desktop
SSH Connection Issues¶
"Permission denied (publickey)"¶
Cause: SSH key authentication failed.
Solutions:
-
Verify key exists and is readable:
-
Test SSH directly with verbose output:
The-vflag shows detailed connection info to identify the failure point. -
Ensure key is loaded in ssh-agent:
-
For containers, verify key ownership:
"Host key verification failed"¶
Cause: Remote host is not in your known_hosts file.
Solutions:
-
Connect manually first to accept the key:
-
Or disable host key verification (less secure):
See SSH Configuration for more details on host key management.
Connection timeouts¶
Cause: Network issues, firewall blocking SSH, or incorrect hostname.
Solutions:
-
Test basic connectivity:
-
Increase timeout in client config:
-
Check firewall rules on both local and remote systems for port 22 (or custom SSH port).
"No such file or directory" for SSH key¶
Cause: The SSH key path is incorrect or key doesn't exist.
Solutions:
-
Check if the key exists:
-
Generate a new key if needed:
-
Verify
LINUX_MCP_SSH_KEY_PATHpoints to correct file.
Platform-Specific Issues¶
Linux: "systemctl: command not found"¶
Cause: System doesn't use systemd.
Solution: The Linux MCP Server requires systemd on the target system for service-related tools. The main use case is modern RHEL-family distributions (RHEL 9+, Fedora, CentOS Stream).
macOS / Windows: Tools not working locally¶
Local execution (without the host parameter) is only supported on Linux. On macOS and Windows, use the MCP server to manage remote Linux systems via SSH by specifying a host parameter.
Getting Additional Help¶
- Check logs: Server logs in
~/.local/share/linux-mcp-server/logs/(see Debug Logging) - Enable debug: Set
"LINUX_MCP_LOG_LEVEL": "DEBUG"in config, restart your MCP client - Test with MCP Inspector: Isolate whether issue is with server or client
- Run the MCP server manually: Make sure the MCP server does not crash upon start and is able to receive messages.
- Open an issue: https://github.com/rhel-lightspeed/linux-mcp-server/issues
- Include:
- Your OS and version
- Python version
- Installation method used
- Error messages and logs
- Steps to reproduce