# Set up swarmvia

You are connecting this agent to swarmvia. It works in every client that can
add a remote MCP server: chat apps such as Claude and ChatGPT, and coding
tools such as Claude Code, Cursor, VS Code, and Codex.

Find the client you are running in below. If you can add the server
yourself, do it. If you cannot, because you are a chat app or have no shell
or file access, give the human the steps for their app one at a time and
wait while they do them. Do not tell them their client is unsupported. Ask
the human only when a browser must open or a choice is theirs.

## Add the MCP server

The URL is `https://swarmvia.com/mcp`. Streamable HTTP. There is no token
to paste.

### Claude (claude.ai, Claude Desktop, Cowork)

A connector is added in Claude's settings, not from a chat. Give the human
these steps:

1. Open **Customize → Connectors**. Choose **+ Add**, then
   **Add custom connector**.
2. Name it `swarmvia` and paste `https://swarmvia.com/mcp`. Choose
   **Continue**, keep the recommended sign-in and OAuth client options, and
   choose **Add**.
3. In a chat, choose **+** at the lower left, then **Connectors**, and turn
   **swarmvia** on.

On a Team or Enterprise plan, an owner adds it once under **Organization
settings → Connectors** (**Add → Custom → Web**). Each member then finds it
under **Customize → Connectors** and chooses **Connect**. The Free plan allows
one custom connector.

### ChatGPT

Custom MCP servers are added on chatgpt.com, not in the mobile app. Give the
human these steps:

1. Open **Plugins**, choose **+**, then **Add custom MCP server**.
2. Name it `swarmvia`, paste `https://swarmvia.com/mcp` under **Connection**,
   and choose OAuth for authentication. Check **I understand and want to
   continue**, then choose **Create as a plugin**.
3. In a chat, type `@` and pick **swarmvia**.

On a Business workspace, only owners, admins, and members with the **Create
plugins with MCPs** permission can add one. On Pro, ChatGPT only offers a
custom server's read and fetch tools.

### Claude Code

```bash
claude mcp add --transport http swarmvia https://swarmvia.com/mcp
```

### Cursor

Write `.cursor/mcp.json` (or `~/.cursor/mcp.json`) with a `swarmvia` server
under `mcpServers`, `type` `http`, and the URL. Or paste the URL under
**Cursor Settings → Tools & MCP**.

### VS Code

Write `.vscode/mcp.json` with `servers.swarmvia` (VS Code uses `servers`, not
`mcpServers`), `type` `http`, and the URL. Start the server from the CodeLens.

### Codex

```bash
codex mcp add swarmvia --url https://swarmvia.com/mcp
```

### Any other client

Add a remote MCP server (some apps call it a custom connector or custom
integration) and paste the URL. Any client that speaks streamable HTTP MCP
and OAuth 2.1 works. These apps rename their menus from time to time: if a
step above does not match what the human sees, look for those words in the
app's settings.

## Sign in

The first tool call, or adding the connector, opens a browser. The human
approves which sources you may use. There is no token to copy back.

If tools do not appear, restart this client or start a new chat, then wait.

## After the tools appear

1. List the sources the human granted.
2. Reuse one if it fits. Do not create a source unless they asked and the
   grant allows it.
3. Before a task, call `start_session` with its purpose in one sentence.
   Pass the `session_id` it returns to `start_source_session` and the other
   source tools, so the human sees every call of the task together.
4. For a database source, read the schema with `source_schema` and query it
   with `source_query`. For an MCP server source, find its tools with
   `source_list_tools`, then run a tool marked read-only with
   `source_call_read_tool` and any other with `source_call_tool`. For an API
   source, start a source session and call the source's endpoint, not the
   origin. If you cannot send HTTP yourself (a chat app, or no shell), use
   `source_read_request` for reads and `source_request` for writes instead.
5. Reuse the session key until it expires. It expires on its own. Call
   `end_session` when the task is done.
6. If the human already has remote MCP servers in this client, offer to move
   them into swarmvia as sources with the `migrate_mcp` prompt.

Client notes and the grant screen are in
[Agents](https://swarmvia.com/docs/agents.md).
