Getting Started With MPLAB® AI Coding Assistant

Last modified by Microchip on 2025/10/14 15:36

Downloading and Installing the MPLAB® AI Coding Assistant Extension

Before you begin, ensure you have downloaded Microsoft® Visual Studio Code (VS Code®).

Download the MPLAB Extension Pack from the VS Code Marketplace page for MPLAB extensions. The MPLAB AI Coding Assistant is included in this extension pack.

Applying the API Key

Microchip will provide free access to Large Language Models (LLM) - the Microchip Chatbot.

Log into myMicrochip and obtain your Application Programming Interface (API) key. Use your myMicrochip login credentials to sign in. You will not be asked to sign in again once you are signed in.

Sign In Screen

Back to Top


 A terms and conditions window will appear. Select I Agree.

Terms and Conditions

Back to Top


Select Copy Access Key underneath the unique key that has been generated for you.

Microchip Chatbot Access Key

Back to Top


Go back to VS Code and paste the key under API key, then click Connect.

API Key

You have now successfully installed the plug-in. The chatbot will by default appear to the left and a quick tutorial on getting started will appear at the top.

To begin communicating with the chatbot type in "Hello".

Back to Top

Enabling and Disabling Autocomplete

On the bottom leftmost corner of the window, you will see the Autocomplete icon.​​​​Autocomplete

Back to Top


Enable or disable the feature by clicking on the Autocomplete icon and making the selection you want.

Back to Top

Common Features

Agent

This feature allows you to automate actions using the built-in filesystem and Model Context Protocol (MCP) tools.

Agent

MCP Server

The MCP Server provides tools to list example projects and evaluation boards supported for a given device, as well as:

  • Data sheets
  • Evaluation board user guides
  • Compiler user guides
  • Microchip Developer Help videos

These are some suggested usage prompts to invoke these tools. Provide complete device names for optimal responses.

  • From the ATtiny817 data sheet, show adc block diagram
  • From the ATtiny817 Xmini eval kit user guide, tell me about mEDBG
  • From the ATtiny817 Compiler guide, what is pragma
  • List example projects for ATtiny817 using touch
  • List eval boards supported by ATtiny817
  • List videos related to advanced MPLAB debugging
Information

Note: Device names are not needed for video search.

MCP Configuration

This MCP server is already included by default in MPLAB AI Coding Assistant. Use this configuration to use mplab-docs MCP server in any other AI coding assistant:

{
  "mcpServers": {
    "mplab-docs": {
      "type": "streamable-http",
      "url": "https://ai.microchip.com/tools/mplabdocs/mcp",
      "headers": {
        "api-key": "your api key"
      }
    }
  }
}

Server

Autocomplete

Receive inline code suggestions as you type. Click Tab to accept the suggestion.

Autocomplete gif

Chat

Ask Microchip-specific questions as you code from the sidebar without leaving the editor. Use CTRL+L to copy code into the chat window.

Chat gif

Folder - @folder

Query a specific folder. Before using this command, ensure that codebase indexing is complete.

Folder gif

Inline Edit

Use inline suggestions within code by using CTRL+I.

Inline Edit gif

Terminal - @terminal

Fix errors reported in the terminal.

Terminal gif

Codebase - @codebase

Query the entire codebase. Before using this command, ensure that codebase indexing is complete.

Codebase gif

Back to Top

Troubleshooting

Contact Microchip Technical Support for assistance.

Back to Top