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

# MCP Quickstart

> Connect Claude to Closient and resolve your first GTIN in under two minutes.

This walkthrough goes from "no MCP server installed" to "Claude
just resolved a GTIN" in about two minutes. We use Claude Code for
the example because it's the fastest path on every platform, but the
same flow works in any [Tier 1 MCP client](/guides/mcp-install#tier-1-first-class-clients).

## Prerequisites

* [Claude Code](https://docs.claude.com/en/docs/claude-code) installed
  and signed in.
* Network access to `closient.com` (no VPN that blocks the domain).

That's it — you do not need a Closient account, an API key, or a
Stripe subscription for the public tools. The MCP server is hosted
by Closient; nothing runs on your machine.

## Step 1 — install the server (\~10 seconds)

Run once from any terminal:

```bash theme={null}
claude mcp add closient --transport http https://www.closient.com/mcp/http
```

Verify:

```bash theme={null}
claude mcp list
```

You should see `closient` in the output. If you don't, open a fresh
Claude Code session — the registry is read at startup.

## Step 2 — verify the connection (\~5 seconds)

In Claude Code, ask:

> Use the Closient MCP server's `ping` tool and report what it
> returned.

Claude should call `ping` and reply with `pong`. If Claude can't
find the tool, the server isn't registered for this session — see
[Troubleshooting](/guides/mcp-install#troubleshooting) on the
install page.

## Step 3 — validate a GTIN (\~15 seconds)

> Use Closient to validate the GTIN `00614141123452`.

Claude calls `validate_gtin` and reports something like:

```json theme={null}
{
  "valid": true,
  "normalized": "00614141123452",
  "length": 14
}
```

Try an invalid one:

> Validate `00000000000001` — is the check digit right?

You should get `valid: false` with a check-digit error.

## Step 4 — resolve the GTIN to a destination (\~20 seconds)

> Resolve `00614141123452` and tell me what page Closient would
> send a scanner to.

Claude calls `resolve_gtin` and reports the resolver's destination
URL plus which rule scope matched (`PRODUCT`, `BRAND`,
`ORGANIZATION`, or `GLOBAL`). For an unknown GTIN you'll see
`fallback_applied: true` — Closient still returns a sensible
default destination even when no rule matches.

## Step 5 — look up product data (\~20 seconds)

> Look up product details for `00614141123452` and summarize the
> brand and description.

Claude calls `lookup_product` and surfaces the structured catalog
row — name, brand, description, data source, and any developer
metadata stored on the record.

## Step 6 — try the search tools (\~30 seconds)

> Search Closient for "organic oat milk" and show the top three
> brands.

Claude calls `search_products`. Add a latitude/longitude pair and
the results are boosted by proximity (50 km radius):

> Same query, but near `40.7128, -74.0060`. Are any of those
> available within 25 km of that point?

Claude can chain `search_products` → `check_availability` to answer
that in a single response.

## Step 7 — generate a QR URL (optional, requires auth)

The first time you ask Claude to generate a QR URL:

> Use Closient to generate the canonical Digital Link URL for
> `00614141123452`.

Claude calls `generate_qr_url` and gets back a `403` with a
`WWW-Authenticate` header. Claude Code shows you an OAuth consent
prompt that opens
[`https://www.closient.com/o/authorize/`](https://www.closient.com/o/authorize/)
in your browser. Approve the `qr:generate` scope, return to Claude,
and the call retries automatically — Claude reports the canonical
Digital Link URL ready to encode into a QR code.

See [Authentication](/guides/mcp-authentication) for the full flow.

## What you just used

| Tool                 | What it did                                                 |
| -------------------- | ----------------------------------------------------------- |
| `ping`               | Confirmed the server is reachable.                          |
| `validate_gtin`      | Verified GTIN structure and check digit.                    |
| `resolve_gtin`       | Looked up the destination Closient would send a scanner to. |
| `lookup_product`     | Pulled the structured catalog row.                          |
| `search_products`    | Natural-language search across the catalog.                 |
| `check_availability` | Found nearby stores carrying the GTIN.                      |
| `generate_qr_url`    | (Authenticated) Built the canonical Digital Link URL.       |

Full schemas for every tool are in the [Tool Reference](/guides/mcp-tools).

## Where to next

* [Install the MCP Server](/guides/mcp-install) — set up the server
  in Claude Desktop, Cursor, VS Code, Claude.ai, Windsurf, or any
  generic MCP client.
* [Tool Reference](/guides/mcp-tools) — every tool's inputs and
  outputs, with examples.
* [Authentication](/guides/mcp-authentication) — the OAuth 2.1
  step-up flow that gates `generate_qr_url`.
* [MCP Error Contract](/guides/mcp-errors) — how to handle failures.
* [MCP Identity Propagation](/guides/mcp-identity) — agent vs.
  end-user actor in audit logs.
