# SWG bar public agent interfaces

The documentation services read published website content. They do not inspect a Mac, change network settings, manage licenses, or perform purchases. A separate ACP cart service saves license selections for buyer review. The released Mac app includes local HTTPS inspection detection, per-domain SWG bypass, and desktop CLI and local stdio MCP controls (`swgbar` / `swgbar mcp`); those desktop features run locally on macOS and are not exposed by these public website endpoints.

No SWG bar account, registration or login is required to browse the website, use these public services, download the installer or start a purchase. Public tools require no credentials. Purchases use guest Stripe checkout; order and license data remain protected. See [auth.md](https://swgbar.com/auth.md).

## Search for Agents (`/.well-known/search`)

Query published documentation directly over HTTP without pre-configuring MCP or crawling individual pages:

```sh
curl --get "https://swgbar.com/.well-known/search" \
  --data-urlencode "q=How do I bypass Zscaler SSL inspection on Mac?"
```

The endpoint also supports the HTTP `QUERY` method (RFC 10008) with a `text/plain` or `application/json` (`{"q":"..."}`) body and returns relevant Markdown excerpts with source URLs and relevance scores. It is advertised automatically in HTML `<head>` metadata and static Markdown YAML front matter.

## Public tools

- `search_documentation`: pass `query` (1–200 characters), optional `locale` and `limit` (1–5). Returns ranked excerpts and source URLs.
- `get_documentation`: pass a canonical page `path` returned by search, such as `/en/install/`. Only published pages are readable.
- `get_latest_release`: no arguments. Returns the current installer manifest, including download URL and SHA-256 checksum.
- `get_product_catalog`: optional `locale`. Returns Personal and Team prices in USD minor units, supported quantities, policies and browser purchase links.

The supported website locales are `en`, `de`, `es`, `fr`, `it`, `ja`, `ko`, `pt-BR`, `ru`, `zh-CN`, `zh-TW` and `id`. English is the default. Document indexes are generated from the same published Markdown as the website; unpublished drafts and checkout pages are excluded.

## MCP

Connect a remote MCP client to `https://swgbar.com/mcp` using Streamable HTTP. No credentials are required. The server supports current MCP and stateless legacy clients through the official SDK. Read the [server card](https://swgbar.com/mcp/server-card) for discovery and use the protocol to list and call tools. A [legacy discovery card](https://swgbar.com/.well-known/mcp/server-card.json) is retained for clients using the earlier well-known convention.

## HTTP and WebMCP

Send a JSON POST to `https://swgbar.com/api/agent/tools` with `name` and `arguments`, for example:

```json
{"name":"get_product_catalog","arguments":{"locale":"zh-CN"}}
```

The same four read-only tools are registered on published pages when the browser implements `document.modelContext`. Browsers without WebMCP retain the ordinary website experience. See the [OpenAPI document](https://swgbar.com/agent-api.openapi.json) and [tool schemas](https://swgbar.com/agent/tools.json).

## A2A

The [agent card](https://swgbar.com/.well-known/agent-card.json) advertises a stateless A2A 1.0 documentation search assistant. It accepts `SendMessage` at `https://swgbar.com/a2a` with `Content-Type: application/json` and `A2A-Version: 1.0`, and returns a direct Message with excerpts and links. It does not retain conversations, create tasks, stream responses, or use a language-model API.

```json
{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{"messageId":"example-1","role":"ROLE_USER","parts":[{"text":"How do I install SWG bar?"}]},"metadata":{"locale":"en"}}}
```

## Shopping permalinks

The [UCP profile](https://swgbar.com/.well-known/ucp) advertises the `dev.ucp.shopping.permalink` capability, version `2026-08-25`. Examples:

- [Select Personal](https://swgbar.com/buy/swgbar_personal:1)
- [Select Team, 10 licenses](https://swgbar.com/buy/swgbar_team:10?context/language=en)

`swgbar_personal` supports quantity 1; `swgbar_team` supports 5, 10 or 20 licenses. Raw and canonical base64url-encoded item identifiers resolve identically. Each request selects one supported plan, then returns a `303` redirect to that plan on the website. The buyer reviews the selection and explicitly opens the existing Stripe checkout. No order or payment is created by loading a link.

`context/language` selects a website locale. A `continue_to` value is accepted only for a supported locale's home path, where the selection can be applied. Other fields and parameters are removed; buyer information, payment credentials, discounts, redirects to other origins and mixed carts are not accepted. Unsupported selections go to the plan selector. Requests are limited to 2,048 URL characters and 32 query fields. Ambiguous duplicate fields fall back to the plan selector.

This profile advertises browser handoff only. It does not advertise UCP checkout, catalog REST or payment handlers. Public documentation remains free to access. Applicable taxes and discounts are calculated in the existing checkout; the website's current terms apply.

## ACP saved selections

The separate [ACP discovery document](https://swgbar.com/.well-known/acp.json) advertises only the `carts` service, version `2026-04-17`. Agents can create, retrieve, replace and cancel saved Personal or Team selections, with estimated USD totals and a shareable browser handoff link. See the [cart guide](https://swgbar.com/agent/carts.md) and [API schema](https://swgbar.com/agent-carts.openapi.json) for temporary cart credentials, supported quantities, request examples and limits. These credentials require no user account or login and are never needed for the four public tools above. ACP checkout and delegated payments, AP2, x402 and MPP are not advertised.

## Access and discovery

Read [auth.md](https://swgbar.com/auth.md) for the public/private boundary. Documentation API calls have an 8 KiB body limit; cart API calls have a 4 KiB limit. Existing Cloudflare access controls apply. The [AI catalog](https://swgbar.com/.well-known/ai-catalog.json), [API catalog](https://swgbar.com/.well-known/api-catalog) and [llms.txt](https://swgbar.com/llms.txt) describe the interfaces.
