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

# Connect an MCP client

> Authenticate Presenton's MCP server and connect local, remote, or multiple self-hosted instances.

The built-in Model Context Protocol server lets a compatible AI client invoke Presenton presentation workflows. MCP is available in the self-hosted web deployment at `/mcp`; it is disabled in the Electron desktop app.

## Before you start

* Run Presenton with Docker, Compose, or another web deployment.
* Confirm browser generation works.
* Configure the primary administrator for any shared or remote instance.
* Confirm your client supports a remote HTTP MCP server and custom headers.

## 1. Start an authenticated instance

```bash theme={null}
docker run -it --name presenton \
  --publish 5001:80 \
  --env AUTH_USERNAME=admin \
  --env AUTH_PASSWORD=replace-with-a-long-password \
  --volume "./app_data:/app_data" \
  ghcr.io/presenton/presenton:v0.9.3-beta
```

Open [http://localhost:5001](http://localhost:5001), sign in, and create a small test presentation before continuing.

## 2. Generate an API key

Sign in as the primary administrator, open **Admin → API keys**, select **Generate key**, and copy the new `sk-presenton-...` value. The key is shown only when it is created.

<Warning>
  A Presenton API key grants API and MCP access. Do not commit it to a repository, paste it into support tickets, or expose it in screenshots.
</Warning>

## 3. Configure the MCP client

Configuration formats vary by client. The following examples use the structure from the Presenton README; adapt the outer file location and environment-variable syntax to your client.

### Example A: local authenticated server

```json theme={null}
{
  "mcpServers": {
    "presenton": {
      "url": "http://localhost:5001/mcp",
      "headers": {
        "Authorization": "Bearer sk-presenton-REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}
```

### Example B: remote HTTPS server

```json theme={null}
{
  "mcpServers": {
    "presenton-production": {
      "url": "https://presentations.example.com/mcp",
      "headers": {
        "Authorization": "Bearer sk-presenton-REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}
```

Use HTTPS for any connection that leaves the local machine. The reverse proxy must forward the `Authorization` header and support the connection behavior required by your MCP client.

### Example C: local server without configured auth

For an isolated development instance where authentication has not been configured, omit the header:

```json theme={null}
{
  "mcpServers": {
    "presenton-local": {
      "url": "http://localhost:5001/mcp"
    }
  }
}
```

Do not use an unauthenticated configuration on a publicly reachable instance.

### Example D: development and production instances

```json theme={null}
{
  "mcpServers": {
    "presenton-local": {
      "url": "http://localhost:5001/mcp",
      "headers": {
        "Authorization": "Bearer sk-presenton-LOCAL_KEY"
      }
    },
    "presenton-production": {
      "url": "https://presentations.example.com/mcp",
      "headers": {
        "Authorization": "Bearer sk-presenton-PRODUCTION_KEY"
      }
    }
  }
}
```

Give each instance a clear name so users know where uploaded documents and generated presentations will be stored.

## 4. Restart and verify the client

<Steps>
  <Step title="Reload MCP configuration">
    Restart the client or use its MCP reload action so it reads the new server entry.
  </Step>

  <Step title="Check discovery">
    Confirm the client reports the Presenton server as connected and displays its available presentation tools.
  </Step>

  <Step title="Run a small request">
    Ask the client to create a short two-slide presentation about a harmless test topic.
  </Step>

  <Step title="Review in Presenton">
    Open the returned edit URL, inspect the slides, and confirm the presentation appears in the correct instance.
  </Step>
</Steps>

## Key rotation and recovery

Revoke a key from **Admin → API keys** and generate a replacement whenever a client no longer needs access or a key may have been exposed. Credential override or administrator recovery invalidates existing browser sessions and API keys.

If a client starts returning unauthorized errors:

1. Confirm the Presenton URL and `/mcp` path.
2. Sign in as the primary administrator.
3. Confirm the key is still active under **Admin → API keys**, or generate a replacement.
4. Replace the old key in the client configuration.
5. Restart or reload the client.

## Secure a remote MCP deployment

* Use HTTPS and a trusted certificate.
* Keep Presenton authentication enabled.
* Restrict network access to expected users and clients.
* Store API keys in the client's secret store when supported.
* Revoke and replace keys after suspected exposure.
* Protect `/app_data`, because MCP-created presentations and uploads are stored there.
* Review generated presentations before publishing or exporting them.

<AccordionGroup>
  <Accordion title="The client cannot find Presenton tools">
    Confirm that it supports remote HTTP MCP, that the URL ends in `/mcp`, and that configuration was reloaded. The desktop app does not expose MCP.
  </Accordion>

  <Accordion title="The server returns 401 or unauthorized">
    Confirm the API key is active and the header is exactly `Authorization: Bearer sk-presenton-REPLACE_WITH_YOUR_KEY`.
  </Accordion>

  <Accordion title="It works locally but not through a reverse proxy">
    Verify HTTPS routing to container port `80`, forwarding of the `Authorization` header, and the proxy's timeout or buffering behavior for remote MCP connections.
  </Accordion>

  <Accordion title="Keys stopped working after a deployment change">
    Administrator credential override or recovery invalidates API keys. Sign in again, generate a new key, and update the MCP client.
  </Accordion>
</AccordionGroup>

<Check>
  The MCP client discovers Presenton's tools, creates a test presentation, and returns a result that opens in the intended self-hosted instance.
</Check>
