
No prior MCP Apps experience required. This guide walks through the basics of the MCP Apps specification (SEP-1865), how the /mcp-app-development command works in Google Antigravity, and how to build, test, and package two inline MCP Apps in Go, starting with a small Hello World card and expanding it into an interactive checklist.
Why MCP Apps Exist
If you have used the Model Context Protocol (MCP), you know it lets AI agents call tools and read resources exposed by local or remote servers. By default, every tool returns text (or JSON text) into the chat.
Text works well for many tasks, but it becomes awkward whenever a human needs to inspect or manipulate data directly:
- Reading large JSON payloads or checklists in plain text clutters the conversation and spends context tokens on formatting.
- Small actions like clicking a refresh button or checking off three items, shouldn’t require a new LLM turn each time.
- Selecting specific items to send back to the agent is faster in a small interactive card than by copy-pasting text.
MCP Tools vs. MCP Apps vs. /generative-ui
In Google Antigravity, you have three main ways to present tool output or interactive UIs to a user. Before writing code, it helps to separate them by two simple questions: does the view need to talk to a live MCP server, and do you want to reuse it across conversations?
- Plain MCP Tools are the right default when text output is enough — running a CLI check, fetching a short summary, or automating headless steps.
- Generative UI (/generative_ui) is useful when you want the model to sketch a one-off diagram, chart, or visual walkthrough on the fly for the current chat without standing up an MCP server.
- MCP Apps (/mcp-app-development) sits in the middle: deterministic, reusable UIs backed by a real MCP server that you can package and install as a plugin.

The architectural difference between a plain MCP tool and an MCP App comes down to where the user interacts. With a plain tool, every follow-up action goes back through the LLM, which has to invoke the server again and rewrite the response. With an MCP App, Antigravity mounts a sandboxed HTML iframe that talks to your MCP server through the host over JSON-RPC, so clicks and toggles happen directly against the server, while the LLM receives a concise text summary (and any context the user explicitly chooses to attach):

The plain-text MCP tools require a new LLM turn for every interaction, while MCP Apps render a sandboxed UI iframe that communicates with your server through the host.
MCP Apps Basics (SEP-1865)
MCP Apps is an open extension to MCP (SEP-1865, maintained in modelcontextprotocol/ext-apps). If a client doesn't support UI views, such as the Antigravity CLI (agy), your tools still run normally and fall back to plain text.
When you use /mcp-app-development, Antigravity handles the wire-level details for you. You only need a high-level mental model of four moving parts:
- The UI lives separately from tool output: Your MCP server exposes an HTML page at a ui:// URI and links your tool to it. Antigravity loads that HTML on demand, so UI markup never clutters the chat history.
- Every tool call returns text for the model and data for the UI: Plain text goes to the LLM (and CLI clients like agy), while structured JSON goes straight to the interactive card.
- The UI runs in a sandboxed iframe: Using the official @modelcontextprotocol/ext-apps helper library, the card receives tool results and can call tools back on your MCP server without starting another LLM turn.
- Bundle into one HTML file, and keep state on the server: Because the sandbox blocks external network scripts and discards browser storage when closed, the frontend is bundled into a single HTML file and any persistent state lives on your server.
Here is how those pieces interact at runtime. The three stages of an MCP App lifecycle:
- Initial render
- Direct UI-to-server callbacks
- Optional messages or context updates back to the agent.

