# AI agents and MCP (https://talivia.com/docs/ai-agents)



Talivia exposes an account-level [Model Context Protocol](https://modelcontextprotocol.io/) endpoint at:

```text
https://talivia.com/mcp
```

Connect it once to let an approved AI agent work across the websites your Talivia account can access. The agent can inspect setup, create or select a website, get the exact tracking snippet and framework instructions, open secure payment-provider setup, and verify that real data is arriving.

## Choose your client [#choose-your-client]




Codex

Connect from the CLI with remote MCP and OAuth.




ChatGPT

Create a custom app in Apps & Connectors.




Claude

Add Talivia as a custom web connector.




Other MCP clients

Use Streamable HTTP and OAuth discovery.

## How authorization works [#how-authorization-works]

1. Add `https://talivia.com/mcp` to your MCP client.
2. The first protected request returns an OAuth challenge with Talivia's authorization metadata.
3. Your client opens Talivia in the browser. Sign in if necessary.
4. Review the requested scopes and approve the connection.
5. The client receives a short-lived access token. When it expires, Talivia requires a new authorization flow instead of issuing a long-lived refresh credential.

The agent never receives your Talivia password. Payment provider secrets also stay in Talivia: when Stripe or another provider needs authorization, the MCP tool returns a secure browser handoff instead of asking the agent to handle credentials.

You can review or revoke approved connections at any time in **Settings → AI agents**.

## Local npm bridge [#local-npm-bridge]

If your client expects a local stdio MCP server, use the published Talivia package:

```bash
npx -y @talivia/agent setup --agent codex
npx -y @talivia/agent checkin --agent codex
codex mcp add talivia -- npx -y @talivia/agent mcp
```

The setup command opens Talivia for browser approval. Check-in stores the approved, revocable local credential in `~/.talivia/config.json`, and the final command lets Codex start the authenticated stdio bridge.

## Codex [#codex]

Add the hosted endpoint:

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

Then start browser authorization:

```bash
codex mcp login talivia
```

After approval, ask Codex:

```text
Set up Talivia for this project. Select or create the correct website, install the tracker,
connect revenue through a secure browser handoff, and verify that real data is arriving.
```

## ChatGPT [#chatgpt]

1. Open **ChatGPT → Settings → Apps & Connectors**.
2. Create a custom app named `Talivia`.
3. Set the MCP server URL to `https://talivia.com/mcp` and choose OAuth.
4. Save the app, then complete Talivia sign-in and consent in the browser.
5. Enable Talivia in a chat before asking it to review or finish setup.

## Claude [#claude]

1. Open **Claude → Customize → Connectors → Add custom connector**.
2. Name the connector `Talivia` and use `https://talivia.com/mcp` as the remote MCP URL.
3. Complete Talivia sign-in and consent in the browser.
4. In a conversation, open the `+` menu, choose **Connectors**, and enable Talivia.

## Claude Code [#claude-code]

Register the hosted endpoint:

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

The first protected tool call starts browser authorization.

## Other MCP clients [#other-mcp-clients]

Use a Streamable HTTP server with OAuth discovery:

```json
{
  "talivia": {
    "type": "http",
    "url": "https://talivia.com/mcp",
    "auth": "oauth"
  }
}
```

Your client must support MCP OAuth authorization-server discovery and the browser authorization flow. If it does not, use one of the supported clients above.

## What the agent can do [#what-the-agent-can-do]

Talivia exposes a deliberately small set of tools:

* Check the signed-in account and list accessible websites.
* Create a website only after the user confirms the action.
* Return the exact tracking snippet and a framework-specific install plan.
* Inspect the complete setup checklist and verify live tracker ingestion.
* Start secure payment-provider setup and read connection status.
* Return checkout-attribution guidance without exposing payment credentials.

## Troubleshooting [#troubleshooting]

### The browser does not open [#the-browser-does-not-open]

Confirm that the client supports OAuth for remote MCP servers. Remove the existing Talivia entry, add it again, and retry authorization.

### The endpoint is unavailable [#the-endpoint-is-unavailable]

Open **Settings → AI agents** and check the endpoint status. A healthy endpoint shows **Ready to connect**.

### The wrong account was authorized [#the-wrong-account-was-authorized]

Revoke the connection in **Settings → AI agents**, sign in to the intended Talivia account in your browser, and connect again.

### The agent cannot see a website [#the-agent-cannot-see-a-website]

The MCP connection follows the same account and website permissions as the Talivia UI. Confirm that the signed-in account has access to that website.
