Connect AI clients like Claude Desktop, Cursor, and other MCP-compatible tools directly to your Hostodo VPS infrastructure. Manage VMs, run commands, transfer files, and more — all from your AI assistant.
Get connected in 3 steps:
# 1. Create a token in OdoPanel Settings > Developer Access
# 2. Add to your MCP client config:
https://api.hostodo.com/mcp
Authorization: Bearer <your-token>
# 3. Ask your AI client to list your VMs
"List my Hostodo VMs"
The Model Context Protocol (MCP) is an open standard that lets AI assistants interact with external tools and data sources. Hostodo's MCP server exposes your VPS infrastructure as tools that AI clients can call — no SSH credentials to paste, no API wrappers to build.
Every MCP tool call is authenticated against your Hostodo account with scoped tokens, checked for VM ownership, audited, and rate-limited. You stay in control of what your AI assistant can and cannot do.
Endpoint: https://api.hostodo.com/mcp
The Hostodo MCP server runs inside OdoPanel's Django backend as an authenticated ASGI endpoint. Here's the flow:
For command execution, three independent gates must all pass:
vms:execTo connect an MCP client, you need a developer token with the right scopes.
claude-desktop or cursor).vms:read — list and inspect VMsvms:power — start, stop, reboot, reset, reinstall, renamevms:exec — run commands, transfer files, manage async commandsaccount:read — read account metadataWarning: Selecting vms:exec allows root command execution inside opted-in VMs. Only enable it if you understand the risks.
Add the Hostodo MCP server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hostodo": {
"url": "https://api.hostodo.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Restart Claude Desktop. Your Hostodo VMs will appear as available tools.
In Cursor, go to Settings → MCP and add a new MCP server:
{
"mcpServers": {
"hostodo": {
"url": "https://api.hostodo.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
If you use Hermes Agent (Nous Research's CLI agent), add the Hostodo MCP server with:
hermes mcp add hostodo --url https://api.hostodo.com/mcp --auth header
Hermes will prompt you for the bearer token on first use. Verify it's connected:
hermes mcp list
Then in any Hermes session, your Hostodo VM tools are available:
Example: "List my Hostodo VMs and check the disk space on the production one"
If you use Claude Code (Anthropic's CLI coding agent), you can add the Hostodo MCP server with a single command:
claude mcp add --transport http --header "Authorization: Bearer <your-token>" hostodo https://api.hostodo.com/mcp
Verify it's connected:
claude mcp list
Then in any Claude Code session, your Hostodo VM tools are available:
Example: "List my Hostodo VMs and check the disk space on the production one"
The Hostodo MCP server uses the Streamable HTTP transport at https://api.hostodo.com/mcp. Any MCP-compatible client that supports bearer token authentication can connect.
Required headers:
| Header | Value |
|---|---|
Authorization | Bearer <your-developer-token> |
Content-Type | application/json |
Send a JSON-RPC initialize request to discover available tools:
curl -X POST https://api.hostodo.com/mcp \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
Ask your AI client to list your VMs. The hostodo_list_vms tool returns only VMs you own.
Required scope: vms:read
Example prompt: "List all my Hostodo VMs and show their IPs"
Output includes id, hostname, status, location, plan, primary_ipv4, primary_ipv6, mcp_exec_enabled, power_state, and power_controls_supported.
The hostodo_get_vm tool returns detailed metadata for a single VM after ownership verification. Accepts VM ID, exact hostname, or unique prefix.
Required scope: vms:read
Example prompt: "Get details for my-server"
The hostodo_power_vm tool supports start, shutdown, reboot, stop, and reset.
Required scope: vms:power
Example prompt: "Reboot my production VM"
The hostodo_exec_vm_command tool runs a command as root inside the VM via the QEMU guest agent. This is a synchronous, bounded execution — use it for quick commands (under 60 seconds).
Required scope: vms:exec
Required VM setting: MCP exec must be enabled on the target VM.
Example prompt: "Run df -h on my-server"
Output includes exit code, stdout, stderr (capped at 64 KiB each), truncation flags, timeout flag, and duration.
Command execution is disabled by default on every VM. To enable it, use the hostodo_set_vm_exec_enabled tool or toggle it from the OdoPanel VM detail page.
Required scope: vms:exec
Enabling requires an exact confirmation phrase containing the VM's instance ID:
# Enable
{ "vm_id": "ins::abc123", "enabled": true, "confirmation": "ENABLE MCP EXEC ins::abc123" }
# Disable
{ "vm_id": "ins::abc123", "enabled": false, "confirmation": "DISABLE MCP EXEC ins::abc123" }
The hostodo_reinstall_vm tool reimages a VM from a template. This is destructive and requires a confirmation phrase.
Required scope: vms:power
Warning: Reinstalling a VM erases all data on it. The confirmation phrase must include the VM ID and template ID exactly.
Example prompt: "Reinstall my-server with Ubuntu 22.04"
The hostodo_rename_vm tool changes a VM's hostname. Requires a confirmation phrase containing the VM ID.
Required scope: vms:power
The Hostodo MCP server supports object-storage-backed file transfer. Instead of streaming file bytes through the MCP protocol, the server creates short-lived presigned S3 upload URLs. The client uploads directly to storage, then asks the server to install the file on the VM.
This works with private repos, CI artifacts, config files, and scripts — no source code is exposed to the MCP server.
Required scope: vms:exec (file install is treated as root VM modification)
Compute the file size and SHA-256 locally, then call hostodo_create_artifact_upload:
# Compute metadata locally
FILE=./nginx.conf
SIZE=$(wc -c < "$FILE" | tr -d ' ')
SHA=$(shasum -a 256 "$FILE" | awk '{print $1}')
Purpose limits:
| Purpose | Max Size | Default Mode |
|---|---|---|
config | 1 MiB | 0640 |
script | 5 MiB | 0750 |
file | 256 MiB | 0644 |
curl -X PUT \
-H "Content-Type: application/octet-stream" \
--upload-file ./nginx.conf \
"$UPLOAD_URL"
After uploading, call hostodo_install_artifact to install the file on the VM. The server generates a short-lived download URL, the VM downloads it, verifies SHA-256, creates parent directories, sets owner/mode, and atomically moves it into place.
Required scope: vms:exec
Example prompt: "Upload this nginx.conf and install it to /etc/nginx/conf.d/site.conf on my-server"
After install, run any follow-up commands separately using hostodo_exec_vm_command or async command tools.
For long-running commands (builds, package installs, migrations, log watching), use the async command tools instead of hostodo_exec_vm_command. These start a command in the background and return a command_id for polling.
Required scope: vms:exec
Example prompt: "Run docker compose build on my-server and let me know when it's done"
The AI client will:
hostodo_start_vm_command to launch the commandhostodo_get_vm_command_output periodically to check status and tail outputhostodo_read_vm_command_logs for incremental log reads by byte offsethostodo_cancel_vm_command if you need to stop ithostodo_get_vm_command_output returns the current status, exit code (if finished), duration, and bounded stdout/stderr tails. This is the ergonomic polling tool for agents.
Statuses: queued, running, succeeded, failed, timed_out, cancelled, unknown
hostodo_read_vm_command_logs reads stdout/stderr chunks by byte offset. Each response includes next_stdout_offset and next_stderr_offset for the next read. This avoids re-receiving the same tail output on every poll.
hostodo_cancel_vm_command kills a running command and marks it as cancelled.
Developer tokens have selectable scopes. Only grant what your AI client needs.
| Scope | Allows |
|---|---|
vms:read | List VMs, get VM details, view metadata |
vms:power | Start, stop, reboot, reset, reinstall, rename VMs |
vms:exec | Run root commands, enable/disable exec, transfer files, manage async commands |
vms:console | Console access (CLI device flow sessions) |
account:read | Read account-level metadata |
Tokens expire after 90 days of inactivity. Revoking a token takes effect immediately — the next MCP request using it will fail authentication.
Every MCP tool call that touches your resources writes an immutable audit event. You can view your audit history in OdoPanel under Settings → Developer Access → Activity.
Audit events include:
Staff can search all MCP audit events from the admin MCP dashboard by user, customer, VM, session, tool, result, IP, or date range.
Staff can activate two independent global kill switches during incidents:
Kill switch state is read per-request and takes effect immediately. No restart or deployment required.
Staff can also disable MCP exec on individual VMs or revoke any developer session at any time.
| Tool | Scope | Description |
|---|---|---|
hostodo_list_vms | vms:read | List all VMs you own |
hostodo_get_vm | vms:read | Get detailed VM metadata |
hostodo_power_vm | vms:power | Start, stop, reboot, reset, shutdown |
hostodo_exec_vm_command | vms:exec | Run a sync bounded command as root |
hostodo_set_vm_exec_enabled | vms:exec | Enable/disable MCP exec per VM |
hostodo_reinstall_vm | vms:power | Reimage VM from template (destructive) |
hostodo_rename_vm | vms:power | Rename a VM's hostname |
hostodo_create_artifact_upload | vms:exec | Create a presigned S3 upload slot for file transfer |
hostodo_install_artifact | vms:exec | Install an uploaded file onto a VM |
hostodo_start_vm_command | vms:exec | Start a long-running background command |
hostodo_get_vm_command_output | vms:exec | Poll command status and tail output |
hostodo_read_vm_command_logs | vms:exec | Read logs incrementally by byte offset |
hostodo_cancel_vm_command | vms:exec | Cancel a running async command |
MCP tools return structured errors with stable error codes. Common ones:
| Code | Meaning |
|---|---|
unauthenticated | Missing or invalid bearer token |
forbidden_scope | Token lacks the required scope |
vm_not_found | VM not owned or does not exist |
vm_state_blocked | VM is suspended, cancelled, or account is flagged |
mcp_exec_disabled | VM does not have MCP exec enabled |
vm_command_in_progress | Another command is already running on this VM |
rate_limited | Rate limit exceeded for this user/VM |
confirmation_required | Destructive action needs exact confirmation phrase |
artifact_not_uploaded | Artifact upload not yet completed |
artifact_sha_mismatch | SHA-256 does not match artifact record |
guest_missing_dependency | VM lacks curl or sha256sum |
Need help? Open a ticket from the OdoPanel console or check the CLI documentation for terminal-based VPS management.