nrf-mcp
v1.0.3
Published
MCP server for nRF54L15DK — build, flash, and read logs via Claude or any MCP client
Maintainers
Readme
nrf-mcp
MCP server for nRF54L15DK — lets Claude (or any MCP client) build, flash, and read logs from nRF boards directly.
What it does
| Tool | Description |
|------|-------------|
| build | Run west build with auto board detection |
| flash | Run west flash, optionally build first, supports multi-board via --snr |
| read_uart_logs | Stream UART logs from the board for N seconds |
| reset_board | Hard reset via nrfjprog |
| list_boards | List connected J-Link boards and serial ports |
| get_build_info | Read build_info.yml and .vscode-nrf-connect.json from a build dir |
Prerequisites
- nRF Connect SDK installed
- J-Link tools for flash/reset
- Node.js >= 18
Installation
npm install -g nrf-mcpOr run directly without installing:
npx nrf-mcpClaude Code setup
claude mcp add nrf -- npx nrf-mcpWith custom toolchain path:
claude mcp add nrf -e NRF_TOOLCHAIN=/path/to/toolchain -e NRF_SDK=/path/to/sdk -- npx nrf-mcpClaude Desktop setup
Add to claude_desktop_config.json:
{
"mcpServers": {
"nrf": {
"command": "npx",
"args": ["nrf-mcp"],
"env": {
"NRF_TOOLCHAIN": "/path/to/ncs/toolchains/<hash>",
"NRF_SDK": "/path/to/ncs/v2.x.x"
}
}
}
}Environment variables
| Variable | Description | Default |
|----------|-------------|---------|
| NRF_TOOLCHAIN | Path to nRF managed toolchain | Auto-detected from ~/ncs/toolchains/ |
| NRF_SDK | Path to nRF Connect SDK | Auto-detected from ~/ncs/v*/ |
| NRF_WEST | Path to west binary | $NRF_TOOLCHAIN/bin/west |
| NRFJPROG | Path to nrfjprog binary | $NRF_TOOLCHAIN/bin/nrfjprog |
| JLINK_DIR | Path to J-Link installation | /opt/SEGGER/JLink |
Auto-detection
If NRF_TOOLCHAIN and NRF_SDK are not set, the server auto-detects them from:
- Toolchain: newest entry in
~/ncs/toolchains/that containsbin/west - SDK: newest versioned directory in
~/ncs/v*/that containszephyr/
This works out of the box for standard nRF Connect SDK installations.
Example usage
Once connected, ask Claude:
"Build the peripheral firmware in
/path/to/my-sample/peripheral"
"Flash the ble_long_range peripheral sample"
"Show me the UART logs from the board for 10 seconds"
"What boards are connected?"
Board target auto-detection
The server reads .vscode-nrf-connect.json from the sample's build/ directory to determine the board target automatically — the same config VS Code uses. No need to specify the board manually if you've built with VS Code before.
License
MIT
