Skip to main content

AI assistance and MCP

The extension provides a generated AVstudio guide and a local Model Context Protocol (MCP) server. These give a compatible coding assistant information about the project's data model and current editor state.

Skill and MCP have different roles​

CapabilityWhat it providesWhat it does not prove
avstudio-guide skillFile layout, supported properties, schemas, and editing rules.That an assistant has read it or is connected to the editor.
AVstudio MCP serverCurrent project context, diagnostics, icon tools, and allowlisted editor operations.That generated changes are correct or tested on hardware.
Assistant's file toolsRead and edit the project's source files when the client allows it.That every proposed JSON key is supported by NG.

You can ask an assistant with local file access to use the guide without MCP. MCP adds live editor context and tools; it is not required for manually using the NG extension. Automatic skill discovery and MCP support depend on the assistant client.

Generate the project guide​

New 27.0.29 projects include three bundled skill families. Run Generate AVStudio skill to regenerate them under workspace-root .agents/skills/: avstudio-guide for the project model and editor workflows, avstudio-custom-element for HTML component contracts/adapters, and avstudio-import-legacy for staged legacy-build conversion. Regeneration can overwrite generated files; preserve local edits first.

The guide covers pages, elements, layouts, actions, variables, connectors, datasources, functions, and icons. Ask your assistant to read it before editing project files.

Generate and inspect the skill in VS Code​

  1. Open the workspace folder containing your AVstudio project.
  2. Press Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux.
  3. Search for Generate AVStudio skill and select the AVstudio command.

Command Palette showing AVstudio: Generate AVStudio skill in the demo project

  1. Wait for the success notification. Read the reported file count for your installed release. The existing capture is from an earlier release; 27.0.29 generates multiple skill families rather than only the original guide.

VS Code notification confirming AVStudio skill generated, 15 files

  1. In Explorer, open .agents/skills/avstudio-guide/SKILL.md. The folder includes the skill, its references folder, and generation metadata.

Generated avstudio-guide folder and SKILL.md preview in VS Code

This is a workspace-local guide. Automatic skill discovery depends on the assistant you use. If it does not discover the guide, explicitly ask it to read .agents/skills/avstudio-guide/SKILL.md and the references relevant to the task. The skill supplies instructions; MCP supplies live editor context and tools.

For example: “Read the AVstudio skill in this workspace. Add a volume Slider to the start page using the existing theme. Use only supported properties and explain which action and feedback bindings still need configuration.”

Keep the guide matched to NG​

Read SKILL.md first, then load only the reference files relevant to the task. For example, a datasource-driven Subpage List needs the element, datasource, and parameter references; an action change needs the actions reference.

After an extension update, review whether the generated guide needs refreshing. Regeneration can replace local edits, so keep project-specific conventions in a separate team document or preserve them before running the command. The generated guide is local documentation, not a download or installation of an AI model.

Configure MCP​

You can start setup from the AVstudio MCP status-bar control. When its server is running, choose Copy setup prompt; the same menu offers Restart server, Show log, and Open MCP settings.

Running AVstudio MCP menu offering Copy setup prompt, Restart server, Show log, and Open MCP settings

Menu from the October 2026 Product Guide. The displayed local port belongs to that session; use the connection instructions generated for your own workspace.

  1. Keep the AVstudio project open in VS Code with the NG extension active.
  2. Open the Command Palette and run AVstudio: Setup AVstudio MCP server.
  3. Read the setup dialog. In the inspected sample, it reported that the MCP server was running.
  4. Choose Copy prompt and provide that prompt to the compatible assistant you want to configure.
  5. Ask the assistant to use the workspace's avstudio-guide MCP setup instructions and its own current client configuration format.
  6. Reload or reconnect the client as required, then verify its AVstudio tool list and project context.

Native VS Code setup dialog stating that the AV Studio MCP server is running and offering Copy prompt

This screenshot shows the actual setup dialog, not a completed assistant connection. The command provides setup guidance; it does not establish that every AI client is configured.

The current workflow uses a stdio bridge. The client launches that bridge, which connects to the extension's internal local server. Avoid older instructions that configure direct HTTP transport as the client mode.

The internal server binds to 127.0.0.1. Its default port is 27777; if occupied, the extension tries the next two ports, then falls back to an OS-assigned free port. Authentication uses a bearer token generated and persisted for the VS Code installation when no token is configured. Keep this token private.

Paths and project selection​

The generated guide describes these local components:

ComponentRole
~/.avstudio-mcp/bridge.mjsBridge launched by the client with Node. Expand this to an absolute path in the client configuration.
~/.avstudio-mcp/<sha1>.jsonProject discovery record used by the bridge.
Discovery record's projectRootAuthoritative project path for the connection; normally the AVstudio UI folder inside the workspace.

The client entry is named avstudio, runs node, and passes the bridge's absolute path followed by --project and the discovered project root. The surrounding configuration syntax and file location depend on the client; use its current documentation rather than copying a wrapper for another application.

Do not confuse the workspace root, where .agents/skills/ lives, with the AVstudio project root in discovery metadata. In a multi-project setup, check that the connection returns the project you intended. The bridge uses discovery data for authentication; do not paste the discovery token into prompts, screenshots, shared settings, or client configuration.

Verify the connection​

Ask the assistant to list its AVstudio tools, then perform a read-only check:

Use the AVstudio MCP connection to inspect the current project and diagnostics. Report the project name and open editors. Do not modify files or run a build.

A client entry marked configured is not enough. Confirm that a tool call succeeds and its result belongs to the correct project. An empty diagnostics result means no diagnostics were returned for that check, not that every runtime workflow has been tested.

