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

# Connectors

> Add Chance verification to Claude, ChatGPT, and the AI platforms — hosted, no local install.

Chance runs a **hosted (remote) MCP server** so AI assistants can call `verify_intent` / `get_verification` over the network — no local process to install.

```
https://harness.chance.cc/api/mcp
```

Two ways to authenticate, depending on the client:

* **One-click OAuth** — Claude.ai, Claude Desktop, Claude mobile, and ChatGPT open a Chance sign-in screen; no key to paste.
* **API key** — the Anthropic and OpenAI developer APIs pass your `chance_sk_` key as a header.

<Note>
  Prefer a **local** install (Claude Desktop / Cursor / Windsurf via `npx`)? Use the [stdio MCP server](/mcp) instead — same tools, runs on your machine.
</Note>

## Claude.ai · Claude Desktop · Claude mobile (OAuth)

<Steps>
  <Step title="Open connector settings">
    **Settings → Connectors → Add custom connector** (Team/Enterprise: an owner adds it under Organization settings).
  </Step>

  <Step title="Add the URL">
    Paste `https://harness.chance.cc/api/mcp` and click **Add**. No OAuth client ID/secret needed — Chance registers your client automatically.
  </Step>

  <Step title="Sign in">
    Click **Connect** and approve on the Chance screen (sign in with the same account as your [dashboard](https://harness.chance.cc/dashboard)). Done — `verify_intent` is now available in chat.
  </Step>
</Steps>

## ChatGPT (OAuth)

Enable **Developer Mode** (Settings → Connectors → Advanced), then **Add custom connector** and enter `https://harness.chance.cc/api/mcp`. Approve the Chance sign-in. Developer Mode exposes the full read/write tools (`verify_intent` is a write tool); the read-only Deep Research connector path is not the one you want here.

## Anthropic Messages API (key)

Call the remote server directly from the API with the MCP connector — your `chance_sk_` key goes in `authorization_token`:

```bash theme={null}
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: mcp-client-2025-11-20" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-4-8",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Before trading, verify my order against my mandate."}],
    "mcp_servers": [{
      "type": "url",
      "url": "https://harness.chance.cc/api/mcp",
      "name": "chance",
      "authorization_token": "chance_sk_live_..."
    }]
  }'
```

<Note>The MCP-connector beta header and exact fields evolve — see Anthropic's [MCP connector docs](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) for the current version.</Note>

## OpenAI Responses API (key)

Add a remote MCP tool and pass your key as a header:

```bash theme={null}
curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "gpt-5",
    "input": "Before trading, verify my order against my mandate.",
    "tools": [{
      "type": "mcp",
      "server_label": "chance",
      "server_url": "https://harness.chance.cc/api/mcp",
      "headers": { "Authorization": "Bearer chance_sk_live_..." },
      "require_approval": "always"
    }]
  }'
```

## Any MCP client, via bridge (key)

For a client that only speaks local stdio, bridge to the hosted server with your key:

```bash theme={null}
npx mcp-remote https://harness.chance.cc/api/mcp \
  --header "Authorization: Bearer chance_sk_live_..."
```

## How the OAuth flow works

Chance implements the MCP Authorization spec (OAuth 2.1 + PKCE):

* **Discovery** — `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`
* **Dynamic Client Registration** — clients register automatically; nothing to configure
* **PKCE (S256)**, single-use authorization codes, and rotating refresh tokens
* The consent screen authenticates you with the same identity as the dashboard, then issues the client a scoped token that spends **your** credits

Nothing to set up on your side — just add the URL and approve.
