Using Model Context Protocol (MCP) Tools to Integrate With MPLAB® Code Configurator (MCC)
About MCP Tools
Model Context Protocol (MCP) tools for MPLAB® Code Configurator (MCC) enable a Large Language Model (LLM) to interact programmatically with MCC to configure peripherals, middleware and drivers in an automated, repeatable way.
This extension provides a set of MCP tools that allow AI coding assistants like Claude®, GitHub® Copilot, and MPLAB AI Coding Assistant to:
- Build and program MPLAB for VS Code® projects
- Discover and add MCC components
- Configure peripheral symbols and settings
- Generate initialization code
Supported MCP Tools
| Tool Name | Purpose | Category |
|---|---|---|
| MPLAB Tools | ||
| mplab_build_project | Builds and compiles the project | Build |
| mplab_program_device | Programs the target device using the connected programmer/debugger | Programming |
| mplab_detect_connected_tools | Detects connected hardware programmers, debuggers, and development kits | Hardware |
| mplab_project_info | Returns project details, configurations, and optional diagnostics | Project information |
| MCC Tools | ||
| mcc_get_rules | Returns MCC configuration rules and workflow guidance | Workflow |
| mcc_get_peripheral_guide | Returns MCC configuration for middleware modules | MCC configuration |
| mcc_config_get_components | Returns the list of components/peripherals in the MCC configuration | MCC configuration |
| mcc_component | Adds or removes a peripheral/component instance in the current MCC config | MCC configuration |
| mcc_config_get_symbols_info | Returns symbol metadata (names, types, valid ranges, defaults) for a component | MCC symbols |
| mcc_symbol_values | Gets, sets, or clears symbol values for an MCC component | MCC symbols |
| mcc_wire_components | Connects or disconnects dependencies between MCC components | MCC configuration |
| mcc_generate_code | Generates code for the opened MCC configuration | Code generation |
Support Scope and Limitations
| Support Limitation | Description |
|---|---|
| Content Scope | Restricted to MPLAB Harmony only |
| Device Support Scope | Limited to Arm® Cortex® 32-bit MCU devices |
| Feature Support Scope | TrustZone® technology-like advanced options are not supported Limited to peripheral driver configuration only |
Installation
Follow these steps in the order outlined to install MCP tools for MCC.
Installation Prerequisites
Install Microsoft® VS Code.
Install MPLAB Extensions for VS Code from the VS Code Marketplace.
Installing MCP Tools for MCC
Launch VS Code.
Go to the Extensions view (Ctrl + Shift + X).
Search for MPLAB MCP Tools.
Click Install.
Activating MCP Server
After installation, the MCP server starts automatically.
Confirm successful installation by verifying this notification is present at the bottom right of VS Code:

Open an MPLAB Harmony-based project in VS Code.
Configuring AI Assistant
Claude Code®
In Claude Code®, the MCP server is automatically registered.
Restart Claude Code or reconnect to refresh the available MCP tools.

MPLAB AI Coding Assistant
If the server does not initially connect after restarting the MPLAB AI Coding Assistant extension, try the Reload button.


GitHub® Copilot
GitHub Copilot with MCP support will automatically detect the MCP server when successfully configured.
Ensure you have the latest version of GitHub Copilot that supports MCP tools.
Updating the MCP Server Port
If the default port (7777) is occupied by another application, change the MCP server port:
Click Ctrl + Shift + P and run MPLAB MCP Tools: Open Configuration. Alternatively, click on the MCP Server Status indicator in the VS Code status bar at the bottom.
In the MCP Server Status section, locate the Port field.
Enter a new port number (for example: 5847).
Click the Apply button to run the server on the new port.
The server will restart on the new port, shown as: Running on localhost: <new-port>/mcp.