Home / Articles

Let Claude run terminal commands on your server

Connect Claude to a remote Linux server with MCP. Read logs, run scripts and manage services from your Claude chat.

Claude can write shell scripts, explain error messages and suggest fixes — but by default it cannot run anything. With a remote MCP connector you can close that gap: Claude reads the actual log file, runs the command it wrote, checks the output and iterates, all inside one conversation.

Why developers find this useful

The typical workflow without MCP: paste an error into Claude, read its suggestion, switch to a terminal, run it, paste the output back, repeat. With MCP: paste the error once, Claude reads the relevant files itself, runs a fix, confirms the result.

  • Debugging: "Read the last 200 lines of /var/log/myapp/error.log and tell me what's causing the spike in 500 errors at 14:30."
  • Maintenance: "Find log files older than 30 days in /var/log and show me how much space they're using before I delete anything."
  • Deployment checks: "After the deploy, run the health-check endpoint and confirm the response looks right."

How to connect Claude to your server

Step 1 — Sign in at mcp.getshellway.com/dashboard, click Add computer, copy the code and run on your server:

npx shellway pair YOUR-CODE
npx shellway start

Step 2 — Go to Claude Settings → Connectors and add:

https://mcp.getshellway.com/mcp

Sign in with your Shellway account. Done.

Step 3 — Open a Claude chat and try:

Check the status of nginx and show me the last 30 error log lines.

Claude Code on a remote server

Claude Code (the CLI) supports remote MCP servers natively. Add Shellway to your .claude/settings.json:

{
  "mcpServers": {
    "shellway": {
      "type": "http",
      "url": "https://mcp.getshellway.com/mcp"
    }
  }
}

Limits and safety

The agent runs as whichever Linux user you choose. Start it with --readonly and command execution is disabled. You can remove a computer from the dashboard at any time.

Connect Claude to your server — free →