Skip to main content

An MCP server for logging amateur-radio QSOs to N3FJP logging software over its TCP API.

Project description

contest-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. contest-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.1). 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.

The project is named contest-mcp (not "n3fjp-mcp") to avoid any conflict with the N3FJP name and callsign. It is an independent project and is not affiliated with or endorsed by Affirmatech / N3FJP.

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) plus 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) default to Needs Approval.
    • Destructive operations (add-direct, delete a record, raw SQL) additionally require confirm=true.
    • 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 contest-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/contest-mcp.git
cd contest-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/contest-mcp", "run", "contest-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/contest_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
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 + confirm add_direct, delete, raw sql, checklog, openlog, sqlclose
n3fjp_call approval + confirm escape hatch — send any raw command, incl. future ones

The headline is loglog_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 (log, bandmode, notifications) default to Needs Approval; the client asks before each one.
  • Destructive operations in database (add-direct, delete a record, raw SQL) and any state-changing n3fjp_call additionally require confirm=true.
  • Whole-database operations — raw SQL that could delete or overwrite the entire log (DROP, TRUNCATE, a DELETE/UPDATE with no WHERE) — are 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, contest-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 need not run on the same machine. Point the server at it with N3FJP_HOST/N3FJP_PORT. Keep the link on a trusted LAN — the API is unauthenticated.

Documentation

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/confirm safety model; none of it requires a running N3FJP.

License

MIT © 2026 Stefan Brunner (AE5VG)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contest_mcp-0.1.0.tar.gz (228.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contest_mcp-0.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file contest_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: contest_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 228.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for contest_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bfe3746c37eec17d37d0c62a97068a837ef49079848b5376e5fdf66cc6fbd4c3
MD5 fcea2c8254b4f96e0a1a85261ce3392d
BLAKE2b-256 17c308f6df0447d1c64cf049eec24d5b9cf9414ef55a06e716e0a424cfcef0fd

See more details on using hashes here.

File details

Details for the file contest_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: contest_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for contest_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b39c55a4ac68714f4cef362d7d9b2138e99dc686a4b661117eb92f5b0b1dbdc2
MD5 5d6031872d4ad7d559e0401fefbd601f
BLAKE2b-256 00bfc7c0913669eda72b68af9897822c9b7710016791a4859bc78ee19d1212d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page