Troubleshooting
Common issues and how to resolve them.
Collect Diagnostics
Before diving into specific issues, run mcpctl diag to collect a complete diagnostic bundle. This command gathers agent logs, configuration (with secrets redacted), scan history, trust service connectivity results, and system information into a single archive and uploads it to a secure location.
mcpctl diag
On completion, the command prints a retrieval URL that you can share with Truvant support. The bundle is retained for 7 days and is accessible only to you and the Truvant support team.
Common Issues
Policy not enforcing
If you have configured a policy role but commands are not being blocked as expected, work through the following checks in order:
- Check agent status. Run
mcpctl statusand confirm the agent is listed asrunning. If it showsstoppedorerror, start it withmcpctl start. - Check the policy role mode. In the Trust Dashboard, navigate to Policy Management and confirm that the role assigned to this host is set to Enforce, not Monitor. In Monitor mode, violations are logged but commands are never blocked.
- Restart your shell. The mcpctl shim is activated at shell startup. If the agent was installed or updated during your current session, open a new terminal window to ensure the shim is active.
- Test a command from the dashboard. On the Host Detail page for this machine, use the Test Command feature to simulate a command against the active policy. This isolates whether the policy is correctly configured or whether the issue is with shim activation.
Agent not connecting to trust service
If mcpctl status shows the trust service as unreachable or the agent cannot sync policy updates, check the following:
- Check agent status. Run
mcpctl statusand look for atrust_serviceconnectivity field. Adisconnectedstate indicates a network or authentication issue. - Check your authentication token. Run
mcpctl loginto re-authenticate. Tokens expire after 24 hours by default. If login fails, check that your identity provider is reachable. - Check network access. Verify that the machine can reach
trust.truvant.aion port 443. Runcurl -sv https://trust.truvant.ai/healthand confirm a200 OKresponse. - Check proxy and firewall rules. If your organization routes outbound HTTPS through a proxy, set the
HTTPS_PROXYenvironment variable before starting the agent. If a firewall or DLP solution performs TLS inspection, addtrust.truvant.aito its bypass list.
Scan results not appearing in dashboard
If you have run mcpctl scan but the results are not visible in the Trust Dashboard, check the following:
- Check authentication. Scan results are only imported if you are authenticated. Run
mcpctl loginto confirm your session is active. - Check the
--no-importflag. If you ranmcpctl scan --no-import, results were intentionally not sent to the dashboard. Rerun without that flag to import results. - Check that the agent is running. The agent is responsible for forwarding scan results to the trust service. Run
mcpctl statusand confirm it isrunning. - Verify this host appears on the Hosts page. Open the Trust Dashboard and navigate to the Hosts page. If this machine is not listed, the agent has not yet successfully registered. Run
mcpctl installto re-register, or check the agent logs withmcpctl diag.
Agent won't start
If mcpctl start exits immediately or the agent fails to stay running, check the following:
- Check for another running instance. Run
mcpctl status. If another instance is already running, stop it withmcpctl stopbefore starting again. Multiple agent instances on the same machine are not supported. - Check system logs. Examine the system log for error messages from the agent process:
- Linux:
journalctl -u mcpctl --since "10 minutes ago" - macOS:
log show --predicate 'process == "mcpctl"' --last 10m
- Linux:
- Try reinstalling. If the logs show a corrupted binary or missing dependency, reinstall the agent:
mcpctl uninstall && mcpctl install. This preserves your configuration and policy assignments.
Commands being incorrectly blocked
If legitimate commands are being blocked by policy, use the following steps to diagnose and adjust the policy without disabling enforcement entirely:
- Use the Test Command feature. On the Host Detail page for this machine, enter the blocked command in the Test Command field. The dashboard shows exactly which policy rule matched and why the command was denied.
- Check the Audit Log. In the Audit Log, filter by this host and look for the blocked event. The log entry includes the matched rule name, the artifact involved, and the trust score that triggered the block.
- Edit the policy role. If the block is a false positive, navigate to the matched rule in Policy Management and adjust the rule's threshold, add an exception for the specific artifact, or move the artifact to a higher-trust tier.
- Switch to Monitor mode temporarily. If you need to unblock commands immediately while you investigate, set the policy role to Monitor mode. Violations will continue to be logged, but no commands will be blocked. Remember to switch back to Enforce once the policy is corrected.
Get Help
If the steps above do not resolve your issue, the Truvant support team is here to help.
- Email: mike@truvant.ai — include the output of
mcpctl diagand a description of the issue. - GitHub: github.com/mcpctl-ai/mcpctl — open an issue for bug reports and feature requests.