# Quickstart (/en/docs/api-mcp/mcp/quickstart)



Point an AI client at one URL, sign in with your CentralCSP account, and the agent can register websites, deploy the reporting headers into your codebase, and read what browsers are reporting back.

There is no API key in this flow. Sign-in is OAuth in your browser, so there is nothing to create, paste, or rotate.

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

<Callout type="info" title="Before you start">
  You need a CentralCSP account on a plan that includes AI tools, and a client that supports remote MCP servers. **Settings > AI tools** in the dashboard generates every command below with your workspace already filled in.
</Callout>

## 1. Add the server [#1-add-the-server]

<CodeBlockTabs defaultValue="Claude Code">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="Claude Code">
      Claude Code
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="Claude Desktop">
      Claude Desktop
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="Codex CLI">
      Codex CLI
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="Other clients">
      Other clients
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="Claude Code">
    ```bash
    claude mcp add --transport http --client-id mcp centralcsp https://mcp.centralcsp.com --scope user
    ```
  </CodeBlockTab>

  <CodeBlockTab value="Claude Desktop">
    ```text
    Settings > Connectors > Add custom connector

    URL:              https://mcp.centralcsp.com
    OAuth client ID:  mcp
    Client secret:    leave empty
    ```
  </CodeBlockTab>

  <CodeBlockTab value="Codex CLI">
    ```toml  title="~/.codex/config.toml"
    [mcp_servers.centralcsp]
    url = "https://mcp.centralcsp.com"
    auth = "oauth"
    ```
  </CodeBlockTab>

  <CodeBlockTab value="Other clients">
    ```json  title="mcp.json"
    {
      "mcpServers": {
        "centralcsp": {
          "type": "http",
          "url": "https://mcp.centralcsp.com"
        }
      }
    }
    ```
  </CodeBlockTab>
</CodeBlockTabs>

`--scope user` registers the server for every project you open. Leave it out to add it to the current project only, which writes to that project's `.mcp.json`.

## 2. Sign in [#2-sign-in]

1. Start the sign-in from your client: `/mcp` then **Authenticate** in Claude Code, `codex mcp login centralcsp` in Codex, **Connect** in Claude Desktop.
2. Sign in with your CentralCSP account in the browser that opens.
3. Confirm the server is connected (`/mcp` again, or `codex mcp list`).

Ask the agent to list your workspaces as a first check. That call, `list_workspaces`, is the one every other tool depends on.

## 3. Set up reporting with one prompt [#3-set-up-reporting-with-one-prompt]

Paste this into a coding agent with your project open. It registers the site, writes the headers into your code, and checks that reports arrive. Swap the workspace name and id for your own, which **Settings > AI tools** fills in for you on its copy of this prompt.

```text title="First prompt"
Set up browser security reporting for this project with CentralCSP, using the
centralcsp MCP server. Do the work yourself, and stop to ask me only when you
genuinely cannot work something out.

Work in the workspace "<workspace name>" (id <workspace id>).

1. Find this site's public URL in the repo, in env files, config, or deployment
   manifests. Ask me only if you cannot find it. Choose a name from the project
   and tell me what you picked.
2. Create the website with the MCP server and read back the endpointUrl it returns.
3. Find where this project sets HTTP response headers, whether that is middleware,
   a server or framework config, or a CDN or reverse-proxy rule, and add these two
   headers there yourself, matching the file's existing style:
     Reporting-Endpoints: centralcsp="<endpointUrl>"
     Content-Security-Policy-Report-Only: default-src 'self'; report-to centralcsp
   Use Report-Only to begin with, so nothing on the site breaks, and substitute
   the real endpointUrl.
4. Show me the diff and tell me how to deploy it. Do not commit anything.
5. Once I confirm it is live, check whether reports are arriving. If none are,
   fetch the site and look at the headers it actually serves, then fix them.
6. Finish by summarising what the browsers are reporting and what I should fix first.
```

Report-Only is the point of step 3. The browser sends reports and blocks nothing, so you learn what a policy would break before it breaks it. See [Report-Only](/en/docs/web-security/policies/content-security-policy/report-only).

## 4. Use it [#4-use-it]

Once the server is connected, ask in plain language. The agent resolves the ids itself.

| Ask                                                            | Tools it reaches for                               |
| -------------------------------------------------------------- | -------------------------------------------------- |
| What is being blocked on our site this week                    | `get_top_reports`                                  |
| Show me the CSP headers browsers actually saw                  | `list_csp_policies`                                |
| Pull the full payload for that `script-src-elem` violation     | `list_raw_reports`                                 |
| Which scripts on our payment pages still have no justification | `get_compliance_summary`, `list_inventory_scripts` |
| Draft justifications for the reviewed ones                     | `justify_script`                                   |
| Are we near the report quota                                   | `get_workspace_usage`, `get_website_usage`         |
| Did last week's alerts actually get delivered                  | `list_alert_deliveries`                            |

Two habits make the answers better. Name the site, so the agent filters instead of scanning every website in the workspace. Name a range, because tools default to the last 7 days and reports are only kept for 90.

Your client lists every tool the server exposes, so asking the agent what it can do is the current answer rather than a list here.

## What it will not do [#what-it-will-not-do]

<Callout type="warn" title="The agent has your permissions, not fewer">
  Every call runs as you, with your roles, your plan, and your audit trail. A workspace admin connecting a client gives it access to every website in that workspace. See [Permissions and safety](/en/docs/api-mcp/mcp/permissions).
</Callout>

Nothing deletes. There is no tool that removes a website, a member, a rule, or a report. There is also no tool for membership, access grants, security settings, or billing, so an agent cannot reach them however it is prompted.

Two tools have effects outside CentralCSP and are worth confirming before they run. `test_alert_channel` delivers a real notification that real people see, and `reconcile_script_inventory` queues an inventory rebuild.

**Settings > General > Disable AI agent integrations** cuts every AI client off from the workspace immediately, without touching dashboard sessions.

## If it does not connect [#if-it-does-not-connect]

| Symptom                                     | Cause                                                                 |
| ------------------------------------------- | --------------------------------------------------------------------- |
| The client never prompts to sign in         | The URL has a path. It is the bare origin                             |
| Every call returns 401 `insufficient_scope` | The token lacks the `mcp` scope. Sign out in the client and reconnect |
| Every call returns 403                      | Your account lacks the role, or your plan lacks the feature           |
| Connected, but no tools appear              | Your plan does not include AI tools                                   |
| It stopped working for everyone at once     | The workspace kill switch is on                                       |

Per-client setup detail is in [Connect a client](/en/docs/api-mcp/mcp/connect).

## Next steps [#next-steps]

* [Permissions and safety](/en/docs/api-mcp/mcp/permissions)
* [REST API](/en/docs/api-mcp/api)
