Portless®← Home

Guides

Connect MCP clients

Point Cursor, VS Code, Claude Code and other MCP clients at the gateway.

The gateway is itself an MCP server. Connect a client once and it gets every enabled tool from all your remote servers, with the right credentials added and every call logged.

POST/api/v1/mcp

How it behaves

Client setup

Replace pl_live_… with your key. Configs that hold a key are secrets: don't commit them.

Cursor

In ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

mcp.json
{
  "mcpServers": {
    "portless": {
      "url": "https://www.initpbj.dev/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer pl_live_…",
        "X-Portless-Agent": "Cursor"
      }
    }
  }
}

VS Code

In .vscode/mcp.json. The inputs block makes VS Code prompt for the key and store it securely instead of in the file:

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "portless-key",
      "description": "Portless API key",
      "password": true
    }
  ],
  "servers": {
    "portless": {
      "type": "http",
      "url": "https://www.initpbj.dev/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${input:portless-key}"
      }
    }
  }
}

Claude Code

Terminal
claude mcp add --transport http portless https://www.initpbj.dev/api/v1/mcp \
  --header "Authorization: Bearer $PORTLESS_API_KEY"

Other clients

Any client that supports remote Streamable HTTP servers with custom headers works with the URL and header above. For clients that only launch local (stdio) servers, bridge with the mcp-remote package:

stdio bridge config
{
  "mcpServers": {
    "portless": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://www.initpbj.dev/api/v1/mcp",
        "--header",
        "Authorization:${PORTLESS_AUTH}"
      ],
      "env": {
        "PORTLESS_AUTH": "Bearer pl_live_…"
      }
    }
  }
}

Test the connection

List the tools the gateway exposes with a raw JSON-RPC request:

curl
curl https://www.initpbj.dev/api/v1/mcp \
  -H "Authorization: Bearer $PORTLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Don't see a tool?

Check that it's turned on in Dashboard → Tools, that its server uses http or sse, and that the server is reachable (its status in Servers isn't offline). New tools on a server appear after a sync.
Status · Building

Coming soon

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