Set up with AI

Copy the CLI commands or paste an AI prompt into Cursor, Copilot, or your assistant of choice.

Install and connect in two commands

$ curl -fsSL https://privateconnect.co/install.sh | bash
$ connect up

Try with your AI tool of choice

Copy this prompt to your AI code editor (Cursor, Copilot, etc.) to set up Private Connect automatically:

Set up Private Connect on this machine. Run these steps in order: 1. Install the CLI: curl -fsSL https://privateconnect.co/install.sh | bash 2. Authenticate: run "connect up" — this will open a browser window for login. Wait for me to complete it. 3. Scaffold the project config: run "connect dev --init" in my project directory. This creates a pconnect.yml pre-populated with my workspace's available services. 4. Connect to services: run "connect dev" to create local tunnels to every service in pconnect.yml. After step 4, each service is available at localhost on its configured port (e.g. staging-db on localhost:5432). Show me the connection details when done.

More examples

Copy any prompt below into Cursor, Copilot, or your AI assistant to get step-by-step instructions for that use case.

Expose local app and receive webhooks

Make your local app reachable via a public URL so Stripe, GitHub, etc. can send webhooks to it.

I have Private Connect installed and authenticated (via "connect up"). I want to expose my local web app so it can receive webhooks from Stripe. Create a file called pconnect.yml in my project root with this structure: expose: web: target: localhost:3000 public: true Then run "connect serve". The output will show a public URL like https://abc123.privateconnect.co — that's the webhook URL. Tell me the exact URL from the output so I can paste it into my Stripe webhook dashboard settings.

Access a staging database locally

Connect to your team's staging Postgres (or any database) from your local machine via Cursor.

I have Private Connect installed and authenticated (via "connect up"). My team has a staging Postgres database exposed as "staging-db" through Private Connect. Create or update pconnect.yml in my project root: services: - name: staging-db port: 5432 Then run "connect dev". Once it connects, the database is available at localhost:5432. Show me: 1. The psql connection command: psql -h localhost -p 5432 -U <user> -d <dbname> 2. A DATABASE_URL I can put in .env: postgres://<user>:<password>@localhost:5432/<dbname>

Share your environment with a teammate

Give a teammate access to the same services you're connected to, with one command each.

I have Private Connect running with services exposed. I want to share my environment with a teammate so they get the same services I have. Run "connect share" to generate a share code. Then tell me: 1. The share code from the output — I'll send this to my teammate 2. The command they need to run: connect join <the-code> 3. How to revoke the share later: connect share --revoke <the-code> The share expires after 24 hours by default. To set a different duration, use: connect share --expires 7d

MCP setup

Generates the MCP configuration for your editor and prints setup instructions.

connect mcp setup

Cursor

Add this to your .cursor/mcp.json in the project root, or configure it globally in Cursor settings.

{
  "mcpServers": {
    "private-connect": {
      "command": "connect",
      "args": ["mcp"],
      "env": {}
    }
  }
}

Restart Cursor after adding the config. The MCP server runs locally via the connect CLI.

Claude Desktop

Add this to your Claude Desktop MCP configuration file.

{
  "mcpServers": {
    "private-connect": {
      "command": "connect",
      "args": ["mcp"]
    }
  }
}

Config file location:

macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

What your AI can do

Once connected, your AI assistant has access to these MCP tools.

list_agents See all connected agents and their status
find_agents_by_capability Discover agents by what they can do (e.g., GPU, database)
get_connection_string Get DATABASE_URL, REDIS_URL, etc. for any service
send_agent_message Coordinate between distributed agents
register_capabilities Advertise what this agent can do to others

Example

Ask your AI about your infrastructure in natural language.

You
List my services
AI
I can see 4 services in your network:
staging-db (online, 45ms latency)
redis (online, 12ms latency)
user-api (offline)
payment-service (online, 89ms latency)
The user-api appears to be offline. Want me to check why?

Permission Broker

Control what AI agents can do in your workspace with a policy file. Every action is logged for audit.

# Initialize a policy file
connect broker init
# Run an AI tool through the broker
connect broker run -- opencode
# View the audit log
connect audit

The broker intercepts tool calls and enforces your policy before they execute. Blocked actions are logged with the reason.

TypeScript SDK

Build your own AI integrations programmatically.

import { PrivateConnect } from '@privateconnect/sdk';

const pc = new PrivateConnect({
  apiKey: process.env.PRIVATECONNECT_API_KEY
});

const db = await pc.connect('postgres-prod');
console.log(db.connectionString);

const gpuAgents = await pc.agents.findByCapability('gpu');
await pc.agents.sendMessage(gpuAgents[0].id, {
  action: 'train'
});
Manual install (all platforms) →