MCP Secure Relay
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., "@MCP Secure RelayRun the backup command and tell me whether it succeeded."
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.
MCP Secure Relay for Vercel
A separate Vercel project that accepts a standard authenticated MCP connection and relays only three controlled operations to a lightweight remote executable.
MCP client -- HTTPS --> Vercel /api/mcp -- encrypted HTTP or HTTPS --> relay-agent -- local execution中文文档见 README.zh-CN.md.
The Vercel-to-agent body is a private protocol: AES-256-GCM encryption plus HMAC-SHA256 authentication, separate request/response keys derived from RELAY_SHARED_SECRET, 60-second timestamp validation, and nonce replay rejection. The remote hop does not need an SSL certificate. Its HTTP headers, endpoint address, timing, and payload size remain visible to the network, so use a private tunnel/firewall where possible. This is application-layer protection, not a replacement for network isolation.
Security model
MCP_API_KEYSis mandatory. The relay rejects every MCP request if it is unset.The agent has a separate 32-byte shared secret and rejects tampered, stale, or replayed envelopes.
execute_commandaccepts only a remotecommand_id. Each ID maps to an exact executable and fixed argument list in the agent config. Shells (sh,bash) are prohibited.read_fileandwrite_fileonly accept relative paths belowroot_dir. Absolute paths,.., symbolic links, non-regular files, and missing parent directories are rejected.Writes are disabled by default and use a same-directory temporary file followed by atomic rename when enabled.
The agent has independent read/write/output/timeout limits. Vercel limits tool responses again.
Every attempted operation is written to Redis before dispatch and completed afterward. It stores client key fingerprint, operation, target, byte counts, timing, status, and error code. It never stores API keys, file contents, or command output.
Audit storage is required for execution.
REDIS_URLtakes precedence and supports native Redis/Redis Cloudrediss://connections; Upstash REST remains available as a fallback. If the selected backend is unavailable before dispatch, no operation is sent to the remote server.
Related MCP server: machine-bridge-mcp
Deploy Vercel
Create a new Vercel project from this directory. Do not import or modify the existing MCP project.
Add every variable in
.env.exampleunder Project Settings > Environment Variables. Generate independent values:
openssl rand -base64 48 # MCP_API_KEYS and AUDIT_API_KEY
openssl rand -base64 32 # RELAY_SHARED_SECRET and agent shared_secretPrefer Redis Cloud by setting its
REDIS_URL=rediss://...connection string; the project connects through the native TLS Redis protocol. Alternatively, omitREDIS_URLand configure Upstash Redis REST withUPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN.Deploy with
vercel --prod, then setNEXT_PUBLIC_APP_URLto the resulting HTTPS URL and redeploy.
The MCP endpoint is https://YOUR_PROJECT.vercel.app/api/mcp. Configure a standard Streamable HTTP MCP client with Authorization: Bearer YOUR_MCP_KEY.
{
"mcpServers": {
"secure-relay": {
"url": "https://YOUR_PROJECT.vercel.app/api/mcp",
"headers": { "Authorization": "Bearer YOUR_MCP_KEY" }
}
}
}Build and run the remote executable
The agent uses only the Go standard library and compiles to one static binary. It is not an MCP client and does not install any agent tooling on the remote server.
cd agent
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o relay-agent .
install -m 700 relay-agent /usr/local/bin/relay-agent
install -m 600 relay-agent.example.json /etc/relay-agent.json
# Edit /etc/relay-agent.json: shared_secret, root_dir, and fixed command profiles.
/usr/local/bin/relay-agent -config /etc/relay-agent.jsonThe sample binds 127.0.0.1:8787; keep that default and expose it through an existing private tunnel or reverse proxy. If Vercel must call the agent directly, REMOTE_AGENT_URL must be reachable from the public Internet and the host firewall should restrict access where possible. The agent authenticates every request cryptographically, even when reachable through plain HTTP.
To permit controlled writes, set allow_file_write to true only after setting a narrow root_dir. The agent will not create missing directories.
Audit access
Retrieve the latest records using the separate audit key:
curl 'https://YOUR_PROJECT.vercel.app/api/audit?limit=100' \
-H 'Authorization: Bearer YOUR_AUDIT_API_KEY'Records expire after 14 days. Redis also removes stale index entries on each new audit write.
Verification
npm install
npm run typecheck
npm run build
cd agent && go test ./...Before production use, test denied command IDs, ../ paths, symlink paths, oversize files, disabled writes, expired envelopes, and Redis unavailability. Run the agent under a dedicated unprivileged OS account with a minimal root_dir; the project cannot safely compensate for an over-permissive operating-system account.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
One PAT, any MCP agent: Vercel, GitHub, Cloudflare, Supabase, GCP — unified dev infra gateway.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceRemote execution layer for agentic systems exposing 64 production tools via MCP for file, network, system, text, git, crypto, and monitoring operations.MIT
- AlicenseNot gradedqualityAmaintenanceEnables remote MCP clients to access local filesystem and shell commands by deploying a Cloudflare Worker relay and a local daemon, providing tools like read/write files, exec commands, git status, etc.8031MIT
- FlicenseNot gradedqualityCmaintenanceEnables secure remote access to your computer's filesystem and terminal through MCP, allowing AI assistants to manage files, run commands, and automate tasks from anywhere via a hosted relay.14-
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to safely access user-local filesystems, apply validated patches, inspect git state, and run persistent jobs on outbound-connected local runners through a stateless Cloudflare control plane.-
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/jinyinghua/mcp-secure-relay-vercel'
If you have feedback or need assistance with the MCP directory API, please join our Discord server