Skip to main content
Glama
contest-mcp

contest-mcp

by sbrunner-atx

n3fjp-mcp

An MCP server for logging amateur-radio QSOs to N3FJP logging software — Amateur Contact Log and the 100-plus N3FJP contest loggers — from MCP-aware clients such as Claude Desktop.

Every program in the N3FJP suite shares one TCP control API. n3fjp-mcp speaks that protocol directly (Python's standard-library socket, no third-party wrapper) and exposes it as a small set of logically-grouped MCP tools, so an assistant can log contacts, read the log, run dupe checks, and manage band/mode through plain language.

It is the logging half of an "operate → log" workflow; its sibling project fldigi-mcp operates the radio.

Status: experimental (v0.3). Verified live against N3FJP's ARRL Field Day Contest Log, API version 2.2. The protocol is shared across the suite, but field sets vary per contest — confirm with the fields tool.

⚠️ Independent project — not affiliated with N3FJP

n3fjp-mcp is an independent, community project by Stefan Brunner (AE5VG), using the "N3FJP" name with the permission of its owner. It is not affiliated with, endorsed by, or supported by N3FJP Software / Affirmatech. Please direct all support questions for this app to its issue tracker — not to N3FJP. MIT licensed. "N3FJP" is the callsign and trademark of its owner.

Related MCP server: qrz-mcp

Highlights

  • Automatic logging — the headline log tool runs the real N3FJP flow: set the call → CALLTAB (dupe check + previous-contact lookup) → set the exchange → ENTER, surfacing the dupe response and the number of records added.

  • Broad coverage — read queries, field read/write, search/list, dupe and entity checks, band/mode/frequency, direct database operations, and opt-in push notifications, grouped into 9 tools (one permission each), a read-only diagnostics tool, and an n3fjp_call escape hatch for the long tail and future commands.

  • Safe by design for a tool that can touch your log database:

    • Reads are marked read-only so clients can default them to Always Allow.

    • Writes (logging, band/mode, and adding, editing or deleting individual records) sit at Needs Approval, with no extra in-band confirmation.

    • Whole-database wipes/overwrites are refused outright unless you flip a dedicated, off-by-default N3FJP_ALLOW_DB_WIPE switch.

  • Names match N3FJP — tools and fields mirror N3FJP's own terminology (Action ENTER, CALLTAB, the TXTENTRY… boxes, Class/Section, etc.).

  • No fragile dependencies — the only runtime dependency is the MCP SDK.

Requirements

To install the desktop extension (.mcpb):

  • An N3FJP program running, with Settings → Application Program Interface → "TCP API Enabled" checked (default API port 1100).

Claude Desktop's uv runtime supplies Python and the dependencies, so end users do not install Python or uv themselves.

For development from source you additionally need Python 3.10+ and uv (and Node.js, only for the MCP Inspector).

Install

Easiest: one-click desktop extension

Download n3fjp-mcp.mcpb from the latest release, then in Claude Desktop go to Settings → Extensions → Advanced settings → Install Extension… and choose the file. A short settings form asks for the host/port (defaults to 127.0.0.1:1100). No terminal, no Python, no uv to install.

👉 New to this? Follow the step-by-step install guide.

From source (development)

git clone https://github.com/sbrunner-atx/n3fjp-mcp.git
cd n3fjp-mcp
uv sync

Then add it to Claude Desktop's config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "contest": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/n3fjp-mcp", "run", "n3fjp-mcp"],
      "env": { "N3FJP_HOST": "127.0.0.1", "N3FJP_PORT": "1100" }
    }
  }
}

Restart Claude Desktop and ask "What's the N3FJP status?".

Try it with the MCP Inspector

uv run mcp dev src/n3fjp_mcp/server.py

Tools

Each tool is one permission and takes an operation argument.

Tool

Default

Controls

status

read

snapshot: program, version, API version, QSO count, band/mode/frequency

diagnostics

read

resolved host and port, this process's Python and hostname, network interfaces; does not connect to N3FJP

query

read

program, qso_count, next_serial, log/settings/shared paths, qso_rate, band_mode_freq

fields

read

read one entry box, or list visible / all fields with values

search

read

list recent, search, dupecheck (no side effects), entity status

