codex-remote-exec
Click on "Deploy 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., "@codex-remote-execlist running processes on my Windows device"
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.
Codex Remote Exec
Windows-first remote execution fabric for Codex.
Codex stays the brain. This project gives it controlled remote hands: an MCP
server exposes tools such as run_powershell, read_file, list_processes,
and screenshot; a relay forwards those jobs to an enrolled Windows Agent; the
agent executes the job and streams the result back for Codex to decide the next
step.
What It Builds
Codex -> MCP server -> public/LAN relay -> Windows Agent -> PowerShell/CMD/files/process/screenshotapps/mcp-server: stdio MCP server for Codex.apps/relay: Fastify HTTP API + WebSocket relay + SQLite audit store.apps/windows-agent: .NET 8 Windows endpoint agent.packages/protocol: shared TypeScript protocol schemas.
The relay supports both public deployment and LAN deployment. In both modes the Windows Agent makes an outbound WebSocket connection, so the Windows machine does not need an inbound public port.
Related MCP server: win-mcp-server
Security Boundary
This is for devices you own or are explicitly authorized to operate. It is not a hidden agent, evasion tool, or persistence mechanism.
The MVP is intentionally lab-aggressive: once a device is paired and the MCP server is authenticated, Codex can run arbitrary PowerShell on that device. The guardrails are pairing, device tokens, relay auth, job expiry, and durable audit logs.
Quickstart
Use Node.js 24+ and pnpm 11+ for the TypeScript services. Use .NET 8 SDK on Windows for the agent.
1. Start The Relay
cp .env.example .env
# edit RELAY_ADMIN_TOKEN and MCP_AUTH_TOKEN to the same long random value
pnpm install
pnpm build
pnpm dev:relayFor a VPS or public host:
docker compose up --build -d2. Create A Pairing Code
curl -X POST http://localhost:8787/pairing-codes \
-H "Authorization: Bearer $RELAY_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expiresInSeconds":300}'3. Enroll A Windows Machine
On Windows:
dotnet publish .\apps\windows-agent\src\CodexRemoteExec.Agent\CodexRemoteExec.Agent.csproj -c Release -r win-x64 --self-contained false
.\apps\windows-agent\src\CodexRemoteExec.Agent\bin\Release\net8.0-windows\win-x64\publish\agent.exe enroll --relay http://YOUR_RELAY:8787 --pairing-code ABC12345
.\apps\windows-agent\src\CodexRemoteExec.Agent\bin\Release\net8.0-windows\win-x64\publish\agent.exe run4. Connect Codex To The MCP Server
Build locally:
pnpm --filter @codex-remote-exec/mcp-server buildAdd an MCP server entry in your Codex config:
{
"mcpServers": {
"codex-remote-exec": {
"command": "node",
"args": ["/absolute/path/to/codex-remote-exec/apps/mcp-server/dist/index.js"],
"env": {
"RELAY_URL": "http://YOUR_RELAY:8787",
"MCP_AUTH_TOKEN": "same-token-as-relay"
}
}
}
}Codex can then call:
list_devices()
run_powershell(device_id, "ipconfig", 30)
get_system_info(device_id)
read_file(device_id, "C:\\Windows\\System32\\drivers\\etc\\hosts")MVP Tool Surface
list_devicesrun_powershellrun_cmdget_system_inforead_file/write_fileupload_file/download_filelist_processesstart_processkill_processscreenshotcreate_job/wait_job/cancel_job
Development
pnpm install
pnpm check
pnpm test
pnpm buildWindows Agent tests run on Windows:
dotnet test .\apps\windows-agent\CodexRemoteExec.Agent.slnStatus
This is a working MVP skeleton, not a hardened fleet-management product. The next serious additions are Windows Service install/uninstall, signed job policies, per-tool allowlists, remote terminal streaming, GUI automation, and artifact chunking for large files.
This server cannot be deployed
Maintenance
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Egnyte's remote MCP server for secure AI access, search, upload and file management in your account.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables remote execution of commands, file operations, screenshots, and clipboard access on Windows machines through MCP tools.1MIT
- AlicenseNot gradedqualityAmaintenanceA Windows MCP server for remote administration over WinRM/NTLM, enabling management of files, services, registry, events, certificates, processes, network, and more on AD-joined Windows hosts from MCP clients.1MIT
- AlicenseNot gradedqualityAmaintenanceA Windows-first MCP server that maintains persistent stateful SSH sessions to Linux servers, enabling Codex to run commands, manage files, and use sudo without exposing credentials.1MIT
- FlicenseBqualityBmaintenanceEnables AI clients to execute Windows commands, manage files, query system information, and perform code checks via MCP protocol.241-