Skip to main content
MCP server CX Codex

logmcp — Claude Code MCP server: read server logs, no SSH

Hands an AI assistant read-only access to logs on a remote Linux box. Useful when you want help diagnosing a problem but not a shell.

Open on GitHub

What logmcp does

logmcp runs an MCP server on the machine and serves log files to the assistant over HTTPS. Only paths on the whitelist are visible, and nothing can be edited, deleted or executed. Every access lands in syslog; log contents do not.

For a quick look there is logmcp quickstart. It checks your adm and systemd-journal group memberships, creates a bearer token and a self-signed certificate, starts the server and prints a claude mcp add line you can paste. Both the token and the certificate are throwaway, and the token is regenerated on each start. A lasting setup goes through go install github.com/kascada/logmcp@latest or the .deb package, then sudo logmcp setup walks you through TLS mode, the token and a systemd unit. Settings live in /etc/logmcp/config.yaml, where values accept ${VAR} environment substitution; an unset variable expands to an empty string.

Beyond plain files, systemd journal is exposed as the virtual source journald://. You can keep several bearer tokens and revoke them, hand token verification to an external program, or sit behind Caddy. Extensions publish CLI tools or Redis-RPC workers as extra MCP tools, and macros define composite tools in YAML without writing code. If your client runs locally with an SSH key, an SSH tunnel replaces the public HTTPS endpoint.

What it helps with

  • trace a production crash from the log files
  • read journald without granting shell access
  • grep a log by regexp with surrounding context
  • give a contractor read-only log access
  • check server config and environment before digging into an incident

Example prompts for the agent

  • Show the last 200 lines of /var/log/nginx/error.log and explain what is failing
  • Search journald:// for entries about the crashed service in the past hour
  • Run the environment check and tell me whether the server is configured correctly

How to install logmcp

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about logmcp

How do I install logmcp in Claude Code?

Install the server with go install github.com/kascada/logmcp@latest, then run sudo logmcp setup and follow the wizard. After that logmcp client-config claude-code prints the MCP config snippet to paste into your client.

What does logmcp do?

It exposes log files from a remote Linux server to an AI assistant over HTTPS, read-only. The assistant can list, read and search logs, but gets neither SSH nor write permissions.

Does logmcp need root?

logmcp quickstart does not: it checks the adm and systemd-journal groups and runs as your current user. If you start it as root, pass --user <name> and it relaunches under that account.

Similar MCP servers

All MCP servers for DevOps and infrastructure →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor