# Pacing Tools for AI agents

You are connecting an AI agent to the Pacing Tools MCP server. It gives read-only access to the
user's own training data: activities, laps, weekly load, sleep, HRV and other watch wellness data.
Every tool only reads; nothing can change the user's data.

- MCP server: `https://mcp.pacing.tools/mcp` (Streamable HTTP, OAuth or a key)
- Guided setup for people: https://pacing.tools/start
- Full guide: https://pacing.tools/docs/mcp. Data handling: https://pacing.tools/docs/data

## Rules

- Work out which of the three cases below fits you, and follow only that one. If unsure, ask the user.
- Name the server `pacing`. If a `pacing` entry exists with a different URL, ask before replacing it.
  Never create a second entry for the same URL.
- Never ask the user to paste a key into the chat, and never print one. Keys live in environment
  variables or the agent's own secret store.
- Do not install software. Edit only the MCP configuration named for your agent, keep every other
  server and setting, and save valid JSON or YAML.
- A saved configuration is not a connection. You are done only when a tool call succeeds (see Check).
- If you cannot connect it yourself, or the user wants to set it up by hand, point them to the matching tab of
  https://pacing.tools/docs/mcp (`#claude`, `#chatgpt`, `#agents`) instead of writing your own steps.

## 1. Chat apps

In Claude, ChatGPT, Meta AI and other chat apps, you cannot add a connector yourself. Send the user to
https://pacing.tools/start, which walks them through it in their app, and help at each step.

## 2. Personal assistants

OpenClaw, Hermes, Meta Muse and other assistants.

Sign in first. Add `https://mcp.pacing.tools/mcp` as a remote Streamable HTTP server named `pacing`
with OAuth, and start its sign-in. If you run on a server, use your paste-back or device flow: give the
user the sign-in link, they open it on their phone or computer, sign in to Pacing Tools or join, click
**Allow**, and hand back what you ask for.

Signing in from a server or over chat:

- Run the login in an interactive terminal and keep it running until it finishes.
- Let it wait at least 5 minutes; the user may be signing in or joining on their phone.
- The browser ends on a `localhost` address that may not load. Ask the user to copy that full address
  back to you, and paste it into the same running login.
- If a login was interrupted, stop it and free its callback port before trying again.

- Hermes: in `~/.hermes/config.yaml` set `url: "https://mcp.pacing.tools/mcp"` and `auth: oauth` under
  `mcp_servers.pacing`, then `hermes mcp login pacing`.
- OpenClaw: `openclaw mcp add pacing --url https://mcp.pacing.tools/mcp --transport streamable-http`
  with `"auth": "oauth"`, then `openclaw mcp login pacing`.
- Meta Muse and assistants with custom connectors: create a connector with the link above and follow
  its sign-in.

If sign-in cannot work, use a key. Ask the user to create a key under **Connections** at
https://pacing.tools/athlete#connections and store it in your secret store or as `PACING_MCP_KEY`
themselves. Send it as the header `Authorization: Bearer ${PACING_MCP_KEY}`. Never have them paste it
into the chat.

## 3. Coding agents

Claude Code and Codex connect with the browser sign-in. The user signs in to Pacing Tools, or joins,
and clicks **Allow**.

Claude Code:

```bash
claude mcp get pacing
claude mcp add --transport http --scope user pacing https://mcp.pacing.tools/mcp
claude mcp login pacing
```

Codex:

```bash
codex mcp get pacing
codex mcp add pacing --url https://mcp.pacing.tools/mcp
codex mcp login pacing
```

Any other agent that can add a remote MCP server: add `https://mcp.pacing.tools/mcp` as Streamable
HTTP, named `pacing`, and use its sign-in, or the key route from section 2 if sign-in cannot work.

## Check

- Call `get_data_coverage` once. Listing the tools is not enough: only a real call proves the sign-in
  and the data. If it answers, tell the user Pacing Tools is connected.
- If the tools are not loaded in this session, ask the user to start a new session and check again.

## Errors

- `401`: the sign-in did not finish or the key is wrong. Run the sign-in again, or ask the user to
  check `PACING_MCP_KEY`. Do not retry in a loop.
- `429`: the daily limit of 100 calls is used up. Stop and tell the user it resets tomorrow.
- No activities in `get_data_coverage`: the user has not connected a watch yet. Send them to
  https://pacing.tools/start and wait.

## Using it

Call `get_data_coverage` before asking for a date range, and keep ranges narrow. Every tool is
read-only.