Available context and operations​

ToolsPurpose
get_project_snapshotRead project data slices
get_diagnosticsRead project diagnostics
get_page_parametersRead a page's parameters
get_open_editorsInspect current editor context
list_icon_packsDiscover icon packs
activate_icon_packs, deactivate_icon_packManage pack files
open_icon_explorerOpen the icon browser
run_commandInvoke allowlisted editor commands

Tool availability and approval UI depend on the assistant client. Review proposed project changes and command effects, especially builds that replace previous output.

A useful workflow​

  1. Read the guide. Have the assistant read SKILL.md and the relevant reference files before writing project data.
  2. Inspect the project. Identify the existing page, theme, variables, connectors, and reusable components. Use MCP snapshots and diagnostics when connected.
  3. Make a bounded edit. Name the target page, desired behaviour, dimensions, and any existing bindings to reuse.
  4. Check the source. Preserve existing identities and supported legacy fields; use unique identities for new entities and valid project-root references.
  5. Inspect diagnostics. Review newly introduced issues after the edit.
  6. Review and test. Inspect the source diff, open the result in NG, and exercise the affected workflow in Live Preview.

Keep action commands and incoming feedback explicit. Provide the real joins, topics, datapoints, or datasource shape when they are part of the task. Ask the assistant to identify missing integration information rather than inventing a working hardware connection.

Example request: “Read the AVstudio guide, add a room card using the existing theme and page parameters, and report any project diagnostics.” Be specific about the intended control system and data source so the assistant does not guess connector details.

See settings for the seven settings contributed by 27.0.41, including three MCP options, the separate Live Preview/Custom Elements port, and update notifications.

Example prompts​

Add a control using existing project conventions

Read the workspace's AVstudio skill and the element, action, and variable references. Add a volume Slider to pages/start.page using the current theme and the existing volume variable. Preserve existing controls and identities. Report which event and feedback bindings you changed and any remaining diagnostics.

Create reusable content

Inspect the existing room datasource and its result shape. Create a reusable room card with named parameters, then show it in a Subpage List. Use the supported item-relative datasource bindings. Explain which files changed and how to test two different room instances.

Investigate a problem before changing files

Read the guide, inspect project diagnostics, and trace the selected button's action target. Explain why navigation fails and identify the smallest change needed. Do not replace the page or regenerate unrelated identifiers.

Prepare a handoff

Review the current source changes and list the tested workflows, required local settings, and unresolved integration details. Include the NG extension version and intended runtime. Distinguish editor checks from live device tests.

Review AI-generated changes​

AreaWhat to confirm
Properties and valuesThey exist in the current NG reference model rather than being plausible but unsupported keys.
LayoutResponsive containers, fixed positioning, and subpages use their supported structures.
IdentityExisting UUIDs are preserved; new entities do not reuse unrelated identities.
PathsPage, theme, function, asset, datasource, and connector references resolve to actual files.
Dynamic contentGlobal variables, page parameters, and datasource fields use the correct scope and syntax.
ActionsEvent, target, and payload match the requested behaviour; display-token rules are not assumed to apply to action payloads.
IntegrationsReal configuration comes from the project or supplied requirements; placeholders are clearly identified.
Visual resultThe edited file opens correctly in NG and the intended interaction works in preview.

The MCP command tool is allowlisted, and available operations depend on the installed version. Reading diagnostics differs from changing icon packs or running a build. Review the effect of a proposed operation; builds replace the output directory as described in Build and deployment.

Troubleshooting​

SymptomWhat to check
Assistant ignores NG schemasExplicitly give the path to SKILL.md and ask it to read the relevant references.
Generated properties do not appear in the sidebarCompare them with the installed version's model and UI; supported data fields and available form controls can differ.
Setup dialog says running but no tools appearFinish client configuration and reconnect; the extension server and client connection are separate states.
Client cannot launch the bridgeNode availability, absolute bridge path, and the client's process permissions.
Tools report the wrong projectCompare the configured --project path with discovery projectRoot; do not assume the workspace folder is that path.
Connection fails after restarting VS CodeConfirm the intended project is open, extension active, and discovery information current; reconnect the client.
Local server cannot bindCheck the configured port and the next two ports; see MCP port.
Tool is unavailable or rejectedCheck installed-version support, the command allowlist, and client approval settings.
Diagnostics are clear but a control failsTest runtime events, data, outgoing commands, and incoming feedback separately.
Local skill edits vanishedRegeneration can overwrite generated files; restore project-specific notes from your saved copy or source control.

The setup dialog and generated guide were inspected for this documentation. A new assistant client connection was not installed or verified as part of this page update.

Additional workflows in 27.0.29​

Ask the assistant to read the task-specific bundled skill before working on Custom Elements or a legacy build. Legacy conversion first extracts project data and page digests, then migrates pages individually. Component integration defines observed props/events and validates their two-way behavior. These are separate from MCP client setup.

For custom functions, use the runtime API and its JavaScript snippets. For deployment-specific configuration, provide env templates and keep private values out of shared prompts.

MCP lifecycle in 27.0.x​

The MCP server runs only while a recognized AVstudio project is open. It tries the configured port and the next two ports, then falls back to an OS-assigned free port, allowing multiple VS Code windows to coexist. The AVstudio MCP status control offers setup when unconfigured and restart/log options when running. See MCP status and options.

Regenerating avstudio-guide includes the WebSocket connector, datasource, variable/parameter receiving, and sending-action workflows introduced in 27.0.2. Preserve custom guide edits before regeneration and check the current action reference when older protocol notes disagree about token resolution.