ChatGPT VPS MCP
Allows ChatGPT to inspect and administer a Linux VPS, including system status, workspace file management, and optional root command execution.
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., "@ChatGPT VPS MCPShow me the current system status and resource usage"
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.
ChatGPT VPS MCP
A self-hosted, no-Docker MCP server that lets ChatGPT inspect and administer a Linux VPS through Streamable HTTP. It includes HTTPS deployment, OAuth discovery, Dynamic Client Registration (DCR), authorization code + PKCE, refresh tokens, and an explicitly opt-in root command mode.
Root mode gives an AI model the practical equivalent of an unrestricted root shell. Prompt injection, a stolen OAuth password, or an incorrect command can expose or destroy the entire VPS. Use a dedicated VPS, keep backups, and enable root mode only when you fully accept that risk.
Features
Streamable HTTP MCP endpoint at
https://your-domain.example/mcpOAuth-compatible discovery for ChatGPT custom plugins/connectors
Dynamic Client Registration and PKCE
One-hour access tokens and 30-day refresh tokens
Root mode disabled by default
Optional
run_commandandrun_command_batchroot toolsContained workspace file tools
VPS health/status tool, resources, and prompt
systemd service, Nginx reverse proxy, Certbot, and automatic renewal
No Docker
Related MCP server: MCP VPS Manager
Requirements
Ubuntu or Debian VPS
Root/sudo access
A domain or subdomain whose
Arecord points to the VPSPublic inbound TCP ports 80 and 443
Node.js 22 or newer (the installer uses the distribution package)
ChatGPT access to custom plugins/connectors and Developer mode
Typical runtime usage is roughly 120–150 MB RAM for Node.js plus Nginx. CPU usage is near zero while idle.
Quick installation
Create a DNS record first:
Type: A
Name: mcp
Value: YOUR_VPS_IPV4
Proxy: DNS only during initial certificate issuanceClone and install in the safer contained mode:
git clone https://github.com/yxxrn/chatgpt-vps-mcp.git
cd chatgpt-vps-mcp
sudo bash scripts/install.sh \
--domain mcp.example.com \
--email admin@example.comTo deliberately enable unrestricted root commands:
sudo bash scripts/install.sh \
--domain mcp.example.com \
--email admin@example.com \
--enable-rootThe installer:
Installs Node.js, Nginx, Certbot, and the Nginx Certbot plugin.
Creates an unprivileged
chatgpt-mcpservice account.Generates an OAuth signing secret and a random owner password.
Installs and starts the MCP systemd service on
127.0.0.1:3000.Publishes only Nginx on ports 80/443.
Obtains a Let's Encrypt certificate and enables renewal.
Verifies the health endpoint and the unauthenticated
401challenge.
Retrieve the generated owner password only through SSH:
sudo cat /root/chatgpt-vps-mcp-credentials.txtDo not paste this password into chats, issues, logs, or source files. Enter it only on your MCP authorization page.
Connect from ChatGPT
The exact labels can vary by ChatGPT plan and UI release:
Open Settings → Plugins/Connectors → Developer mode.
Create a custom plugin/connector.
Enter
https://mcp.example.com/mcpas the server URL.Select OAuth.
Keep Dynamic Client Registration (DCR) selected.
Keep the default scope
mcp; leave base scopes empty.Create the connector and enter the generated owner password on the authorization page.
The server advertises these endpoints automatically:
/.well-known/oauth-authorization-server
/.well-known/oauth-protected-resource/mcp
/register
/authorize
/token
/mcpAvailable tools
Always available:
pingsystem_statuslist_workspaceread_text_filewrite_text_filemake_directorydelete_file
Only with --enable-root:
run_commandrun_command_batch
Root tools are intentionally annotated as destructive and open-world. The MCP server itself does not add a confirmation dialog, but ChatGPT may still enforce platform-level approvals.
Long-running work
Each command is limited to five minutes. Start longer work as a persistent background unit and poll it in later tool calls:
systemd-run --unit=my-long-job --collect /usr/local/bin/my-task
systemctl status my-long-job
journalctl -u my-long-job --no-pager -n 200This keeps VPS work running even if a ChatGPT turn reaches its duration limit.
Operations
sudo systemctl status chatgpt-vps-mcp nginx
sudo journalctl -u chatgpt-vps-mcp -n 100 --no-pager
curl https://mcp.example.com/health
sudo nginx -t
sudo certbot renew --dry-runAn unauthenticated MCP request should return 401:
curl -i -X POST \
-H 'Content-Type: application/json' \
--data '{}' \
https://mcp.example.com/mcpUpdating
The installer preserves existing OAuth secrets and the owner password file:
cd chatgpt-vps-mcp
git pull --ff-only
sudo bash scripts/install.sh --domain mcp.example.com --email admin@example.com --enable-rootOmit --enable-root only if you intend to disable and remove root command access.
Security model
The Node process binds only to loopback.
HTTPS terminates at Nginx.
MCP requires a valid Bearer access token.
OAuth authorization requires the generated owner password, stored as an scrypt hash in the service environment.
Authorization codes expire after five minutes and require PKCE S256.
Access tokens expire after one hour; refresh tokens expire after 30 days.
Redirect URIs must be HTTPS, except HTTP loopback callbacks.
Authorization attempts and client registrations have in-memory rate limits.
Workspace paths reject absolute paths, traversal, and symbolic-link segments.
Root mode uses a narrowly named service account and an explicit sudoers file. It is still unrestricted root access by design.
This project intentionally does not pretend that model prompts are a security boundary. OAuth protects who can connect; it cannot make arbitrary root command execution intrinsically safe.
Development
npm ci
npm run check
npm audit --omit=devRead AGENTS.md before agent-assisted changes.
License
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
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI models to securely control remote Linux servers via SSH for command execution, file operations, and system monitoring, plus browser automation capabilities for web navigation, form interaction, and screenshot capture.
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to securely manage Virtual Private Servers via SSH, with features including command execution, file operations, system monitoring, and service management.MIT
- AlicenseNot gradedqualityCmaintenanceExposes a Linux host with shell, Python, and filesystem tools as MCP tools over HTTPS, enabling AI agents to execute commands and manage files remotely.11MIT
- FlicenseAqualityDmaintenanceGives AI assistants full control over a VPS via SSH, enabling command execution, file management, service control, Docker and firewall management.95
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
StremAI MCP: shared memory for AI coding agents. Connected agents can recall. OAuth + local stdio.
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/yxxrn/chatgpt-vps-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server