connect-to-server-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@connect-to-server-mcpcheck disk usage and service status on prod-web"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
connect-to-server-mcp
connect-to-server-mcp is a Model Context Protocol server that turns any remote machine into something an AI agent can operate. Point it at a host — bare metal, VPS, or cloud instance — with whatever credentials you have (SSH key, password, agent forwarding, or a jump host), and the agent gains a structured toolset for real operations: executing commands, reading and editing files, tailing logs, managing systemd services, and inspecting resource usage. Every action goes through explicit, permission-scoped tools with full audit logging, so the agent's reach stays exactly as wide as you allow.
Features
Any host, any auth — SSH keys (with passphrase), passwords, the local SSH agent, and jump hosts / bastions.
Per-host access modes —
read_onlyrefuses anything that looks like it mutates state;fullunlocks writes. An explicitallowed_commandsallowlist overrides both.Global guard rails —
rm -rf /,mkfs,dd of=/dev/…, fork bombs and reboots are refused on every host regardless of mode.Audit log — every attempt, including refusals, appended as JSONL.
Purpose-built tools — logs, services, and health snapshots have dedicated tools, so the agent rarely needs raw shell.
Related MCP server: remote-admin-mcp
Tools
Tool | What it does |
| List configured hosts with access mode and description |
| Re-read the inventory and drop open connections |
| Open/reuse the SSH session and report host identity |
| Run a shell command, subject to the host's policy |
| Read or overwrite a remote file over SFTP (writes make a |
| List a directory with sizes and permissions |
| Tail a log file or a systemd unit's journal, optionally filtered |
| Inspect or start/stop/restart/enable a systemd unit |
| Load, memory, disk, top processes, failed units in one call |
| Close one connection or all of them |
Install
Pick whichever fits your setup — all three end up running the same server.
1. One command (npx)
No Python setup, no clone. The launcher finds uv or Python 3.10+ on your machine, provisions what is missing, and registers the server with every Claude client it detects:
npx connect-to-server-mcp installTargets can be named explicitly, and the scope for the CLI chosen:
npx connect-to-server-mcp install claude-code --scope user
npx connect-to-server-mcp install claude-desktop
npx connect-to-server-mcp install --config-file ./.mcp.json # any MCP clientinstall also seeds a starter inventory at ~/.config/connect-to-server-mcp/hosts.yaml if you do not have one. Restart the client afterwards, then run npx connect-to-server-mcp doctor if anything looks off — it prints the runtime, config paths, and the exact command the server will be started with.
2. Claude Code plugin (marketplace)
/plugin marketplace add vstlmkh/connect-to-server-mcp
/plugin install connect-to-server@connect-to-serverThe plugin ships its own .mcp.json, so the server appears as soon as it is enabled.
3. Manual client config
Add this to claude_desktop_config.json (Claude Desktop) or any other MCP client:
{
"mcpServers": {
"connect-to-server": {
"command": "npx",
"args": ["-y", "connect-to-server-mcp"],
"env": { "CONNECT_MCP_CONFIG": "~/.config/connect-to-server-mcp/hosts.yaml" }
}
}
}Or register it with the Claude CLI directly:
claude mcp add connect-to-server -e CONNECT_MCP_CONFIG=~/.config/connect-to-server-mcp/hosts.yaml \
-- npx -y connect-to-server-mcpFrom source
git clone https://github.com/vstlmkh/connect-to-server-mcp.git
cd connect-to-server-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
connect-to-server-mcp # stdio transportConfigure
Copy docs/examples/hosts.yaml to ~/.config/connect-to-server-mcp/hosts.yaml, or point CONNECT_MCP_CONFIG at a file of your choosing. Any ${VAR} in the file is expanded from the environment at load time — keep secrets out of version control.
audit_log: ~/.local/state/connect-to-server-mcp/audit.jsonl
hosts:
- name: prod-web
hostname: 203.0.113.10
username: deploy
private_key: ~/.ssh/id_ed25519
known_hosts: ~/.ssh/known_hosts
mode: read_only
- name: staging
hostname: staging.internal
username: root
private_key: ~/.ssh/id_ed25519
mode: full
working_dir: /srv/appEnvironment variables the launcher understands:
Variable | Purpose |
| Path to the host inventory YAML |
| Interpreter to run the server with, bypassing uv/venv discovery |
| pip/uv spec to install instead of the published package |
Safety model
The policy layer is a guard rail against an agent wandering, not a security boundary. The real boundary is the remote account's own permissions: give each host a dedicated user with the narrowest sudo rules that let it do its job, and start every host in read_only until you have a reason to widen it.
Development
pytest # tests
ruff check . # lint
mypy src # typesLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isolation to prevent unauthorized operations.1022MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage remote servers via SSH with agentless command execution, file operations, and service management.9MIT
- AlicenseAqualityAmaintenanceEnables AI assistants to manage remote servers via SSH with 14 commands for execution, file transfer, auditing, and monitoring.186632MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to securely execute commands on remote hosts via SSH and SFTP, with persistent shells, file transfers, screenshots, and an audit log.1MIT
Related MCP Connectors
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Runtime permission, approval, and audit layer for AI agent tool execution.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vstlmkh/connect-to-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server