Skip to main content
Glama
wocessade

pm3-mcp-server

by wocessade

pm3-mcp-server

一个以 Windows 为先的 Model Context Protocol 服务器,封装了 Proxmark3 Iceman/RRG CLI,用于 MIFARE Classic 工作流。

并非原始的 1:1 CLI 透传:核心路径是魔法安全写入 — 检测卡片代次 → 路由到正确的写入命令 → 验证 → 静默失败时回退。

仅限授权使用。 仅可对您拥有或已获明确测试许可的卡片和系统使用。魔法卡写入和 UID 更改具有不可逆的故障模式(例如 Gen3 冻结)。

要求

  • 已安装并刷写好的 Windows + Proxmark3 Iceman 客户端(proxmark3.exe

  • Python 3.10+

  • 可访问设备的串口(请在同一 COM 口上同时运行官方 Proxmark GUI)

Related MCP server: PCILeech MCP Server

配置

变量

含义

PM3_EXE_PATH

proxmark3.exe 的绝对路径(必填

PM3_CWD

字典/相对路径的工作目录(默认为 exe 所在目录)

PM3_PORT

串口(默认 COM3

PM3_TIMEOUT_SEC

命令超时时间(默认 30,硬上限 120

PM3_KEYS_FILE

keys.local.json 的可选路径

复制 keys.local.json.examplekeys.local.json 以配置站点密钥(已被 gitignore 忽略)。服务器仅向 LLM 报告密钥数量,绝不会报告密钥列表。

供应商捆绑包文件夹标签(例如 V9.0.6.7)仅为标签。实际客户端版本来自 pm3_info / proxmark3.exe --version(例如 Iceman v4.20142)。此服务器刷写固件。

设置

git clone https://github.com/wocessade/pm3-mcp-server.git
cd pm3-mcp-server
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
pytest -q

对客户端进行冒烟检查(无需卡片):

& $env:PM3_EXE_PATH --version

运行

$env:PM3_EXE_PATH = "C:\path\to\proxmark3.exe"
$env:PM3_CWD = "C:\path\to\proxmark3"
$env:PM3_PORT = "COM3"
python server.py

Cursor / Claude MCP 代码片段

{
  "mcpServers": {
    "pm3": {
      "command": "python",
      "args": ["C:\\path\\to\\pm3-mcp-server\\server.py"],
      "env": {
        "PM3_EXE_PATH": "C:\\path\\to\\proxmark3.exe",
        "PM3_CWD": "C:\\path\\to\\proxmark3",
        "PM3_PORT": "COM3"
      }
    }
  }
}

如果您在 venv 中安装了依赖项,请优先使用 venv 解释器:

"command": "C:\\path\\to\\pm3-mcp-server\\.venv\\Scripts\\python.exe"

工具接口

主要(优先使用这些)

工具

作用

pm3_info

hf mf info(+ 回退 hf 14a info);UID/ATQA/SAK/card_type + 客户端版本

pm3_dump

扇区转储 + 密钥摘要

pm3_write_magic_safe

自动写入路由 + 写入后魔法验证

pm3_access_decode

本地 trailer / FF078069 访问位解码

pm3_get_card_knowledge

用于上下文的魔法分类片段

高级(仅在主要工具不足时使用):pm3_detect_magicpm3_try_keyspm3_read_blockpm3_read_sectorpm3_write_blockpm3_set_uid

魔法写入分类

代次

写入

验证

绝不自动

Gen1a/1b

csetblk / csetuid(可选 csetblk --gdm = 仅 Gen1a 唤醒)

cgetblk

gen3freezegdmsetcfg

Gen2 / CUID

wrbl(block0 使用 --force

rdbl

相同

Gen3

gen3uid / gen3blk

gen3/info 路径

gen3freeze不是 csetblk --gdm

Gen4 GDM

gdmsetblk(然后是 csetblk --gdm 变体)

魔法读取

gdmsetcfg

面向设备的响应包含 _raw(截断),以便优雅地解析回退。

测试

pytest -q

涵盖解析器夹具、访问位(FF078069)、写入路由器(Gen3 ≠ --gdm)和客户端验证(注入/白名单/批大小)。

真实硬件说明

  • pm3_info / 写入工具之前,请将卡片放在天线上。

  • 无卡片 → ok: falsereason: "no_card"(无重试循环)。

  • Gen4 GDM:对 trailer 执行 wrbl 可能会在吞掉数据的同时报告成功 — pm3_write_magic_safe 会进行验证并回退。

  • 固件刷写不在范围内。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to perform DMA-based memory operations through PCILeech hardware using natural language commands, supporting memory reading, writing, and multi-format visualization for debugging and security research.
    20
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to communicate with UART/serial devices, offering tools for port management, data read/write, and protocol handling.
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wocessade/pm3-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server