Quickstart

Connect Claude, ChatGPT, Cursor, or Codex to live PostgreSQL, MySQL, JDBC warehouses, remote MCP servers, or HTTPS APIs without sharing passwords. Or proxy an HTTPS API from a script with curl.

Prerequisites

  • A swarmvia account (sign up at swarmvia.com)
  • A database, remote MCP server, or upstream API URL you are allowed to call

Path 1: Connect an AI agent (2 minutes)

  1. Open the dashboard and select Sources → New source to add a database, JDBC warehouse, MCP server, or HTTPS API.
  2. Add the swarmvia MCP server to your AI client — there is no token to paste:
claude mcp add --transport http swarmvia https://swarmvia.com/mcp

For Cursor, VS Code, Codex, Claude.ai, or ChatGPT, see Agents. 3. On the first call, sign in on the browser approval screen and choose which sources the agent may use. 4. Ask your agent to list the sources you granted and query one. Every call appears under Sessions and the source's Logs.

Path 2: Call an HTTPS API with curl

Create a source

  1. Open the dashboard and select Sources → New source.
  2. Choose a subdomain (this becomes ‹subdomain›.swarmvia.cloud).
  3. Add at least one origin (the upstream base URL).
  4. Pick Pass-through if your client already authenticates to the upstream, or Managed if swarmvia should attach credentials for you.
  5. Save. The source goes live within a few seconds.

Create a test key

  1. Open the source → Access.
  2. Select Create test key, name it, and pick how long it lasts: 1 hour (the default) or 24 hours.
  3. Copy the key (sv_at_…). It is shown once.

A test key is for trying things out. For a script or integration that runs on its own, mint keys with a Control API token instead; see Refresh access tokens before they expire.

Send a request

Replace the placeholders and call your source's endpoint. The path after the host is forwarded to the selected origin.

export ACCESS_KEY='sv_at_…'
export SOURCE_HOST='https://your-source.swarmvia.cloud'

curl -sS "$SOURCE_HOST/your/api/path" \
  -H "X-Swarmvia-Key: $ACCESS_KEY"

On a managed source you may also send Authorization: Bearer $ACCESS_KEY. On a pass-through source, keep the access key in X-Swarmvia-Key and put the upstream credential in Authorization (or whatever the upstream expects).

If the source has multiple origins, pick one explicitly:

curl -sS "$SOURCE_HOST/your/api/path" \
  -H "X-Swarmvia-Key: $ACCESS_KEY" \
  -H "X-Swarmvia-Origin: https://api.example.com"

Confirm admission

A successful response includes headers such as x-swarmvia-remaining-slots and x-swarmvia-effective-limit. Open the source's Logs page to see the request in access logs, or Metrics for admit/queue/reject proof (not the same as Billing allowance).

Next steps