Using /mcp-app-development in Antigravity
In the Antigravity App (v2.34.0+), /mcp-app-development is a built-in slash command backed by an Agent Skill. Prefixing your prompt with /mcp-app-development loads Antigravity's MCP Apps guidance into the agent's context, so you can describe what you want to build in plain language while the agent handles the protocol details, single-file bundling, Light/Dark theming, and plugin files.
By default, an MCP App renders inline right inside the chat stream in place of a collapsed tool card and automatically resizes to fit its content.
Note: Antigravity also supports side panels, full-page sidebar apps, and custom file viewers , links to learn more about that are given at the end of this post).
Why Go Works Well for MCP Apps
Go is a clean fit for local MCP App plugins:
- Official Go SDK: github.com/modelcontextprotocol/go-sdk infers tool input schemas straight from Go structs and automatically serializes your output struct for the UI.
- Single-binary packaging with //go:embed: Once the frontend is bundled into dist/app.html, //go:embed dist/app.html bakes it into your compiled Go binary, so users don't need Node.js or Python installed at runtime.
Prerequisites
Before running /mcp-app-development, make sure the following tools are installed on the machine running Antigravity so the agent can bundle, compile, and test what it generates:
- Google Antigravity App (v2.34.0+) provides /mcp-app-development, renders inline MCP Apps, and validates/installs local plugins.
- Go (1.24+) compiles and tests the Go MCP servers. (If you ask /mcp-app-development for a Node/TypeScript or Python server instead, install that runtime instead of Go.)
- Node.js (20+) and npm (build-time only) is needed on your development machine even for a Go MCP App so the generated build step (typically Vite + vite-plugin-singlefile or esbuild) can bundle your frontend code and @modelcontextprotocol/ext-apps into one self-contained HTML file. Once go build embeds that HTML into the binary, Node.js is not required at runtime.
Example 1: Hello World in Go
Let’s start with the simplest useful MCP App: 1 tool (say_hello) and 1 embedded UI resource (ui://hello-world/app.html).
When the agent calls say_hello(name="Ada"), Antigravity renders a themed greeting card inline showing the server timestamp and call count. Clicking Ping Server Again inside the card calls say_hello directly on the Go server, updating the timestamp and count without another LLM turn.

Let’s go about building this.
Step 1: Scaffold the App with /mcp-app-development
Start by creating an empty folder (for example, hello-mcp-app/) and opening it as a project in the Antigravity App. Type / in the chat box, choose mcp-app-development, and describe what you want in plain language:
/mcp-app-development Build a simple Hello World MCP App in Go packaged
as an Antigravity plugin. Add a say_hello tool that takes an
optional name and renders an inline greeting card showing
the server time, a call counter, and a "Ping Server Again" button
that refreshes from the server.
Notice you don’t need to mention ui:// URIs, MIME types, bundlers, or plugin manifest keys—the /mcp-app-development skill supplies those conventions automatically.
As it runs, Antigravity will scaffold the Go server, a frontend project (usually TypeScript with Vite + vite-plugin-singlefile, or Vanilla JS with esbuild), Go tests, plugin.json, and mcp_config.json and will typically run the build, tests, and agy plugin validate –strict . for you. Exact folder layouts vary from run to run (for example, a standard cmd/ + internal/ Go layout with a Makefile, or a flatter single-file main.go), which is completely expected.
In my Antigravity Manager, it looks like this:

Notice you don’t need to mention ui:// URIs, MIME types, bundlers, or plugin manifest keys, the /mcp-app-development skill supplies those conventions automatically.
Antigravity did a bit of preparation work, as you can see below and then went about its task.
Here is the final output after it got done. First up, what was created:

The output is clear enough. It has generated the MCP Server with the tool that we wanted and it serves the UI. Next is the UI that renders the greeting card. And finally, it has done us a world of good, by generating the Antigravity plugin bundle, this is useful, when you want to distribute any future MCP App that you’d like as a portable artifact using the Plugin standard.
It also provides instructions on testing and validating it:

Step 2 : What to look for in the Go file and UI code
Rather than expecting a specific filename, look inside the generated Go server code (for example internal/server/server.go or main.go) and confirm the three MCP Apps wiring points are in place:
// 1. Embed the compiled single-file HTML bundle inside the Go binary.
//go:embed dist/index.html
var embeddedAppHTML string
// 2. Expose it as a ui:// resource with the MCP App MIME type.
server.AddResource(&mcp.Resource{
URI: appURI, // e.g., "ui://hello-world/card.html"
MIMEType: "text/html;profile=mcp-app",
}, readAppHTMLHandler)
// 3. Link say_hello to that resource via _meta.ui.resourceUri.
mcp.AddTool(server, &mcp.Tool{
Name: "say_hello",
Meta: mcp.Meta{"ui": map[string]any{"resourceUri": appURI}},
}, sayHelloHandler)
Inside the tool handler, CallToolResult.Content provides the short plain-text summary for the LLM and CLI clients, while the returned Go output struct is serialized automatically into structuredContent for the iframe.
Next, look inside the generated frontend entry file (typically ui/src/main.ts or ui/app.js). Regardless of whether Antigravity chose TypeScript with Vite or Vanilla JS with esbuild, the MCP Apps bridge follows the same three-step sequence:
import { App, applyDocumentTheme, applyHostStyleVariables } from "@modelcontextprotocol/ext-apps";
const app = new App({ name: "Hello MCP App", version: "1.0.0" }, {});
// 1. Register tool & theme listeners BEFORE calling app.connect().
app.addEventListener("toolresult", (result) => render(result.structuredContent));
app.addEventListener("hostcontextchanged", applyTheme);
// 2. Call back into the Go server directly on button click.
refreshBtn.addEventListener("click", async () => {
const result = await app.callServerTool({ name: "say_hello", arguments: { name: currentName } });
render(result.structuredContent);
});
// 3. Complete the handshake and sync the host's Light/Dark theme.
await app.connect();
applyTheme(app.getHostContext());
Step 3 : Validating the MCP App
The Antigravity plugin that contains our MCP App has been already created and installed. So in the above Manage and Try It, it asks us to click on the hello-world plugin that will lead us to the plugin page. Alternatively, you can click on the Customizations link at the top left in Antigravity Manager a and you will be able to locate the Hello World MCP App that we created.

If you click on the plugin, you get to the plugin details page, which even has a few sample prompts made available for you to test. A screenshot is shown below:

I pick one of them i.e. Greet me as Alex with the Hello World greeting card and here we are:

Not bad, isn;t it? Interestingly, we can also invoke the app by asking to use its specific tool Greet Ada using the say_hello tool, as given below:

Example 2: Interactive Quick Checklist
Once Hello World makes sense, a natural next question is: how do I build an inline UI that manages real state and feeds updates back into my conversation?
Example 2 stays on the same Go + //go:embed pattern and adds three capabilities:
- UI-only tools (visibility: ["app"]): The model only sees create_checklist. Actions like toggling, adding, removing, or reloading items stay hidden from the model while remaining callable directly from the card.
- Server-side persistence (PLUGIN_DATA): Because browser storage in the iframe isn't permanent, the Go server writes every change immediately to Antigravity's per-plugin data directory (PLUGIN_DATA).
- Attaching UI state to your next prompt (updateModelContext): Clicking Attach Remaining Items to Prompt puts a context pill on your next chat message so the agent knows which checklist items are done and which remain.

Go Example 2 adds visibility:[“app”] helper tools, eager persistence to PLUGIN_DATA, and prompt context pills via app.updateModelContext().
Step 1: Scaffold Quick Checklist with /mcp-app-development
Open a fresh folder (for example, quick-checklist/) in the Antigravity App and describe the app naturally:
/mcp-app-development Build an inline checklist MCP App in Go packaged
as an Antigravity plugin. Let the agent create a checklist with a title
and items; inside the card, let me check off items, add new ones,
keep my progress across restarts, and click a button to attach
the remaining items to my next chat prompt.
Antigravity will typically generate one model-facing create_checklist tool, several app_* UI-only helper tools (for toggling, adding, removing, and reloading persisted checklist state after a restart), disk persistence under PLUGIN_DATA, and the bundled interactive UI.
Once again, it does well and completes the work, as per a sample run log shown below:

Step 2: What to verify in the Generated Go Server
In the generated Go server code, look for the split between the model-facing tool (resourceUri) and the UI-only helper tools (visibility: ["app"]):
// Visible to the model: creates a checklist and opens the inline card.
mcp.AddTool(server, &mcp.Tool{
Name: "create_checklist",
Meta: mcp.Meta{"ui": map[string]any{"resourceUri": appURI}},
}, createHandler)
// Hidden from the model in UI hosts; callable only from the checklist card.
mcp.AddTool(server, &mcp.Tool{
Name: "app_toggle_item", // exact helper names vary per run
Meta: mcp.Meta{"ui": map[string]any{"visibility": []string{"app"}}},
}, toggleHandler)
Also verify that the server reads Antigravity’s persistent data directory, either via os.Getenv("PLUGIN_DATA") or a –data-dir=${PLUGIN_DATA} flag passed from mcp_config.json,and saves edits to disk immediately on every change.
Step 3: What to Verify in the Generated Front-end
In the generated UI code, look for the click handler that calls app.updateModelContext() with a plain-text summary of remaining items (and passes an empty content: [] array to clear it), gated on app.getHostCapabilities()?.updateModelContext:
attachBtn.addEventListener("click", async () => {
await app.updateModelContext({
content: [{ type: "text", text: formatRemainingSummary(checklist) }],
});
});
clearBtn.addEventListener("click", () => app.updateModelContext({ content: [] }));
It also provides a verification and how to validate or try the plugin:

If I go to the plugin page, I can see the details:

I go ahead with one of the suggested prompts:

Good stuff in there!
Common Issues & Things to Try
Here is a quick debugging list in case you run into any of these issues:

Things to Try Next
- Extend your checklist card: Ask /mcp-app-development inside your checklist folder to add filtering (All / Remaining / Completed) or a clear-completed button backed by an app-only tool.
- Send a follow-up prompt directly from the card: Add an Ask Agent About Remaining Items button that uses app.sendMessage() to start a follow-up turn straight from the UI.
- Build a Go environment card: Ask /mcp-app-development to scaffold a small Go plugin showing runtime.Version(), runtime.GOOS, and go.mod dependencies inside a searchable inline table.
- Scaffold a cron expression helper:
/mcp-app-development Build an inline Go MCP App plugin that
validates a cron expression, shows the next 5 run times, and
lets me edit the expression live inside the card.
Going Deeper: Suggested Reading Order
We have only scratched the surface of the MCP Apps standard here — sticking to inline cards, single-file bundling, visibility: ["app"] helpers, and app.updateModelContext(). Beyond these basics, the standard covers streaming partial tool inputs, custom CSP and CORS domains, OAuth-backed remote servers, display modes, and Antigravity's side-panel, full-page, and custom file-viewer surfaces.
If you want to learn the full standard systematically, read the official documentation in this order:
Step 1: Core Concepts & Official Quickstart
Start here to reinforce the mental model and see how the spec presents MCP Apps across hosts (Claude, ChatGPT, VS Code, and Antigravity):
- MCP Apps Overview (modelcontextprotocol.io) — High-level introduction to why the extension exists, how hosts render views, and how graceful fallback works.
- Build an MCP App (modelcontextprotocol.io) & Official Quickstart (docs/quickstart.md) — The official end-to-end starter walkthrough from the ext-apps maintainers.
Step 2: Practical App Patterns, Security & Testing
Once you have built one or two small inline apps, read these guides before shipping anything larger:
- Common Patterns (docs/patterns.md) — How to structure chunked loading, polling, streaming partial tool arguments (ontoolinputpartial), and state persistence.
- CSP & CORS Guide (docs/csp-cors.md) — How iframe sandbox origins work, when (and when not) to allowlist connectDomains or resourceDomains, and why server-side tools/call is usually safer.
- Testing MCP Apps (docs/testing-mcp-apps.md) & Official Examples Gallery (ext-apps/examples) — How to run the reference basic-host locally and browse working examples in React, Vue, Svelte, Vanilla JS, and Python.
- Authorization (docs/authorization.md) — Moving from local stdio servers to authenticated remote Streamable HTTP MCP App servers.
Step 3: Google Antigravity Surfaces & Plugin Packaging
When you are ready to go beyond inline cards inside Antigravity:
- Google Antigravity — MCP Apps — Covers Antigravity’s extra UI surfaces (side panel tabs, full-page sidebar views, and custom file viewers), background conversations, and exact host limits.
- Google Antigravity — Build Plugins & /mcp-app-development Command — Packaging MCP Apps alongside skills, rules, and hooks, validating with agy plugin validate –strict, and distributing plugins.
Step 4: The Formal Specification & SDK References
Keep these bookmarked when you need exact wire schemas, method signatures, or error codes:
- SEP-1865 Formal Specification (specification/2026-01-26/apps.mdx) — The normative JSON-RPC 2.0 specification for every message, notification, capability flag, and display mode.
- @modelcontextprotocol/ext-apps API Reference (and Migrating to v2) — Complete frontend SDK reference for App, React hooks, theming helpers, and downloadFile().
- MCP Go SDK (pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp) — Go API docs for AddTool, AddResource, Meta, StructuredContent, and transports.
Getting Started with MCP Apps and /mcp-app-development in Google Antigravity was originally published in Google Cloud – Community on Medium, where people are continuing the conversation by highlighting and responding to this story.
Source Credit: https://medium.com/google-cloud/getting-started-with-mcp-apps-and-mcp-app-development-in-google-antigravity-83269e40fb6d?source=rss—-e52cf94d98af—4
