Vps-mcp
Manages Git repositories, worktrees, branches, and diffs, providing isolated workspaces for portal chats.
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., "@Vps-mcpBind to my portal chat and review the uncommitted changes in the agent branch"
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.
Vps-mcp Agent Portal
A self-hosted Codex-style coding control plane for a VPS. It combines a clean browser portal with an MCP gateway so an individual ChatGPT Web conversation can bind to an individual project chat, work in an isolated Git worktree, stream observable activity, ask structured questions, receive files/images, and mirror its final answer back into the portal.
What is implemented
Workspaces mapped to Git repositories on the VPS.
Independent chats with Plan / Build / Review modes.
One-time
bind_...codes that bind one MCP session to one portal chat.One active agent lease per chat; different chats can run in parallel.
Build-mode Git worktree +
agent/<chat-id>branch isolation.Full canonical chat history with context-pressure compaction only when needed.
Search/retrieval of older raw messages after compaction.
Structured portal questions: text, confirm, single-choice, multi-choice.
Live durable SSE activity: status, commands, stdout/stderr, file changes, questions, completion.
Image/file attachments, content-addressed storage, MIME sniffing, dedupe and MCP delivery.
Changes/diff and rolling run-summary surfaces in the web UI.
OAuth authorization-code + PKCE for MCP; access tokens are stored hashed in Postgres.
Browser auth with Argon2, HttpOnly/Secure/SameSite cookies, CSRF and rate limiting.
Legacy unrestricted
terminalremains available when the MCP session is not portal-bound. Once bound, it is disabled and the agent must usechat_terminal, so chat mode policy is applied.Unit, integration, official MCP-client, public smoke, restart and Playwright browser tests.
Related MCP server: codex-web-bridge
Important ChatGPT Web limitation
MCP does not provide a mechanism for a server to create a new ChatGPT Web model turn. A message submitted in the portal is durably queued and returned by chat_sync, but it cannot wake an idle ChatGPT tab by itself.
For truly unattended portal-initiated runs, the planned V2 AgentDriver/OpenAI Responses API worker is the right path. The existing architecture deliberately keeps that future driver separate from the chat/workspace/event model.
Context behavior
The portal stores the complete canonical thread permanently.
While the thread fits the configured budget,
chat_connecthydrates the entire chat verbatim. A saved rolling summary is ignored.Near context pressure, an older checkpoint summary replaces only the messages it covers; every message after that checkpoint stays verbatim.
chat_historyandchat_history_searchcan retrieve compacted-out raw history at any time.chat_syncis cursor-based and returns only new messages/events/answers after connection.
This matches the coding-agent pattern discussed for Codex/OpenCode: full detail first, compaction only when the context window requires it.
MCP tools
terminal— broad VPS terminal when the MCP session is not bound to a portal chat.chat_connect(binding_code)chat_sync()chat_activity(stage, message)chat_ask(...)chat_terminal(command, cwd?, timeout?)chat_history(...)chat_history_search(query, limit?)chat_compact(...)chat_attachment(attachment_id)chat_complete(answer, summary, structured?, compacted_through_seq?)chat_disconnect()
Repository layout
apps/
api/ Fastify control API + auth + SSE + portal static hosting
mcp/ Streamable HTTP MCP/OAuth gateway + chat agent service
portal/ React/Vite Codex-style UI
packages/
core/ IDs, modes, context policy, redaction
db/ PostgreSQL migration/repository layer
workspace/ Git repository/worktree/diff lifecycle
attachments/content-addressed upload storage
tests/
e2e/ Playwright browser happy path
smoke/ public HTTPS portal → OAuth → MCP end-to-end smoke
docs/
ARCHITECTURE.md
deploy/
systemd/
traefik/
TODO.md canonical implementation trackerDevelopment
Requirements: Node 22+, Docker, Git.
npm install
docker compose up -d postgresOn a fresh Docker volume, create/use a test database and set TEST_DATABASE_URL, then run:
TEST_DATABASE_URL=postgresql://... npm test
npm run typecheck
npm run build
npm audit --omit=dev --audit-level=highBrowser E2E:
E2E_BASE_URL=https://your-host \
E2E_ADMIN_PASSWORD='...' \
npm run e2ePublic smoke:
SMOKE_BASE_URL=https://your-host \
SMOKE_ADMIN_PASSWORD='...' \
SMOKE_OAUTH_PASSWORD='...' \
npm run smokeThe smoke runner creates a temporary Git repository, exercises Plan/Q&A/attachments/Build/worktree/completion, then deletes its chat/workspace/worktree.
Deployment
The production deployment on the test VPS uses separate systemd services and the existing Coolify Traefik instance. Templates are under deploy/.
The original /opt/terminal-mcp is intentionally kept as a rollback/control MCP until the new connector is added in ChatGPT and explicitly cut over.
Security notes
Browser responses never include DB credentials, MCP OAuth password, executor credentials, or attachment storage paths.
MCP access/session/binding tokens are stored hashed where persistence is required.
Observable activity is secret-redacted; private model chain-of-thought is never sent to the portal.
Plan/Review shell commands use a conservative inspection allowlist and reject redirections/subshells/mutating command families.
Uploaded files are not auto-executed.
The current disposable-VPS deployment runs the control API as root so it can validate arbitrary host repositories and clean Git worktrees; it exposes no generic shell route. For a multi-tenant/non-disposable server, split repository lifecycle into a narrow privileged helper and run the browser-facing API unprivileged.
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
- Alicense-qualityBmaintenanceEnables persistent remote VPS collaboration with MCP tools, live dashboard, and autonomous AI agent for code execution, memory, and task automation.602GPL 3.0
- Alicense-qualityCmaintenanceLocal MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.MIT
- Alicense-qualityAmaintenanceEnables ChatGPT to inspect and edit local projects through a secure MCP interface, offering workspace management, file operations, git integration, and safe command execution.3MIT
- Flicense-qualityBmaintenanceA self-hosted MCP gateway that gives ChatGPT Web real command execution, file patching, and workspace management on a VPS you control.2
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
StremAI MCP: shared memory for AI coding agents. Connected agents can recall. OAuth + local stdio.
The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.
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/Enchanted-Dev-stack/Vps-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server