cd /news/ai-agents/i-gave-claude-ssh-access-to-my-serve… · home topics ai-agents article
[ARTICLE · art-41592] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

I gave Claude SSH access to my server — here's the consent gate that makes it safe

A developer built devops-mcp, a mode-based MCP server that lets AI assistants like Claude Desktop, Cursor, and Windsurf operate Linux servers with restricted permissions. The tool enforces a consent gate for state-changing commands, requiring an out-of-band secret token that the AI never sees, and adds extra confirmation for irreversible operations. It is open-source under MIT license and available on GitHub.

read1 min views1 publishedJun 27, 2026

Letting an AI assistant run commands on a real server is genuinely useful — and genuinely terrifying. A model with full shell on a live box can restart the wrong service, deploy onto an in-use port, or docker prune

a database volume because nothing told it not to.

So I built ** devops-mcp**: a mode-based MCP server that lets AI assistants (Claude Desktop, Cursor, Windsurf) operate Linux servers — without handing them the keys to the kingdom.

The AI can connect, scan, plan, and run read-only diagnostics freely. But every command that changes state on a production-like server passes through a consent gate the AI cannot self-approve — it requires a secret token that's passed out-of-band and that the model literally never sees.

| Mode | Allows | Expiry |

|---|---|---|
| 🟢 SAFE (default) | Read-only allowlist (~250 verbs) | none |

| 🟡 PROVISION | Package installs, Docker/Nginx setup | 1 hour | | 🔴 FULL | Root, anything | 30 min |

On a server marked production

, any write is refused without the token + explicit acknowledgement. And for irrecoverable operations — rm -rf /

, dd

, mkfs

, SQL DROP TABLE

, docker volume rm

— it additionally makes you confirm a backup exists.

$(...) substitutions are validated by their contents, not blanket-escalated.It's TypeScript, MIT-licensed, and works with any MCP client. Setup is four steps (the key one: generate your elevation token and save it).

Repo: https://github.com/MHasnainJafri/devops-mcp I'd love feedback — especially on the threat model and whether the mode boundaries feel right for how you run infra.

── more in #ai-agents 4 stories · sorted by recency
── more on @devops-mcp 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-gave-claude-ssh-ac…] indexed:0 read:1min 2026-06-27 ·