Portless®← Home

Reference

Limits & self-hosting

Timeouts, supported transports, network rules and environment variables.

Timeouts

StepLimit
Connecting to an MCP server10 seconds
One upstream request (call, tool list)30 seconds
Listing tools for the MCP endpoint, per server8 seconds (slow servers are skipped)
Whole gateway request60 seconds

Set your HTTP client's timeout a little above 60 seconds so the gateway's own error reaches you first.

Transports

Network rules

Self-hosting

Portless is open source. To run your own gateway (a Next.js app with Postgres), set these environment variables:

VariablePurpose
DATABASE_URLPostgres connection string (Neon works out of the box).
GITHUB_CLIENT_IDGitHub OAuth app, for dashboard sign-in.
GITHUB_CLIENT_SECRETGitHub OAuth app secret.
NEXT_PUBLIC_SITE_URLPublic origin, e.g. https://gateway.example.com.
PORTLESS_ENCRYPTION_KEY32 random bytes (base64) for server credentials.
PORTLESS_ALLOW_PRIVATE_UPSTREAMSSet to 1 to allow servers on private networks.
Generate an encryption key
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
Apply database migrations
npm run db:migrate

Keep the encryption key stable

Use the same PORTLESS_ENCRYPTION_KEY everywhere that shares a database. If it changes, saved server credentials can't be decrypted and have to be entered again.

Only allow private servers on a private gateway

PORTLESS_ALLOW_PRIVATE_UPSTREAMS=1 lets anyone with a workspace point the gateway at your internal network. Use it only when every user is trusted.
Status · Building

Coming soon

We're putting the finishing touches on Portless®. Follow along on X to hear the moment it's ready.