Content
# Content Gap Analysis MCP
Building a content strategy without data is guesswork. Before you invest months of writing and thousands of dollars into content, you need to understand what's already working in your space.
- What are competitors publishing?
- Where are the gaps?
- What content types are they prioritizing?
But getting those answers means hours of manually crawling websites, copying URLs into spreadsheets, and trying to spot patterns across thousands of pages.
This MCP server does the research and analysis for you:
- Identifies business models, target audiences, and top competitors so you know who to analyze
- Fetches sitemaps, categorizes URLs into content types (blog, docs, landing pages, case studies), and generates strategic insights for each company
- Surfaces content gaps and opportunities across competitors to show what they're doing that you're not
## Installation
First, clone the repository:
```bash
git clone https://github.com/vibe-marketer-sandbox/content-gap-analysis-mcp.git
cd content-gap-analysis-mcp
```
Then choose your preferred installation method:
<table>
<tr>
<td width="50%" valign="top">
### Option 1: Using pip
Works with Python 3.10+ that you already have:
```bash
# Create virtual environment (required on macOS)
python3 -m venv venv
source venv/bin/activate
# Install the package
pip install -e .
```
</td>
<td width="50%" valign="top">
### Option 2: Using uv (Faster)
[uv](https://docs.astral.sh/uv/) is a fast Python package manager:
```bash
# Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or with Homebrew
brew install uv
```
Then install:
```bash
# Install with uv (creates venv automatically)
uv sync
```
</td>
</tr>
</table>
## Configuration
<table>
<tr>
<td width="50%" valign="top">
### Cursor
1. Open Cursor Settings (Cmd+Shift+P > "Cursor Settings")
2. Go to "MCP" section
3. Add the server configuration:
**If using uv:**
```json
{
"mcpServers": {
"content-gap-analysis": {
"command": "uv",
"args": ["--directory", "/FULL/PATH/TO/content-gap-analysis-mcp", "run", "content-gap-analysis"]
}
}
}
```
**If using pip (venv):**
```json
{
"mcpServers": {
"content-gap-analysis": {
"command": "/FULL/PATH/TO/content-gap-analysis-mcp/venv/bin/python",
"args": ["-m", "content_gap_analysis.server"]
}
}
}
```
</td>
<td width="50%" valign="top">
### Claude Desktop
Add to your config file:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"content-gap-analysis": {
"command": "uv",
"args": ["--directory", "/FULL/PATH/TO/content-gap-analysis-mcp", "run", "content-gap-analysis"]
}
}
}
```
For pip installation, use:
```json
{
"mcpServers": {
"content-gap-analysis": {
"command": "/FULL/PATH/TO/content-gap-analysis-mcp/venv/bin/python",
"args": ["-m", "content_gap_analysis.server"]
}
}
}
```
</td>
</tr>
</table>
> **Important:** Replace `/FULL/PATH/TO/` with your actual path. Run `pwd` in the content-gap-analysis-mcp folder to get it.
## How It Works
### Workflow Architecture
```
╔═══════════════════════════════════════╗
║ MAIN COMPANY ANALYSIS ║
╚═══════════════════════════════════════╝
│
▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ STEP 1 │ │ STEP 2 │ │ STEP 3 │ │ STEP 4 │
│ │ │ │ │ │ │ │
│ research_ │──▶│ fetch_ │──▶│ analyze_ │──▶│ analyze_ │
│ company │ │ sitemap │ │ content_ │ │ content_ │
│ │ │ │ │ architecture │ │ strategy │
│ ┄┄┄┄┄┄┄┄┄┄┄┄ │ │ ┄┄┄┄┄┄┄┄┄┄┄┄ │ │ ┄┄┄┄┄┄┄┄┄┄┄┄ │ │ ┄┄┄┄┄┄┄┄┄┄┄┄ │
│ Identifies │ │ Gets URLs │ │ Categorizes │ │ Deep-dive │
│ competitors │ │ from sitemap │ │ by type │ │ analysis │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
│
│ identifies competitors
▼
╔═══════════════════════════════════════╗
║ FOR EACH COMPETITOR (repeat) ║
╚═══════════════════════════════════════╝
│
▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ fetch_ │──▶│ analyze_ │──▶│ analyze_ │
│ sitemap │ │ content_ │ │ content_ │
│ │ │ architecture │ │ strategy │
└──────────────┘ └──────────────┘ └──────────────┘
│
┌─────────────────────────────────────────────────────────┘
│ after ALL companies analyzed
▼
╔═══════════════════════════════════════╗
║ FINAL COMPARISON ║
╚═══════════════════════════════════════╝
│
▼
┌──────────────┐
│ compare_ │
│ strategies │
│ ┄┄┄┄┄┄┄┄┄┄┄┄ │
│ Cross-company│
│ analysis │
└──────────────┘
```
Each tool pauses and asks for your approval before proceeding, so you always stay in control.
## Usage
You can interact with this MCP in two ways:
### Approach 1: One-Shot Prompting
Give a single comprehensive prompt and let the AI walk through the entire workflow:
```
Analyze the content strategy for Clay (clay.com) and compare it
against their top 3 competitors. I want to understand their content
architecture, identify gaps, and get strategic recommendations.
```
The AI will execute each step in order, pausing for your approval at each checkpoint.
### Approach 2: Step-by-Step Prompting
Follow the workflow architecture above and prompt each step individually:
```
Step 1: Research the company Clay at clay.com and identify their top 3 competitors.
[After approval and completion]
Step 2: Fetch the sitemap for clay.com
[After approval and completion]
Step 3: Analyze the content architecture for Clay
[After approval and completion]
Step 4: Now do the strategic deep-dive analysis for Clay
[After approval and completion]
Step 5: Fetch the sitemap for [competitor domain]
[Repeat steps for each competitor...]
Final: Compare the content strategies across all analyzed companies
```
## Troubleshooting
### "spawn python ENOENT" Error
Cursor cannot find Python. Use the full path to Python in your venv:
```json
"command": "/Users/yourname/content-gap-analysis-mcp/venv/bin/python"
```
### "externally-managed-environment" Error
macOS prevents system-wide pip installs. Create a virtual environment first:
```bash
python3 -m venv venv
source venv/bin/activate
pip install -e .
```
### MCP Not Showing in Cursor
1. Make sure the path in your config is correct (no `~`, use full path)
2. Restart Cursor completely (Cmd+Q, then reopen)
3. Check MCP logs: Cursor Settings > MCP > View Logs
### Sitemap Not Found
If `fetch_sitemap` cannot find a sitemap at standard locations (/sitemap.xml, /sitemap_index.xml, robots.txt), it will ask you to help find it. Search for `site:domain.com sitemap.xml` and provide the URL back to the tool using the `sitemap_url` parameter.
### Tools Not Working
If you see errors like `'Server' object has no attribute...`:
- Make sure you have the latest code (`git pull`)
- Reinstall: `uv sync` or `pip install -e .`
## License
This software is proprietary. See [LICENSE](LICENSE) for terms.
You may use this software for personal or internal business purposes. Redistribution, resale, and sublicensing are prohibited.