# Claude Desktop SEO Audit - Setup Guide

## Prerequisites

### 1. Claude Desktop Application
- Download from https://claude.ai/download
- Sign in with your Anthropic account
- Pro subscription recommended for extended usage

### 2. Required MCP Servers

Configure these MCP servers in Claude Desktop settings:

#### Firecrawl (Web Scraping)
```json
{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "your-firecrawl-api-key"
      }
    }
  }
}
```

Get API key from: https://firecrawl.dev

#### Notion (Database Storage)
```json
{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-notion"],
      "env": {
        "NOTION_API_KEY": "your-notion-api-key"
      }
    }
  }
}
```

Get API key from: https://www.notion.so/my-integrations

#### Perplexity (Research)
```json
{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": ["-y", "perplexity-mcp"],
      "env": {
        "PERPLEXITY_API_KEY": "your-perplexity-api-key"
      }
    }
  }
}
```

Get API key from: https://www.perplexity.ai/settings/api

### 3. Notion Database Setup

#### Option A: Use Existing Database
The OurDigital SEO Audit Log database is already configured:
- **Database ID**: `2c8581e5-8a1e-8035-880b-e38cefc2f3ef`

Ensure your Notion integration has access to this database.

#### Option B: Create New Database
Create a database with these properties:

| Property | Type | Options |
|----------|------|---------|
| Issue | Title | - |
| Site | URL | - |
| Category | Select | Technical SEO, On-page SEO, Content, Local SEO, Performance, Schema/Structured Data, Sitemap, Robots.txt |
| Priority | Select | Critical, High, Medium, Low |
| Status | Status | Not started, In progress, Done |
| URL | URL | - |
| Found Date | Date | - |
| Audit ID | Rich Text | - |

## Configuration File Location

### macOS
```
~/Library/Application Support/Claude/claude_desktop_config.json
```

### Windows
```
%APPDATA%\Claude\claude_desktop_config.json
```

### Linux
```
~/.config/Claude/claude_desktop_config.json
```

## Complete Configuration Example

```json
{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "fc-your-key-here"
      }
    },
    "notion": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-notion"],
      "env": {
        "NOTION_API_KEY": "ntn_your-key-here"
      }
    },
    "perplexity": {
      "command": "npx",
      "args": ["-y", "perplexity-mcp"],
      "env": {
        "PERPLEXITY_API_KEY": "pplx-your-key-here"
      }
    },
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}
```

## Adding Project Knowledge

### Step 1: Create a Project
1. Open Claude Desktop
2. Click on the project selector (top left)
3. Click "New Project"
4. Name it "SEO Audit"

### Step 2: Add Knowledge Files
1. In your project, click the paperclip icon or "Add content"
2. Select "Add files"
3. Add these files from `~/.claude/desktop-projects/seo-audit/`:
   - `SEO_AUDIT_KNOWLEDGE.md` (main knowledge file)
   - `QUICK_REFERENCE.md` (quick commands)

### Step 3: Verify Setup
Start a new conversation and ask:
```
What SEO audit capabilities do you have?
```

Claude should describe the available audit features.

## Testing the Setup

### Test 1: Firecrawl
```
Scrape https://example.com and show me the page structure
```

### Test 2: Notion
```
Search for "SEO Audit" in Notion
```

### Test 3: Perplexity
```
Research current SEO best practices for 2024
```

### Test 4: Full Audit
```
Perform a quick SEO audit for https://blog.ourdigital.org
```

## Troubleshooting

### MCP Server Not Connecting
1. Restart Claude Desktop
2. Check config file JSON syntax
3. Verify API keys are correct
4. Check Node.js is installed (`node --version`)

### Notion Permission Error
1. Go to Notion integration settings
2. Add the database to integration access
3. Ensure integration has read/write permissions

### Firecrawl Rate Limit
1. Wait a few minutes between requests
2. Consider upgrading Firecrawl plan
3. Use `firecrawl_map` for discovery, then targeted scrapes

### Knowledge Files Not Loading
1. Ensure files are in supported formats (.md, .txt)
2. Keep file sizes under 10MB
3. Restart the project conversation

## Usage Tips

1. **Start with Quick Reference** - Use the commands from QUICK_REFERENCE.md
2. **One site per conversation** - Keep context focused
3. **Export regularly** - Save findings to Notion frequently
4. **Check existing findings** - Query Notion before creating duplicates
5. **Prioritize Critical issues** - Fix showstoppers first

## Differences from Claude Code Version

| Feature | Claude Code | Claude Desktop |
|---------|-------------|----------------|
| Python Scripts | Direct execution | Not available |
| Google APIs | Service account auth | Manual or via MCP |
| File System | Full access | Limited to uploads |
| Automation | Bash commands | MCP tools only |
| Scheduling | Possible via cron | Manual only |

## Support

For issues with:
- **Claude Desktop**: https://support.anthropic.com
- **Firecrawl**: https://docs.firecrawl.dev
- **Notion API**: https://developers.notion.com
- **MCP Protocol**: https://modelcontextprotocol.io
