|
| 1 | +# qrz-mcp |
| 2 | + |
| 3 | +MCP server for [QRZ.com](https://www.qrz.com/) — callsign lookups, DXCC entity resolution, and logbook queries through any MCP-compatible AI assistant. |
| 4 | + |
| 5 | +Part of the [qso-graph](https://qso-graph.io/) project. Depends on [adif-mcp](https://pypi.org/project/adif-mcp/) for persona and credential management. |
| 6 | + |
| 7 | +## Install |
| 8 | + |
| 9 | +```bash |
| 10 | +pip install qrz-mcp |
| 11 | +``` |
| 12 | + |
| 13 | +## Tools |
| 14 | + |
| 15 | +| Tool | API | Auth | Description | |
| 16 | +|------|-----|------|-------------| |
| 17 | +| `qrz_lookup` | XML | Session key | Callsign lookup (name, grid, DXCC, license class, QSL info, image) | |
| 18 | +| `qrz_dxcc` | XML | Session key | DXCC entity resolution from callsign or entity code | |
| 19 | +| `qrz_logbook_status` | Logbook | API key | Logbook stats (QSO count, DXCC total, date range) | |
| 20 | +| `qrz_logbook_fetch` | Logbook | API key | Query QSOs with filters and transparent pagination | |
| 21 | + |
| 22 | +## Quick Start |
| 23 | + |
| 24 | +### 1. Set up credentials |
| 25 | + |
| 26 | +qrz-mcp uses adif-mcp personas for credential management. QRZ has **two separate auth mechanisms** — set up whichever you need: |
| 27 | + |
| 28 | +```bash |
| 29 | +# Install adif-mcp if you haven't |
| 30 | +pip install adif-mcp |
| 31 | + |
| 32 | +# Create a persona |
| 33 | +adif-mcp persona create ki7mt --callsign KI7MT |
| 34 | + |
| 35 | +# Enable QRZ provider |
| 36 | +adif-mcp persona provider ki7mt qrz --username KI7MT |
| 37 | + |
| 38 | +# Set password (for XML API: qrz_lookup, qrz_dxcc) |
| 39 | +adif-mcp persona secret ki7mt qrz |
| 40 | + |
| 41 | +# Set API key (for Logbook API: qrz_logbook_status, qrz_logbook_fetch) |
| 42 | +adif-mcp creds set --persona ki7mt --provider qrz --api-key YOUR_API_KEY |
| 43 | +``` |
| 44 | + |
| 45 | +**XML API** (callsign lookup, DXCC) requires a QRZ XML Subscription ($35.95/yr). Free tier returns name and address only. |
| 46 | + |
| 47 | +**Logbook API** requires an API key from QRZ Settings > API. |
| 48 | + |
| 49 | +### 2. Configure your MCP client |
| 50 | + |
| 51 | +qrz-mcp works with any MCP-compatible client. Add the server config and restart — tools appear automatically. |
| 52 | + |
| 53 | +#### Claude Desktop |
| 54 | + |
| 55 | +Add to `claude_desktop_config.json` (`~/Library/Application Support/Claude/` on macOS, `%APPDATA%\Claude\` on Windows): |
| 56 | + |
| 57 | +```json |
| 58 | +{ |
| 59 | + "mcpServers": { |
| 60 | + "qrz": { |
| 61 | + "command": "qrz-mcp" |
| 62 | + } |
| 63 | + } |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +#### Claude Code |
| 68 | + |
| 69 | +Add to `.claude/settings.json`: |
| 70 | + |
| 71 | +```json |
| 72 | +{ |
| 73 | + "mcpServers": { |
| 74 | + "qrz": { |
| 75 | + "command": "qrz-mcp" |
| 76 | + } |
| 77 | + } |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +#### ChatGPT Desktop |
| 82 | + |
| 83 | +ChatGPT supports MCP via the [OpenAI Agents SDK](https://developers.openai.com/api/docs/mcp/). Add under Settings > Apps & Connectors, or configure in your agent definition: |
| 84 | + |
| 85 | +```json |
| 86 | +{ |
| 87 | + "mcpServers": { |
| 88 | + "qrz": { |
| 89 | + "command": "qrz-mcp" |
| 90 | + } |
| 91 | + } |
| 92 | +} |
| 93 | +``` |
| 94 | + |
| 95 | +#### Cursor |
| 96 | + |
| 97 | +Add to `.cursor/mcp.json` (project-level) or `~/.cursor/mcp.json` (global): |
| 98 | + |
| 99 | +```json |
| 100 | +{ |
| 101 | + "mcpServers": { |
| 102 | + "qrz": { |
| 103 | + "command": "qrz-mcp" |
| 104 | + } |
| 105 | + } |
| 106 | +} |
| 107 | +``` |
| 108 | + |
| 109 | +#### VS Code / GitHub Copilot |
| 110 | + |
| 111 | +Add to `.vscode/mcp.json` in your workspace: |
| 112 | + |
| 113 | +```json |
| 114 | +{ |
| 115 | + "servers": { |
| 116 | + "qrz": { |
| 117 | + "command": "qrz-mcp" |
| 118 | + } |
| 119 | + } |
| 120 | +} |
| 121 | +``` |
| 122 | + |
| 123 | +#### Gemini CLI |
| 124 | + |
| 125 | +Add to `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project): |
| 126 | + |
| 127 | +```json |
| 128 | +{ |
| 129 | + "mcpServers": { |
| 130 | + "qrz": { |
| 131 | + "command": "qrz-mcp" |
| 132 | + } |
| 133 | + } |
| 134 | +} |
| 135 | +``` |
| 136 | + |
| 137 | +### 3. Ask questions |
| 138 | + |
| 139 | +> "Look up W1AW on QRZ — what's their grid and license class?" |
| 140 | +
|
| 141 | +> "What DXCC entity is VP8PJ?" |
| 142 | +
|
| 143 | +> "How many QSOs do I have in my QRZ logbook?" |
| 144 | +
|
| 145 | +> "Show me all 20m FT8 QSOs from my QRZ logbook this year" |
| 146 | +
|
| 147 | +## Rate Limiting |
| 148 | + |
| 149 | +QRZ enforces undocumented rate limits that can trigger **24-hour IP bans**. qrz-mcp protects you: |
| 150 | + |
| 151 | +- 500ms minimum delay between all API calls |
| 152 | +- Token bucket: 35 requests/minute |
| 153 | +- 60s freeze on authentication failures |
| 154 | +- 3600s freeze on connection refused (IP ban detection) |
| 155 | +- In-memory response cache (5 min for callsigns, 1 hour for DXCC) |
| 156 | + |
| 157 | +## Testing Without Credentials |
| 158 | + |
| 159 | +Set the mock environment variable to test all 4 tools without QRZ credentials: |
| 160 | + |
| 161 | +```bash |
| 162 | +QRZ_MCP_MOCK=1 qrz-mcp |
| 163 | +``` |
| 164 | + |
| 165 | +## MCP Inspector |
| 166 | + |
| 167 | +```bash |
| 168 | +qrz-mcp --transport streamable-http --port 8002 |
| 169 | +``` |
| 170 | + |
| 171 | +Then open the MCP Inspector at `http://localhost:8002`. |
| 172 | + |
| 173 | +## Development |
| 174 | + |
| 175 | +```bash |
| 176 | +git clone https://github.com/qso-graph/qrz-mcp.git |
| 177 | +cd qrz-mcp |
| 178 | +pip install -e . |
| 179 | +``` |
| 180 | + |
| 181 | +## QRZ Subscription Tiers |
| 182 | + |
| 183 | +| Feature | Free | XML Data ($35.95/yr) | |
| 184 | +|---------|------|---------------------| |
| 185 | +| Callsign lookups/day | 100 | Unlimited | |
| 186 | +| Fields returned | Name + address only | All (grid, lat/lon, DXCC, class, QSL, image) | |
| 187 | +| Logbook API | No | Yes | |
| 188 | +| DXCC lookup | No | Yes | |
| 189 | + |
| 190 | +## License |
| 191 | + |
| 192 | +GPL-3.0-or-later |
0 commit comments