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

# Claude Code

> Connect Surfer to Claude Code and run your first request.

export const Prompt = ({text}) => {
  const copyIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>';
  const checkIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>';
  const copy = event => {
    const button = event.currentTarget;
    if (!navigator.clipboard) return;
    navigator.clipboard.writeText(text).then(() => {
      button.innerHTML = checkIcon;
      button.setAttribute('aria-label', 'Copied');
      clearTimeout(button.resetTimer);
      button.resetTimer = setTimeout(() => {
        button.innerHTML = copyIcon;
        button.setAttribute('aria-label', 'Copy prompt');
      }, 2000);
    }).catch(() => {});
  };
  return <div className="surfer-prompt not-prose">
      <div className="surfer-prompt-meta">
        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
          <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
          <circle cx="12" cy="7" r="4" />
        </svg>
        <span>Prompt</span>
      </div>
      <div className="surfer-prompt-bubble">
        <p className="surfer-prompt-text">{text}</p>
        <button type="button" className="surfer-prompt-copy" aria-label="Copy prompt" onClick={copy}>
          <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
            <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
            <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
          </svg>
        </button>
      </div>
    </div>;
};

Add the server from your terminal, then authorize it in a Claude Code session.

## Before you start

You need your own Surfer account on a [plan that includes MCP](/mcp/credits-and-limits#plans-that-include-mcp).

You also need Claude Code installed and signed in.

<Note>
  Already connected Surfer on claude.ai? With a Claude subscription login active
  in Claude Code, that connector is available automatically. Check `/mcp` and
  [verify the connection](#verify-the-connection) without adding it again.
</Note>

## Connect Surfer

This setup makes Surfer available across your projects.

<Steps>
  <Step title="Add the server">
    Run this command in your terminal:

    ```bash theme={"system"}
    claude mcp add --transport http --scope user surfer https://mcp.surferseo.com/mcp
    ```
  </Step>

  <Step title="Open the sign-in flow">
    Start `claude`, run `/mcp`, and select `surfer` to authenticate. Claude Code opens your browser.
  </Step>

  <Step title="Authorize Surfer">
    1. Sign in with your Surfer account in the browser window that opens.
    2. Choose the organization to connect, if you belong to more than one.
    3. Select **Authorize**, then return to your client.

    If the browser signs you in to the wrong Surfer account, follow [Disconnect or switch accounts](/mcp/authentication#disconnect-or-switch-accounts).
  </Step>
</Steps>

<Accordion title="Limit the connection to one project">
  Omit `--scope user` to keep the server local to the current project. Use
  `--scope project` to save it in the project's `.mcp.json` for your team. Each
  person signs in separately.
</Accordion>

## Verify the connection

Run `/mcp` and confirm Surfer is listed, then close the panel to send a request in the same session.

Ask your assistant:

<Prompt text="List my Surfer workspaces" />

Your assistant lists the workspaces in the organization you authorized. Each workspace has a name, type, location, and state. Choose an active workspace for content tasks.

Continue with [Skills](/mcp/skills) for guided workflows or [Use cases](/mcp/use-cases) for example requests. If the request fails, see [Troubleshooting](/mcp/troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.