How to let an AI manage a headless Linux server via MCP
Let your AI check services, read logs and run your playbooks on a server with no screen: no SSH port, no AI install and no inbound ports.
When you want help on the server, not another SSH session
Most server questions are small: is the service up, what does the last error say, is the disk full. MCP Desk puts an AI on the other end of those questions without opening the server up.
- No open SSH port and no public IP: the agent dials out.
- No key copied into an AI sandbox. Your AI reaches the server’s tools through MCP Desk, and its keys stay on your side.
- No AI install on the server. One small agent, nothing else.
Install the agent on Linux (x86_64 and ARM)
Linux (x86_64 and aarch64)
curl -fL -o mcpdeskagent "https://mcpdesk.ai/downloads/latest/mcpdeskagent-linux-$(uname -m)"
chmod +x mcpdeskagent
./mcpdeskagentThe agent goes Online and shows a 9-digit desk code and a one-time code that changes every 10 minutes. Leave it running. Check a download against SHA256SUMS if you want to be sure.
The command picks the build for the machine: x86_64, or aarch64 for 64-bit ARM. Check the file against SHA256SUMS with sha256sum mcpdeskagent if you like.
Run it as a service
Run it by hand to try it. To have it come back after a reboot, install it as a systemd service from the same file. It keeps the desk code and mode of the agent you ran, and a brand-new desk starts in readonly:
sudo ./mcpdeskagent install-service
sudo ./mcpdeskagent install-service --mode readonly # choose the mode
sudo ./mcpdeskagent info # desk code, one-time code, linked account The unit is named servermcp, installed under /opt/servermcp. The desk identity is kept in $XDG_DATA_HOME/mcpdesk (usually ~/.local/share/mcpdesk) and, in service mode, in /var/lib/mcpdesk. The service flags are in the docs.
Approve a link with no desktop
Tell your AI “link desk 123 456 789” with the server’s own code. A desktop would show an Allow prompt; on a headless server, you approve from the command line.
Approve on the desk. A prompt shows who wants to link. On a headless server, run mcpdeskagent link approve --wait 120 (add --installed if the agent runs as a service).
The link is permanent until you unlink it: ask your AI to unlink the desk, or run mcpdeskagent link revoke on the server.
Connect Claude, Codex, Cursor or another client
Add https://mcp.mcpdesk.ai/oauth/mcp to your AI client and sign in when it asks. For Claude Code:
claude mcp add --scope user --transport http mcpdesk https://mcp.mcpdesk.ai/oauth/mcp For Codex:
codex mcp add mcpdesk --url https://mcp.mcpdesk.ai/oauth/mcp && codex mcp login mcpdesk Cursor, Grok, OpenCode, VS Code and the Claude connector screen are on Integrations. For end-to-end encryption, the MCP Bridge works with the local clients (Claude Code, Claude Desktop, Cursor, Codex and Grok) and runs on the computer your client runs on, never on the server. After connecting, ask your AI to run sysinfo to see whether you are on standard MCP, the tunnel or direct. How the bridge works.
Readonly diagnosis, then playbooks
--mode readonlyis a good default for “is the service up, show me the log”: your AI only gets the tools that inspect.--mode playbooksadds vetted scripts, for a deploy script you already trust.--mode fulladds a real command shell. Use it when you are supervising.
Screen tools need a desktop session, so this page stays on tools, logs and services. A live view is not part of this job.
Home servers, VPS and Raspberry Pi
The same steps work on a home server behind a router, a cloud VPS and a 64-bit Raspberry Pi or other ARM board, because nothing has to come in. See a remote MCP server with no open ports for why. To remove it: sudo ./mcpdeskagent uninstall-service, then delete the agent file and, if you want a new identity, the data directory.
FAQ
Can I do this without opening SSH?
Yes. The agent dials out to MCP Desk, so the server needs no inbound port at all, SSH included, and no public IP. No SSH key is copied into an AI sandbox. Your AI reaches the server’s tools through MCP Desk.
How do I approve access on a server with no screen?
Run mcpdeskagent link approve --wait 120 on the server and add --installed if the agent runs as a service. It is the same Allow that a desktop shows as a prompt.
Does it run on 64-bit ARM and Raspberry Pi?
Yes. There are Linux builds for x86_64 and for aarch64 (64-bit ARM), which covers a 64-bit Raspberry Pi, ARM VPS plans and most home-lab boards. The download command picks the right file for the machine.
Will the agent start again after a reboot?
Yes, if you install it as a systemd service with install-service. It keeps the same desk code and mode as the agent you ran. Started by hand, it stops when you stop it or reboot.
How do I remove it and its data directory?
Run uninstall-service for the service, then delete the agent file. The desk identity lives in $XDG_DATA_HOME/mcpdesk (usually ~/.local/share/mcpdesk), and in /var/lib/mcpdesk in service mode. uninstall-service --purge deletes the service identity and removes the desk from your dashboard.
Last updated 30 November 2026. Features change; the docs are the reference.