Build an AI Studio plugin

A plugin is a folder with a plugin.json. It can give the AI tools (an MCP server), knowledge (skills and prompts), and UI (a panel beside the app, buttons on the chat). Plugins are plain files: no build step, no SDK to install.

What a plugin can add

PieceIn plugin.jsonWhat it does
Prompt and skillsprompt, skillsText added to the AI's instructions; skill folders the AI loads when a task matches.
Chat modeschatModesButtons under the chat box that send the next message with extra instructions.
ToolsmcpAn MCP server, hosted or started locally. Its tools go to Claude and Codex.
PanelpaneAn HTML page in a side panel, talking to AI Studio through the aistudio bridge.
Panel toolspanelToolsTools the AI calls in your panel, answered by your page: the AI reads and changes what the panel shows.
Sign-inauthAn API key or OAuth sign-in to your service, stored by AI Studio, passed to your tools and panel.

Use any subset. A plugin with only a prompt is valid; so is one with only an MCP server.

A first plugin

Three files: the manifest, a panel, an icon.

hello/
  plugin.json
  icon.svg
  pane/index.html
{
  "id": "you.hello",
  "name": "Hello",
  "version": "0.1.0",
  "aistudio": "^1.0",
  "about": "Says hello, and asks the AI about the open project.",
  "icon": "icon.svg",
  "pane": { "title": "Hello", "entry": "pane/index.html", "side": "right" },
  "permissions": ["chat:send"]
}
<!doctype html>
<link rel="stylesheet" href="/aistudio/plugin.css">
<script src="/aistudio/plugin.js"></script>
<h1>Hello</h1>
<p id="project" class="note"></p>
<button class="btn primary" id="ask">Ask the AI about this project</button>
<script>
  aistudio.ready().then(({ project }) => {
    document.getElementById('project').textContent = project ? project.name : 'No project open';
  });
  document.getElementById('ask').onclick = () =>
    aistudio.chat.send('Summarise what this project does in three sentences.');
</script>

/aistudio/plugin.js and /aistudio/plugin.css are served to every panel by AI Studio: the bridge and the app's look (it follows the user's theme and dark mode).

Load it while you work

  1. In AI Studio, open the Plugins tab (beside the chat).
  2. Open Add a plugin that is not in the list, then Load a folder, and pick hello/.
  3. Turn it on. AI Studio lists what it asks for (permissions) before it runs.

A loaded folder reloads when you save a file in it. Errors and aistudio.log() output show in the plugin's Log, in the Plugins tab.

Start from the sample

The sample plugin is a Notes plugin that uses most of the API: a panel with per-project storage, a local MCP server the AI uses to read and add notes (sharing the panel's storage file), a prompt, and a chat mode. Rename yourname.notes and change it.

Next