# Porter

> Porter finds a public API, checks whether Guild can take it, and gives an agent one command that builds a private Guild draft on the user's machine.

Porter (https://porter-guild.dev) searches [integrations.sh](https://integrations.sh). It supports OpenAPI, GraphQL, and MCP surfaces with API-key, no-auth, and OAuth 2.0 sign-in. It is an unofficial community project, not Guild.ai.

The draft is built on the user's machine with their logged-in `guild` CLI. Porter never receives the Guild token, never asks for a provider API key or OAuth client secret, and publishes only when the user passes `--publish`.

## Start here

- [Agent guide](https://porter-guild.dev/agent-guide): How to install the skill, connect MCP, and read each run outcome.
- [Skill](https://porter-guild.dev/skill.md): The SKILL.md an agent should follow. Copy this once, then ask for things like "add Linear to Guild".
- [Docs](https://porter-guild.dev/docs): What Porter does, where to click, and what it never touches.
- [Home](https://porter-guild.dev/): Search for an API by name.

## Give Porter to an agent

- [MCP server](https://mcp.porter-guild.dev/mcp): Streamable HTTP on the Porter API. Read-only and needs no login. Tools: `search_apis`, `resolve_api`, `list_operations`, `get_apply_command`, `check_integration_drift`, `get_porter_skill`, plus catalog tools.
- Cursor (`~/.cursor/mcp.json`): `{"mcpServers":{"porter":{"url":"https://mcp.porter-guild.dev/mcp"}}}`
- Claude Code: `claude mcp add --transport http porter https://mcp.porter-guild.dev/mcp`

## How a run goes

1. Find the API with the MCP tool `search_apis`, or `GET https://porter-guild.dev/v1/search?q=<name>`. Each result has a `domain`, `surfaceSlug`, and `kind` (`openapi`, `graphql`, or `mcp`).
2. Check it with `resolve_api`, or `GET https://porter-guild.dev/v1/resolve?domain=<domain>&surface=<surfaceSlug>&kind=<kind>`. If `supported` is false, stop and tell the user the `reason`. If `guildViolations` is not empty, tell the user what Guild would still reject.
3. Save `https://porter-guild.dev/v1/apply.ts` as `porter-apply.mjs` and read it, then build the draft with `node porter-apply.mjs <domain> <surfaceSlug> [--kind=mcp|graphql]` using the user's `guild` CLI. Add `--dry-run` to print the commands without creating anything.
4. Read the final `porter-result:` JSON line. `built` means the private draft exists; `published` (only with `--publish`) means it is live. `needs-subset`, `needs-oauth-app`, and `needs-connection` exit 2 and wait for the user. `failed` exits 1.
5. Later, `node porter-apply.mjs --check` reports which built integrations their API has moved on from, and the command that updates each. It only reads.

## Rules

- Publish only when the user asks for it, and then only by adding `--publish` to the script. Without it, the run stops at a private draft and the user publishes.
- Never connect a provider credential, and never ask for an API key or OAuth client secret in chat or put one on a command line.
- Never read, print, or send the Guild token. Porter never needs it.
- Read https://porter-guild.dev/v1/apply.ts before running it the first time.

## HTTP

- [Search](https://porter-guild.dev/v1/search?q=): Live integrations.sh results. Each row has a domain, surface slug, and kind.
- [Resolve](https://porter-guild.dev/v1/resolve?domain=&surface=&kind=): Recipe or rejection reason. Add `auth=oauth` to prefer OAuth when a key is also offered.
- [OpenAPI](https://porter-guild.dev/v1/openapi?domain=&surface=&kind=): The normalized OpenAPI document Guild imports.
- [Prompt](https://porter-guild.dev/v1/prompt?domain=&surface=&kind=): A plain-text agent prompt for one API.
- [Apply script](https://porter-guild.dev/v1/apply.ts): The script that builds the draft. Save it, read it, then run it with `node`.
- [Package](https://porter-guild.dev/porter.tgz): The same script as an npx package, for npm 10 and older. npm 11 refuses packages from a URL (`EALLOWREMOTE`).

## Optional

- [Guild integration docs](https://docs.guild.ai/integrations/overview): Guild's own integration overview.
- [Create an integration](https://docs.guild.ai/services/create-an-integration): Guild's create flow.
