---
path: /v1/mcp
title: MCP server
summary: Connect AgentFit to Claude, Cursor, and other agents over the Model Context Protocol.
group: Guides
updated: 2026-06-22
---

# MCP server

AgentFit hosts a remote, OAuth-protected MCP (Model Context Protocol) server. Add it to an
agent client and audit documentation sites straight from the chat — with **no sign-up**, as
the OAuth step auto-approves.

## Connect

### Claude Code

```bash
claude mcp add --transport http agentfit https://docs.agentfit.dev/mcp
```

### claude.ai / Claude Desktop

Open Settings → Connectors → Add custom connector, and enter `https://docs.agentfit.dev/mcp`.

The connector completes OAuth automatically (Dynamic Client Registration + PKCE); there is
no login screen and the access token is short-lived. If a call ever reports that your
authorization expired, reconnect.

## Tools

| Tool | Arguments | Description |
|---|---|---|
| `audit` | `base_url` (string), `format` (`json` or `markdown`) | Start an audit and return the report, or a `run_id` plus a live `share_url` if it is still running. |
| `get_report` | `run_id` (string), `format` | Fetch the result of a previously started audit. |

Ask, for example: *"audit https://docs.stripe.com"*. The tool returns a `share_url` you can
open immediately and the full scored report when the audit finishes.

## Discovery

The server advertises its OAuth surface per RFC 9728 / RFC 8414:

```bash
curl -s https://docs.agentfit.dev/.well-known/oauth-protected-resource | jq .resource
# "https://docs.agentfit.dev/mcp"
curl -sI https://docs.agentfit.dev/mcp | grep -i www-authenticate
# Bearer resource_metadata="https://docs.agentfit.dev/.well-known/oauth-protected-resource", scope="agentfit:audit"
```

The scope is `agentfit:audit`. The same audit functionality is also available over the
[HTTP API](https://docs.agentfit.dev/v1/reference/audit) and the CLI.
