Using Model Context Protocol (MCP) Tools to Integrate With MPLAB® Code Configurator (MCC)

Last modified by Microchip on 2026/10/15 08:38

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 NamePurposeCategory
MPLAB Tools
mplab_build_projectBuilds and compiles the projectBuild
mplab_program_devicePrograms the target device using the connected programmer/debuggerProgramming
mplab_detect_connected_toolsDetects connected hardware programmers, debuggers, and development kitsHardware
mplab_project_infoReturns project details, configurations, and optional diagnosticsProject information
MCC Tools
mcc_get_rulesReturns MCC configuration rules and workflow guidanceWorkflow
mcc_get_peripheral_guideReturns MCC configuration for middleware modulesMCC configuration
mcc_config_get_componentsReturns the list of components/peripherals in the MCC configurationMCC configuration
mcc_componentAdds or removes a peripheral/component instance in the current MCC configMCC configuration
mcc_config_get_symbols_info

Returns symbol metadata (names, types, valid ranges, defaults) for a component

MCC symbols
mcc_symbol_valuesGets, sets, or clears symbol values for an MCC componentMCC symbols
mcc_wire_componentsConnects or disconnects dependencies between MCC componentsMCC configuration
mcc_generate_codeGenerates code for the opened MCC configurationCode generation

Support Scope and Limitations

Support LimitationDescription
Content ScopeRestricted to MPLAB Harmony only 
Device Support ScopeLimited 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 MPLAB Extensions for VS Code from the VS Code Marketplace.

Information

Note: Ensure only one instance of VS Code is open. Ensure only one project is loaded when configuring using MCP tools.

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:

VS Code notifications


Open an MPLAB Harmony-based project in VS Code.

Back to Top

Configuring AI Assistant

Claude Code®

In Claude Code®, the MCP server is automatically registered.

Information

Note: If you need to add it manually, run the following command:

claude mcp add --transport http mplab-mcc http://localhost:7777/mcp --scope user

Restart Claude Code or reconnect to refresh the available MCP tools.

Claude Config gif

MPLAB AI Coding Assistant

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

AI Assistant Config gif

AI Assistant Config gif

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. 

Back to Top

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.

Information

Note: Ensure the new port is not in use by another service.

MCP Port Config gif​​​​​​

Back to Top