Reference
Limits & self-hosting
Timeouts, supported transports, network rules and environment variables.
Timeouts
| Step | Limit |
|---|---|
| Connecting to an MCP server | 10 seconds |
| One upstream request (call, tool list) | 30 seconds |
| Listing tools for the MCP endpoint, per server | 8 seconds (slow servers are skipped) |
| Whole gateway request | 60 seconds |
Set your HTTP client's timeout a little above 60 seconds so the gateway's own error reaches you first.
Transports
http(Streamable HTTP) andsse(the older HTTP + SSE transport) are supported.stdioservers are programs on your own machine. The hosted gateway can't start them and returns501 transport_not_supported; they don't appear on the MCP endpoint. You can still register them, to keep your inventory in one place.
Network rules
- Server URLs must be
http://orhttps://. - The hosted gateway refuses servers that resolve to private, local or link-local addresses (
localhost,10.x,192.168.x, cloud metadata, and so on) with422 endpoint_not_allowed. Expose the server on a public address, or self-host the gateway inside your network. - Redirects from MCP servers aren't followed. Register the final URL.
Self-hosting
Portless is open source. To run your own gateway (a Next.js app with Postgres), set these environment variables:
| Variable | Purpose |
|---|---|
DATABASE_URL | Postgres connection string (Neon works out of the box). |
GITHUB_CLIENT_ID | GitHub OAuth app, for dashboard sign-in. |
GITHUB_CLIENT_SECRET | GitHub OAuth app secret. |
NEXT_PUBLIC_SITE_URL | Public origin, e.g. https://gateway.example.com. |
PORTLESS_ENCRYPTION_KEY | 32 random bytes (base64) for server credentials. |
PORTLESS_ALLOW_PRIVATE_UPSTREAMS | Set 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:migrateKeep 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.