maciekpaszkiewicz/keyword-mapper
πΊοΈ Autonomous SEO keyword research & URL mapping agent for Claude Code. Fetches sitemap, queries DataForSEO, maps keywords to URLs with anti-cannibalization.
πΊοΈ Keyword Mapper β Claude Code Agent
Autonomous SEO keyword research & URL mapping agent for Claude Code. Fetches your sitemap, queries DataForSEO, analyzes competitors, and produces a complete keyword-to-URL map with anti-cannibalization β all in one prompt.
β¨ What It Does
| Phase | Description |
|---|---|
| 1. URL Recon | Parses your XML sitemap (or crawls JS-rendered SPAs via crawl4ai) and extracts clean page URLs |
| 2. Data Ingestion | Queries DataForSEO for ranked keywords, keyword ideas, competitor domains, content gaps, search intent & keyword difficulty |
| 3. Deterministic Mapping | Maps Primary KW β URL (1:1, no duplicates), assigns Secondary KWs, validates intent match, runs anti-cannibalization checks |
| 4. Gap Analysis | Suggests additional keywords for weak pages, proposes new pages for uncovered transactional/commercial queries |
Output Sections
- A. Complete Keyword β URL map (every sitemap URL included)
- B. 20-30 additional keyword suggestions for existing URLs
- C. Content gap β new page proposals with slug, H1, title & meta description
- D. Competitor analysis matrix
- E. Strategic SEO recommendations with priority levels
π Quick Start
Prerequisites
- Claude Code (Claude's CLI agent)
- DataForSEO MCP server configured (
dfs-mcp) - crawl4ai MCP server (optional, for JS-rendered sites)
Installation
Copy the agent file into your Claude Code agents directory:
# Create the agents directory if it doesn't exist
mkdir -p .claude/agents
# Copy the agent
cp keyword-mapper.md .claude/agents/keyword-mapper.mdUsage
Invoke the agent in Claude Code with @keyword-mapper:
@keyword-mapper
Biznes: Sklep internetowy z alkomatorami profesjonalnymi dla firm i policji.
Sprzedajemy alkomaty Lion, Promiler, AlkoHit. DziaΕamy w Polsce.
Sitemap: https://example.com/sitemap.xml
Konkurenci: promiler.pl, alko-tester.pl, alkotest.pl
Filtr: KD max 60, Volume min 200, jΔzyk pl, lokalizacja Polska
The agent will produce a keyword-map-{domain}.md file in your working directory.
βοΈ Configuration
| Parameter | Default | Description |
|---|---|---|
KD max |
70 | Maximum keyword difficulty |
Volume min |
100 | Minimum monthly search volume |
JΔzyk |
pl | Language code |
Lokalizacja |
Polska (2616) | DataForSEO location code |
Konkurenci |
auto-detected | Competitor domains for gap analysis |
π§ Required MCP Tools
The agent uses these MCP tool endpoints:
| Tool | Purpose |
|---|---|
WebFetch |
Fetching sitemap XML |
Bash |
Saving output to file |
crawl4ai β crawl |
Crawling JS-rendered pages |
crawl4ai β map |
Mapping site topology |
dfs-mcp β ranked_keywords |
Current domain rankings |
dfs-mcp β keyword_ideas |
Seed keyword expansion |
dfs-mcp β related_keywords |
Related keyword discovery |
dfs-mcp β search_intent |
Intent classification |
dfs-mcp β competitors_domain |
Competitor detection |
dfs-mcp β domain_intersection |
Content gap analysis |
dfs-mcp β bulk_keyword_difficulty |
KD scoring |
dfs-mcp β serp_organic_live_advanced |
Live SERP data |
π Output Example
The agent generates a Markdown dashboard:
# πΊοΈ Keyword Map β example.com | 2026-02-17
## Podsumowanie
| Metric | WartoΕΔ |
|---------------------|-----------------------|
| URL-e przeanalizowane | 87 |
| URL-e zmapowane | 72 |
| Frazy uΕΌyte ΕΔ
cznie | 215 |
| Content gaps | 12 |
| Top konkurent | rival.pl (45 fraz) |
## A. Mapa Keyword β URL
| URL | Primary KW (Vol) | Secondary KWs (Vol) | Intent | KD | Pozycja |
|-----|-------------------|---------------------|--------|----|---------|
| / | alkomaty (1200) | alkomat (800) | Komercyjna | 34 | 5 |
| ... | ... | ... | ... | ...| ... |
π Language
The agent's interface and output are in Polish π΅π± β designed for the Polish SEO market. It uses Polish intent labels (Transakcyjna, Komercyjna, Informacyjna, Nawigacyjna) and defaults to Polish language/location settings in DataForSEO.
π License
MIT License β see LICENSE for details.
π€ Contributing
- Fork the repo
- Create your feature branch (
git checkout -b feature/my-improvement) - Commit your changes (
git commit -m 'Add my improvement') - Push to the branch (
git push origin feature/my-improvement) - Open a Pull Request
Made with β€οΈ for SEO professionals using Claude Code.