The nrf-mcp server provides tools to browse, search, and analyze the Nordic nRF Connect SDK repository, enabling AI-assisted embedded/IoT development for Nordic hardware.
nrf_list— List files and directories at any path in the SDK repo, with recursive tree view support (up to depth 3)nrf_read— Read contents of any text file (.rstdocs,.c/.hsource,CMakeLists.txt,prj.conf,Kconfig, YAML, etc.), with line range support and auto-truncation for large filesnrf_search— Search across the SDK using GitHub code search with qualifiers (e.g.,path:,extension:) to find code snippets or documentation, with pagination supportnrf_diff— Compare a file between two SDK versions (tags, branches, or SHAs) and view a unified diffnrf_kconfig— Look up aCONFIG_*symbol to retrieve its Kconfig definition, type, default values, and dependencies
The server supports targeting specific SDK versions (defaults to main) and caches responses for performance. It covers documentation, samples (Bluetooth, cellular, Matter, NFC, cryptography, TF-M), libraries, and applications.
Provides tools to browse documentation, list files, and search code within the nRF Connect SDK (sdk-nrf) repository on GitHub.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nrf-mcpfind the peripheral_hr sample and show me its main.c"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nrf-mcp
MCP server for Nordic nRF Connect SDK development. Provides Claude with tools to browse documentation and sample code from the nrfconnect/sdk-nrf repository.
Tools
Tool | Description |
| List files and directories at a given path (includes file sizes). Supports recursive tree view with |
| Read a file's contents ( |
| Search across the repo using GitHub code search with qualifier support. Returns context snippets and supports pagination |
| Compare a file between two SDK versions (tags, branches, or SHAs). Returns a unified diff |
| Look up a |
Search examples
# Find all uses of a symbol
DFU_TARGET_IMAGE_TYPE_ANY
# Search docs only
FOTA path:doc/nrf
# Search samples only
peripheral_hr path:samples
# Filter by file type
CONFIG_BT_PERIPHERAL extension:conf
bt_le_adv_start extension:cRecursive directory listing
Use depth to get a full project overview in one call:
{ "path": "samples/bluetooth/central_bas", "depth": 2 }Reading specific line ranges
When working with large files, use startLine and endLine to read just the relevant section:
{ "path": "samples/bluetooth/central_bas/src/main.c", "startLine": 1, "endLine": 50 }Paginating search results
Search returns up to 20 results per page. Use the page parameter to fetch more:
{ "query": "bt_le_adv_start extension:c", "page": 2 }Comparing SDK versions
See what changed in a file between releases:
{ "path": "samples/bluetooth/central_bas/src/main.c", "fromRef": "v3.0.0", "toRef": "v3.2.4" }Kconfig symbol lookup
Look up what a prj.conf option does:
{ "symbol": "CONFIG_BT_PERIPHERAL" }Setup
Prerequisites
Node.js 18+
GitHub CLI (
gh) authenticated — used to supply a GitHub token at runtime
Install and build
npm install
npm run buildRegister with Claude Code
claude mcp add -s user nrf-mcp -- /path/to/nrf-mcp/run.shRegister with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nrf-mcp": {
"command": "/path/to/nrf-mcp/run.sh",
"args": []
}
}
}Then restart Claude Desktop.
The run.sh wrapper fetches a fresh token from gh auth token each time the server starts, so no token is ever hardcoded.
Configuration
Variable | Default | Description |
|
| SDK version to target — any git ref (tag, branch, commit SHA) |
| GitHub API token; set explicitly to bypass the |
To target a different SDK version, set the env var in the MCP registration:
claude mcp remove nrf-mcp
claude mcp add -s user -e NRF_SDK_REF=v3.2.4 nrf-mcp -- /path/to/nrf-mcp/run.shRebuild after changes
npm run buildDuring development, use npm run watch to recompile automatically on save.
Testing
Run the end-to-end test suite (requires gh to be authenticated):
npm testThe tests spawn the server via run.sh, exercise all five tools (including recursive listing, line ranges, pagination, snippets, diff, Kconfig lookup, and error handling), and validate input error handling.
Troubleshooting
gh: command not found or empty token
The run.sh script fetches a token via gh auth token. Make sure the GitHub CLI is installed and you are logged in:
gh auth login
gh auth token # should print a tokenGitHub API 401 errors
nrf_search requires authentication. If the token is missing or expired, re-authenticate with gh auth login. For Claude Desktop, ensure run.sh is executable (chmod +x run.sh) — it prepends the Homebrew bin path to find gh.
GitHub rate limit exceeded
Unauthenticated requests are limited to 60/hour. With a valid GITHUB_TOKEN the limit is 5 000/hour. The server automatically retries on rate-limit errors with backoff (up to 30s). Ensure gh auth token returns a token and that run.sh is being used (not node dist/index.js directly).
Tools not appearing in Claude
Claude Code: run
claude mcp listto confirmnrf-mcpis registered, then restart the session.Claude Desktop: restart the app after editing
claude_desktop_config.json. Check the Desktop developer console for MCP startup errors.
Stale results Directory listings and file contents are cached in memory for 5 minutes to reduce API calls. Restart the server to clear the cache.
Wrong SDK version
Confirm the active ref with echo $NRF_SDK_REF in the same shell, or check what's registered:
claude mcp list # shows the -e env vars set at registration timeTo change it, remove and re-add the registration with the new -e NRF_SDK_REF= value.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.