Skip to main content

carrot-mcp-nfc

Carrot MCP NFC Server — wraps nfcscript for NFC reader communication via MCP.

Tools

Tool Description
version Get server version info
list_readers List available reader types and transports
connect Connect to NFC reader (port, reader_type, transport)
disconnect Disconnect from reader
active Find and activate an NFC card (returns uid, atq, sak)
transceive Raw frame exchange with bit-level control (InCommunicateThru)
reqa ISO14443-A REQA (7-bit short frame)
wupa ISO14443-A WUPA (7-bit short frame)
halt ISO14443-A HALT
field_on / field_off Control RF field
script Execute a sequence of NFC operations (see below)
trace_get Get trace log entries (supports layer/direction filtering)
trace_clear Clear trace log buffer

Supported Readers

  • pn532 — PN532 HSU (default)
  • clrc663 — CLRC663 UART

Use list_readers to see all registered types at runtime.

Supported Transports

  • serial — Serial/UART (default)

Use list_readers to see all registered types at runtime.

Usage

uv run carrot-mcp nfc

Script Tool

script executes a sequence of NFC operations. Each step is a dict with an op field:

Op Params Description
transceive data (hex), tx_crc?, rx_crc?, last_tx_bits? Raw frame exchange
active low_level? (bool) Find and activate card
reqa — REQA (7-bit short frame)
wupa — WUPA (7-bit short frame)
halt — HALT command
field_on — Turn on RF field
field_off — Turn off RF field
wait ms (int) Wait for N milliseconds

Expect Matching

Data ops (transceive, active, reqa, wupa) support expect, expect_bits, and on_mismatch:

[
  {"op": "transceive", "data": "26", "last_tx_bits": 7, "expect": "0A", "expect_bits": 4, "on_mismatch": "stop"}
]
  • expect (hex): Expected response data for matching (case-insensitive).
  • expect_bits: Number of valid bits in the last byte (1-8). Only the lower N bits of the last byte are compared; upper bits are treated as 0. Useful for 4-bit ACK/NAK responses.
  • on_mismatch: "stop" (default) aborts the script on mismatch; "continue" logs the mismatch but proceeds.

The script stops on the first error or on_mismatch: "stop".

Example MCP Call Sequence

list_readers()
connect(port="COM20", reader_type="pn532")
active()
transceive(data="6007", last_tx_bits=7, tx_crc=false, rx_crc=false)
reqa()
wupa()
halt()
field_off()
trace_get()
trace_clear()
disconnect()

Metadata

Release files for carrot-mcp-nfc 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for carrot-mcp-nfc 0.2.2
File Size Uploaded Provenance Actions
carrot_mcp_nfc-0.2.2.tar.gz 5.3 kB Without provenance Details for carrot_mcp_nfc-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for carrot-mcp-nfc 0.2.2
File Interpreter ABI Platform Actions
carrot_mcp_nfc-0.2.2-py3-none-any.whl Python 3 none any Details for carrot_mcp_nfc-0.2.2-py3-none-any.whl

Total release size: 11.9 kB

Release files / carrot_mcp_nfc-0.2.2.tar.gz

Download URL carrot_mcp_nfc-0.2.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
37524f14980a32d0c7a645ac7c275a81e643994827b0d328723df89de42e7289
BLAKE2b-256 checksum
How to use checksums
2120d5c09005c9d35acbbc8120fdd39b074c77b4dcde6e4c57860602dfbd59c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / carrot_mcp_nfc-0.2.2-py3-none-any.whl

Download URL carrot_mcp_nfc-0.2.2-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df2e77b703ef60058c8166af6df23a6ce07970e703592ca7d71720ec84ef85e6
BLAKE2b-256 checksum
How to use checksums
655ceeba04ec5e71e4ca1dd8b8924ddb53052973b353ef0c8a80bce833bd1fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for carrot-mcp-nfc 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page