> ## Documentation Index
> Fetch the complete documentation index at: https://docs.passform.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Connect AI tools to Passform using the Model Context Protocol

Passform exposes an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server, letting AI tools like Claude, Cursor, and Windsurf interact directly with your passes and templates.

**MCP server URL:** `https://api.passform.io/mcp`

## Authentication

The MCP server supports two authentication methods.

<Tabs>
  <Tab title="OAuth 2.0 (recommended)">
    When you add the server, your MCP client will open a browser window. Sign in with your Passform account and you're done — no keys or config required.
  </Tab>

  <Tab title="API key">
    Pass your API key as a Bearer token in the `Authorization` header. Get your key from [app.passform.io](https://app.passform.io).

    ```
    Authorization: Bearer YOUR_API_KEY
    ```
  </Tab>
</Tabs>

## Connect to Claude Desktop

<Tabs>
  <Tab title="OAuth 2.0 (recommended)">
    Add Passform to `claude_desktop_config.json` without any credentials — Claude Desktop handles OAuth automatically on first use:

    ```json theme={null}
    {
      "mcpServers": {
        "passform": {
          "type": "http",
          "url": "https://api.passform.io/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="API key">
    Add Passform to `claude_desktop_config.json` with your API key:

    ```json theme={null}
    {
      "mcpServers": {
        "passform": {
          "type": "http",
          "url": "https://api.passform.io/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

On macOS the config file is at `~/Library/Application Support/Claude/claude_desktop_config.json`.

## Connect to Claude Code

<Tabs>
  <Tab title="OAuth 2.0 (recommended)">
    Run once — Claude Code detects OAuth automatically and opens a browser login:

    ```bash theme={null}
    claude mcp add --transport http passform https://api.passform.io/mcp
    ```
  </Tab>

  <Tab title="API key">
    Pass your key inline with `--header`:

    ```bash theme={null}
    claude mcp add --transport http passform https://api.passform.io/mcp \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```
  </Tab>
</Tabs>

## Connect to Cursor or Windsurf

Add the MCP server in your editor's MCP settings:

| Field       | Value                                |
| ----------- | ------------------------------------ |
| Transport   | HTTP / Streamable HTTP               |
| URL         | `https://api.passform.io/mcp`        |
| Auth header | `Authorization: Bearer YOUR_API_KEY` |

## Available tools

### Accounts

| Tool           | Description                                             |
| -------------- | ------------------------------------------------------- |
| `listAccounts` | List all accounts you have access to, with full details |

### Templates

| Tool             | Description                                          |
| ---------------- | ---------------------------------------------------- |
| `listTemplates`  | List all templates for an account, with full details |
| `getTemplate`    | Get a single template by ID                          |
| `upsertTemplate` | Create or update a template                          |

### Passes

| Tool                 | Description                                                   |
| -------------------- | ------------------------------------------------------------- |
| `createPass`         | Create a pass with a random ID                                |
| `listPasses`         | List passes for a template, with pagination and sorting       |
| `getPass`            | Get a specific pass                                           |
| `upsertPass`         | Create or update a pass with a specific ID                    |
| `notifyPass`         | Send a push notification to a pass                            |
| `updatePassMetadata` | Update pass metadata without triggering a wallet notification |
