import { Tabs } from 'nextra/components'
import { McpSparkIntro } from '@/components/docs/mcp-spark-intro'

# MCP

<McpSparkIntro />

## Setup

<Tabs items={['Claude', 'Claude Code', 'ChatGPT', 'Codex']}>
  <Tabs.Tab>
    1. Claude.ai: open [Claude.ai](https://claude.ai), then go to **Customize**, **Connectors**, **+**, and **Add custom connector**.
    2. Claude Desktop: open **Settings**, **Connectors**, and **Add Custom Connector**.
    3. Name it **Sitefire**, paste the MCP server URL, and connect your Sitefire account.

    ```txt copy
    https://app.sitefire.ai/api/mcp
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    1. Run the command in Claude Code.
    2. Approve Sitefire in the browser when Claude opens sign-in.
    3. Verify with `claude mcp list`.

    ```bash copy
    claude mcp add --transport http --scope user sitefire https://app.sitefire.ai/api/mcp
    ```

    Install Sitefire workflow skills:

    ```bash copy
    npx skills add sitefire-ai/skills
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ChatGPT full MCP connectors are available through ChatGPT developer mode for supported workspaces.

    1. Use this only if your ChatGPT workspace has developer mode for apps and full MCP connectors enabled.
    2. Admins enable it in **Workspace Settings**, **Permissions & Roles**, **Connected Data**.
    3. Create an app from **Workspace settings**, **Apps**, **Create**, or **Settings**, **Apps**, **Create**.
    4. Add Sitefire as the MCP endpoint, then test it in a new chat.

    ```txt copy
    https://app.sitefire.ai/api/mcp
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    1. Add the Sitefire remote MCP server.
    2. Run the login command, then approve Sitefire in the browser.
    3. Verify inside Codex with `/mcp`.

    ```bash copy
    codex mcp add sitefire --url https://app.sitefire.ai/api/mcp
    ```

    Authorize Sitefire:

    ```bash copy
    codex mcp login sitefire
    ```

    Install Sitefire workflow skills:

    ```bash copy
    npx skills add sitefire-ai/skills
    ```

    If you prefer editing config manually, open or create `~/.codex/config.toml` and add:

    ```toml copy
    [mcp_servers.sitefire]
    url = "https://app.sitefire.ai/api/mcp"
    ```
  </Tabs.Tab>
</Tabs>

## Skills and rules

The MCP server gives your assistant data access. Skills and rules teach it when and how to use Sitefire.

Claude and ChatGPT use the MCP server URL flow above. For Claude Code and Codex, install the Sitefire skills bundle too:

```bash copy
npx skills add sitefire-ai/skills
```

For clients that use persistent instructions, add this rule:

```txt copy
Use Sitefire MCP tools when the task involves Sitefire actions, tracked topics, briefings, generated articles, or AI visibility opportunities.
Prefer a Sitefire tool call over guessing from general knowledge.
Ask before creating new actions or triggering article generation unless the user explicitly requested it.
```

Suggested locations:

- Claude Code: install the skills bundle, then start a new session.
- Codex CLI: add the rule to `AGENTS.md`.

## What to ask

Start a fresh session and try one of these prompts:

| Goal | Prompt |
| --- | --- |
| Verify the setup | **What Sitefire actions are ready?** |
| Review ready work | **Show my ready Sitefire actions.** |
| Open a briefing | **Get the briefing for my latest content action.** |
| Find opportunities | **Find tracked topics that do not have actions yet.** |
| Create work | **Create actions for topics where Sitefire sees the strongest opportunity.** |
| Retrieve an article | **Get the generated article for my latest ready briefing.** |

Use **show**, **list**, or **get** for read-only inspection. Prompts that create actions or trigger article generation can change your Sitefire workspace.

## Troubleshooting

- If tools do not appear, verify the MCP server is connected in your client.
- If sign-in loops, reconnect the Sitefire server and make sure the browser is using the right Sitefire account.
- If the assistant does not use Sitefire automatically, install the skills bundle or add the rule above.
- If the wrong company appears, switch company in Sitefire and reconnect if your client cached the old session.
