PPK2 MCP Server

PPK2 MCP Server

Enables MCP clients to control a Nordic PPK2 for power profiling: configure source/measurement modes, set voltage, power DUT, measure current/power/energy, and capture logic channels.

Category
访问服务器

README

PPK2 MCP server

A Model Context Protocol (stdio) server that lets an MCP client — Claude Code, Claude Desktop, Cursor — drive a Nordic Power Profiler Kit II (PPK2) over its USB serial port: set mode/voltage, power a device-under-test (DUT), measure current/power/energy, and capture the 8 digital channels as a logic analyser.

The server holds the serial port open for its whole lifetime and serialises every tool call behind one lock, so it is the single owner of the PPK2 — the client talks to the device only through these tools.

Requirements

  • A PPK2 connected over USB
  • uv (the installer below will fetch it if missing)
  • Python ≥ 3.10 (uv will fetch one if needed)
  • Claude Code CLI (optional, for auto-registration)

One-shot install

git clone https://github.com/zhixuan2333/PPK2-MCP && cd PPK2-MCP
./install.sh          # installs uv, syncs deps, registers the MCP server
./install.sh --run    # ...and immediately launches Claude with a test prompt

install.sh registers the ppk2 server with the Claude Code CLI (claude mcp add, user scope). The serial port is autodetected — no path to configure. Then in Claude:

Use the ppk2 MCP tools to check the PPK2: call ppk2_status, then configure source mode at 3.3V, power the DUT on, measure current for 2 seconds, capture the logic channels for 1 second, and finally power off and disconnect.

Manual setup

uv sync     # create .venv and install dependencies from uv.lock

Run the server standalone (speaks MCP over stdio, so this is mostly a smoke test — Ctrl-C to exit). The PPK2 port is autodetected; override with PPK2_PORT if needed:

uv run ppk2_mcp_server.py
# or pin a port:  PPK2_PORT=/dev/cu.usbmodemXXXX uv run ppk2_mcp_server.py

.mcp.json in this repo also registers the server for any Claude Code session opened in this directory (autodetected port, no edits needed). Approve the project server (or run /mcp) and confirm it shows connected.

Tools

Tool What it does
ppk2_status Connection state, mode, voltage, DUT power, available ports. Never opens the port.
ppk2_configure Open the port, read calibration, set meter mode (ampere/source) + voltage.
ppk2_power Turn DUT power output ON/OFF.
ppk2_measure Sample current for N seconds → summary stats (current/power/charge/energy).
ppk2_logic Capture the 8 digital channels (D0–D7) → per-channel duty, edges, activity.
ppk2_disconnect Release the serial port.

Modes

  • ampere — the PPK2 measures current drawn from an external supply (it does not power the DUT). voltage_mv is still used for the gain/offset calibration, so set it to your external rail voltage.
  • source — the PPK2 sources voltage_mv to the DUT and measures the current it draws. Use ppk2_power("ON") to enable the output rail.

Serial port resolution

First match wins: a tool's explicit port arg → PPK2_PORT env var → autodetection via ppk2_api.list_devices().

Notes

  • A serial line has a single owner — only one process can hold the PPK2 at a time. Stop other PPK2 tools (e.g. nRF Connect Power Profiler) before using this.
  • Unconnected digital pins float and read a constant/noisy level; drive them from your DUT to see real logic activity.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选