log

approval

log_qso (set call → CALLTAB → exchange → ENTER), set, set_many, calltab, enter, clear, focus

bandmode

approval

change_freq, set_band, set_mode, ignore_rig_polls

notifications

approval

enable / disable push events, drain buffered events

database

approval

add_direct, delete a record, raw sql, checklog, openlog, sqlclose

n3fjp_call

approval

escape hatch — send any raw command, incl. future ones

All write tools sit at the Needs Approval tier, so you can set them to Always Allow in the client for hands-off automation. The single exception is a whole-database wipe (see below), which is hard-blocked regardless.

The headline is log → log_qso:

log_qso  call="W1AW"  contest="field_day"  exchange={"class":"2A","section":"CT"}

This sets the call, fires CALLTAB (dupe check), fills the exchange, sends ENTER, and reports records added plus any dupe detail.

Configuration

Variable

Default

Purpose

N3FJP_HOST

127.0.0.1

N3FJP API host

N3FJP_PORT

1100

N3FJP API port (the suite's default)

N3FJP_TIMEOUT

6

Socket/response timeout, seconds

N3FJP_ALLOW_DB_WIPE

off

Danger. Allow whole-database delete/overwrite (raw SQL DROP/TRUNCATE/unscoped DELETE/UPDATE). Leave off unless you really mean it

In the packaged desktop extension these appear as a settings form.

Safety model

Logging doesn't key a transmitter, so there is no transmit gate. The protection here is about your log database:

  • Read operations (status, query, fields, search) are marked read-only — clients can default them to Always Allow.

  • Write operations — logging (log), band/mode (bandmode), notifications, and adding, editing, or deleting individual records (database), plus the n3fjp_call escape hatch — all sit at the Needs Approval tier. There is no extra in-band confirmation, so you can set them to Always Allow in the client and let automation run hands-off.

  • Whole-database operations — raw SQL that could delete or overwrite the entire log (DROP, TRUNCATE, a DELETE/UPDATE with no WHERE) — are the one exception: refused unless N3FJP_ALLOW_DB_WIPE is on. This switch is separate from, and stricter than, the client's approval prompts, and carries a stern warning in the settings form. Back up your log before ever enabling it.

Wherever possible, n3fjp-mcp leans on N3FJP's own validation (it dupe-checks and reports oddities) and surfaces those responses rather than re-implementing them.

Remote / contest-station setups (N3FJP on another computer)

N3FJP runs only on Windows. If N3FJP runs on the same Windows computer as Claude Desktop, leave N3FJP_HOST at 127.0.0.1 and you are done. On a Mac, N3FJP is always elsewhere: in a Windows virtual machine (Parallels, VMware Fusion, UTM) or on a Windows PC on the LAN. A VM has its own network address, so it counts as a different computer and needs the bridge below.

If N3FJP runs on a different computer, there's a catch: a sandboxed MCP client (notably Claude Desktop) runs the connector so it can only reach 127.0.0.1, not LAN addresses — so putting N3FJP's LAN IP in the settings will time out even though telnet to that IP works. Fix it with the standalone mcp-host-bridge tool on the client computer, then set the host to 127.0.0.1:

pipx install mcp-host-bridge            # or download a binary from its releases
mcp-host-bridge install n3fjp --to 192.168.1.50   # knows n3fjp = port 1100; auto-starts

Manage it with mcp-host-bridge status n3fjp / uninstall n3fjp. Full details are in docs/REMOTE-HOST.md and the mcp-host-bridge README. The diagnostics tool helps confirm whether you need it. Keep the link on a trusted LAN — the API is unauthenticated.

Documentation

📻 A field-tested N3FJP API reference (free community resource)

Building this server meant reverse-engineering and live-verifying the N3FJP TCP API, including several places where today's API (v2.2) differs from the public 0.9 documentation. We've written that up as a complete, human-readable guide and are sharing it freely to give back to the community:

  • The N3FJP TCP API — A Field-Tested Reference (PDF) — transport, every command grouped by area, verified response examples, contest exchange fields, and a hard-won gotchas section (the API vs. networking ports, CMD_NOT_FOUND, commands removed since 0.9, the CALLTABEVENT lookup, and why ENTER can report 0 yet still log in networked mode).

  • Machine-readable spec — the same information in a terse, structured command catalog suitable for code generation.

Corrections and additions are welcome — please open an issue or PR.

Project docs

  • Install guide and Test plan.

  • Field Day 2026 lessons learned — the full after-action report from running an autonomous BPSK31 Field Day station (class 2A, callsigns anonymized) with n3fjp-mcp + fldigi-mcp: the operating loop, special cases encountered live, and recommended improvements.

Skills

The skills/ directory contains agent skills — operating procedures distilled from live on-air use — bundled with the repo and the .mcpb package:

  • contest-operating — the contest QSO state machine (CQ → exchange → TU → log), the special-case playbook (QRM, garbled callsigns, doubling, no-copy repeats, callsign-only callers), and the verified N3FJP logging sequence with its known quirks. Field-proven during ARRL Field Day 2026.

The Operating Skills Field Guide (PDF) documents this skill and its companions fldigi-operating and signal-hunting from the sibling fldigi-mcp — skills at a glance, installation, a plain-language "first session" chapter for hams new to Claude, the operating standard, the special-case playbook, and worked examples transcribed from ARRL Field Day 2026.

To use with Claude Code / Cowork, copy the skill directory into your ~/.claude/skills/ (or a project's .claude/skills/). Pair it with the fldigi-operating skill from fldigi-mcp for radio control.

Development

uv sync
uv run ruff check .      # lint
uv run pytest            # tests (no running N3FJP required)
python3 smoke_test.py 192.168.1.50 1100   # Phase 0: prove the link to N3FJP

The test suite covers the wire protocol, the operation maps and field catalog, type coercion, and the permission and database-wipe safety model; none of it requires a running N3FJP.

License

MIT © 2026 Stefan Brunner (AE5VG)

Available Tools

10 tools
bandmodeA

Change band, mode, and frequency before logging.

operations:

  • change_freq (value=Hz): set the frequency (and thus band) via the rig interface. Use suppress_mode_default=true to keep the current mode rather than letting CW/phone segments flip it.

  • set_band (value=band, e.g. "20"): write the band box (rig interface OFF only).

  • set_mode (value=mode, e.g. "DIG"): write the mode box (rig interface OFF only).

  • ignore_rig_polls (value=bool): pause rig polling so band/mode boxes can be written while a rig is connected. Remember to set it back to false.

Always make sure the program is on the correct band and mode before ENTER.

Inputs: operation (required), value, suppress_mode_default.

databaseA

Direct database operations on individual records.

These are ordinary writes (the Needs Approval tier — same as logging), so they can be globally allowed in the client for automation. The ONLY hard block is a whole-database wipe/overwrite, gated by N3FJP_ALLOW_DB_WIPE.

operations:

  • add_direct (fields={fldCall:..., fldBand:...}, exclude_dupes): insert a record directly, bypassing N3FJP's scoring. Prefer log's log_qso/ENTER.

  • delete (where="fldPrimaryID=123"): delete matching records. A missing or empty WHERE would clear the whole table and is refused unless N3FJP_ALLOW_DB_WIPE is on.

  • sql (sql="..."): run a raw SQL statement against the Access database. Only statements that could wipe/overwrite the whole database (DROP, TRUNCATE, unscoped DELETE/UPDATE) are refused unless N3FJP_ALLOW_DB_WIPE is on; scoped statements run normally.

  • checklog / openlog: ask N3FJP to reload new / all records.

  • sqlclose: close the SQL connection.

Inputs: operation (required), sql, where, fields, +1 more.

diagnosticsA
Read-only

Host + network diagnostics for troubleshooting connectivity.

Does NOT connect to N3FJP. Reports the resolved N3FJP_HOST/PORT, this process's Python and hostname, and the host's network interfaces — so you can tell whether the process can even see the target's network (e.g. when running host-side vs. sandboxed).

Inputs: no named parameters.

fieldsA
Read-only

Read entry-box (text field) values.

operations:

  • read (field=name): read one box. field may be a friendly name (call, rst_rcvd, class, section, name, …) or a raw control id (TXTENTRY…).

  • visible: every field the current contest shows, with values.

  • all: every field (regardless of visibility), with values.

Derived fields (country_worked, cq_zone, itu_zone, continent, prefix) are readable here but are computed by N3FJP from the call — never write them.

Inputs: operation (required), field.

logA

Logbook entry: set fields, run Call-tab, and ENTER a QSO. The headline tool.

operations:

  • log_qso: the automatic-logging flow. Provide call (and usually exchange, a dict of friendly field names → values, e.g. {"class": "2A", "section": "CT"}). Sets the call, runs CALLTAB (dupe check + lookups) unless calltab=false, sets the exchange, then ENTER. Returns the number of records added and any dupe response.

  • set (field, value): write one entry box.

  • set_many (fields={...}): write several entry boxes.

  • calltab: run CALLTAB (after setting the call).

  • enter: log the current form. Returns records_added plus a logged boolean derived from the QSO-count delta / ENTEREVENT — trust logged, not records_added, which can report 0 on success in networked mode. Do not retry when logged=true (creates duplicates).

  • clear: clear the entry form.

  • focus (field): move focus to a box (e.g. to auto-fill default RST).

Tip: contest (e.g. "field_day", "cq_wpx") lets the tool warn if the exchange is missing a field that contest needs.

Inputs: operation (required), call, field, value, +4 more.

n3fjp_callA

Escape hatch: send any raw N3FJP command and return the parsed reply.

command may be a bare command id ("PROGRAM"), a full envelope (""), or the inner form ("") — it is normalised and CRLF-terminated for you. expect is the response id to wait for.

This reaches anything not surfaced by a group tool, including newer commands. Like the group tools, it runs at the Needs Approval tier; the only hard block is a raw SQL statement that could wipe/overwrite the whole database, which still requires the N3FJP_ALLOW_DB_WIPE switch.

Inputs: command (required), expect.

notificationsA

Opt-in push events from N3FJP (field updates, enter/calltab, dupes).

operations:

  • enable: turn on all-field-update notifications.

  • disable: turn them off.

  • drain: return and clear the buffered notification blocks received so far.

MCP is request/response, so events are buffered and you pull them with drain rather than receiving a live stream.

Inputs: operation (required).

queryA
Read-only

Read-only program queries.

operations: program (name/version/API version), qso_count, next_serial, log_path, settings_path, shared_path, qso_rate (contest stats), band_mode_freq (current band/mode/frequency).

Inputs: operation (required).

statusA
Read-only

Snapshot: program, version, API version, QSO count, band/mode/frequency, log path.

A quick health check that also confirms the connection and which N3FJP program/contest is loaded.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have distinct purposes, but 'status' and 'query' both provide program information, causing slight overlap. Descriptions help disambiguate.

    Naming Consistency3/5

    Tool names are all lowercase and descriptive, but they lack a consistent pattern (e.g., 'bandmode' vs 'n3fjp_call', no verb_noun structure).

    Tool Count5/5

    10 tools cover the essential aspects of contest logging without being excessive or insufficient.

    Completeness5/5

    The surface is comprehensive: status, diagnostics, query, field reading, notifications, logging, band/mode control, search, direct database access, and a raw escape hatch cover all core needs.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      MCP server for HamQTH.com — callsign lookup, DX cluster spots, Reverse Beacon Network, DXCC resolution, and more through any MCP-compatible AI assistant.
      8
      126 PyPI
      GPL 3.0
    • A
      license
      A
      quality
      A
      maintenance
      MCP server for QRZ.com — callsign lookups, DXCC entity resolution, and logbook queries through any MCP-compatible AI assistant.
      6
      269 PyPI
      4
      GPL 3.0
    • A
      license
      A
      quality
      A
      maintenance
      MCP server for ARRL Logbook of The World (LoTW) that enables querying confirmations, uploaded QSOs, DXCC credits, and user activity through any MCP-compatible AI assistant. Part of the qso-graph project, it is read-only and requires LoTW credentials for authenticated tools.
      6
      75 PyPI
      1
      GPL 3.0
    • A
      license
      C
      quality
      B
      maintenance
      Enables MCP clients like Claude Desktop to control the fldigi amateur radio digital modem application, including modem, rig, log, and transmit functions, with a callsign-based transmit safety gate.
      22
      37 PyPI
      GPL 3.0