[{"data":1,"prerenderedAt":488},["ShallowReactive",2],{"navigation_docs":3,"-apps-overview":282,"-apps-overview-surround":483},[4,40,70,99,122,156,189,253],{"title":5,"path":6,"stem":7,"children":8,"page":39},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29,34],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-book-open",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F3.configuration","i-lucide-settings",{"title":25,"path":26,"stem":27,"icon":28},"Inspector","\u002Fgetting-started\u002Finspector","1.getting-started\u002F4.inspector","i-lucide-circuit-board",{"title":30,"path":31,"stem":32,"icon":33},"Connection","\u002Fgetting-started\u002Fconnection","1.getting-started\u002F5.connection","i-lucide-plug",{"title":35,"path":36,"stem":37,"icon":38},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F6.agent-skills","i-lucide-sparkles",false,{"title":41,"path":42,"stem":43,"children":44,"page":39},"Tools","\u002Ftools","2.tools",[45,50,55,60,65],{"title":46,"path":47,"stem":48,"icon":49},"Overview","\u002Ftools\u002Foverview","2.tools\u002F0.overview","i-lucide-wrench",{"title":51,"path":52,"stem":53,"icon":54},"Schema, handler & returns","\u002Ftools\u002Fschema-handler","2.tools\u002F1.schema-handler","i-lucide-braces",{"title":56,"path":57,"stem":58,"icon":59},"Annotations & input examples","\u002Ftools\u002Fannotations","2.tools\u002F2.annotations","i-lucide-badge-info",{"title":61,"path":62,"stem":63,"icon":64},"Errors & caching","\u002Ftools\u002Ferrors-caching","2.tools\u002F3.errors-caching","i-lucide-shield",{"title":66,"path":67,"stem":68,"icon":69},"Groups, files & dynamic registration","\u002Ftools\u002Fgroups-organization","2.tools\u002F4.groups-organization","i-lucide-tags",{"title":71,"path":72,"stem":73,"children":74,"page":39},"Resources","\u002Fresources","3.resources",[75,79,84,89,94],{"title":46,"path":76,"stem":77,"icon":78},"\u002Fresources\u002Foverview","3.resources\u002F0.overview","i-lucide-package",{"title":80,"path":81,"stem":82,"icon":83},"Static resources & structure","\u002Fresources\u002Fstatic-and-structure","3.resources\u002F1.static-and-structure","i-lucide-file-stack",{"title":85,"path":86,"stem":87,"icon":88},"Templates & handlers","\u002Fresources\u002Ftemplates-and-handlers","3.resources\u002F2.templates-and-handlers","i-lucide-git-branch",{"title":90,"path":91,"stem":92,"icon":93},"Metadata, content & errors","\u002Fresources\u002Fcontent-metadata-errors","3.resources\u002F3.content-metadata-errors","i-lucide-layers",{"title":95,"path":96,"stem":97,"icon":98},"Groups & organization","\u002Fresources\u002Forganization","3.resources\u002F4.organization","i-lucide-folder-tree",{"title":100,"path":101,"stem":102,"children":103,"page":39},"Prompts","\u002Fprompts","4.prompts",[104,108,113,117],{"title":46,"path":105,"stem":106,"icon":107},"\u002Fprompts\u002Foverview","4.prompts\u002F0.overview","i-lucide-message-square",{"title":109,"path":110,"stem":111,"icon":112},"Authoring & structure","\u002Fprompts\u002Fauthoring","4.prompts\u002F1.authoring","i-lucide-pen-line",{"title":114,"path":115,"stem":116,"icon":93},"Input, handler & messages","\u002Fprompts\u002Finput-handler-messages","4.prompts\u002F2.input-handler-messages",{"title":118,"path":119,"stem":120,"icon":121},"Patterns & advanced","\u002Fprompts\u002Fpatterns-advanced","4.prompts\u002F3.patterns-advanced","i-lucide-line-chart",{"title":123,"path":124,"stem":125,"children":126,"page":39},"Handlers","\u002Fhandlers","5.handlers",[127,131,136,141,146,151],{"title":46,"path":128,"stem":129,"icon":130},"\u002Fhandlers\u002Foverview","5.handlers\u002F0.overview","i-lucide-server",{"title":132,"path":133,"stem":134,"icon":135},"Default & custom handlers","\u002Fhandlers\u002Fdefault-and-custom","5.handlers\u002F1.default-and-custom","i-lucide-toggle-left",{"title":137,"path":138,"stem":139,"icon":140},"Structure & options","\u002Fhandlers\u002Fstructure-and-options","5.handlers\u002F2.structure-and-options","i-lucide-sliders-horizontal",{"title":142,"path":143,"stem":144,"icon":145},"Examples & routing","\u002Fhandlers\u002Fexamples-routing","5.handlers\u002F3.examples-routing","i-lucide-route",{"title":147,"path":148,"stem":149,"icon":150},"Sharing & practices","\u002Fhandlers\u002Fsharing-practices","5.handlers\u002F4.sharing-practices","i-lucide-share-2",{"title":152,"path":153,"stem":154,"icon":155},"Multi-handler organization","\u002Fhandlers\u002Forganization","5.handlers\u002F5.organization","i-lucide-network",{"title":157,"path":158,"stem":159,"children":160,"page":39},"Apps","\u002Fapps","6.apps",[161,165,170,175,179,184],{"title":46,"path":162,"stem":163,"icon":164},"\u002Fapps\u002Foverview","6.apps\u002F0.overview","i-lucide-app-window",{"title":166,"path":167,"stem":168,"icon":169},"Authoring & defineMcpApp","\u002Fapps\u002Fauthoring","6.apps\u002F1.authoring","i-lucide-code-2",{"title":171,"path":172,"stem":173,"icon":174},"useMcpApp() bridge","\u002Fapps\u002Fuse-mcp-app","6.apps\u002F2.use-mcp-app","i-lucide-message-circle",{"title":176,"path":177,"stem":178,"icon":64},"CSP & build pipeline","\u002Fapps\u002Fcsp-and-wiring","6.apps\u002F3.csp-and-wiring",{"title":180,"path":181,"stem":182,"icon":183},"Testing & publishing","\u002Fapps\u002Ftesting-publishing","6.apps\u002F4.testing-publishing","i-lucide-rocket",{"title":185,"path":186,"stem":187,"icon":188},"Patterns & limits","\u002Fapps\u002Fpatterns-reference","6.apps\u002F5.patterns-reference","i-lucide-book-marked",{"title":190,"path":191,"stem":192,"children":193,"page":39},"Advanced Topics","\u002Fadvanced","7.advanced",[194,199,204,209,214,218,223,228,233,238,243,248],{"title":195,"path":196,"stem":197,"icon":198},"Custom Paths","\u002Fadvanced\u002Fcustom-paths","7.advanced\u002F1.custom-paths","i-lucide-folder",{"title":200,"path":201,"stem":202,"icon":203},"Logging","\u002Fadvanced\u002Flogging","7.advanced\u002F10.logging","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"MCP Apps Internals","\u002Fadvanced\u002Fmcp-apps-internals","7.advanced\u002F11.mcp-apps-internals","i-lucide-cog",{"title":210,"path":211,"stem":212,"icon":213},"Listing Definitions","\u002Fadvanced\u002Flisting-definitions","7.advanced\u002F12.listing-definitions","i-lucide-list",{"title":215,"path":216,"stem":217,"icon":64},"Middleware","\u002Fadvanced\u002Fmiddleware","7.advanced\u002F2.middleware",{"title":219,"path":220,"stem":221,"icon":222},"TypeScript","\u002Fadvanced\u002Ftypescript","7.advanced\u002F3.typescript","i-lucide-type",{"title":224,"path":225,"stem":226,"icon":227},"Hooks","\u002Fadvanced\u002Fhooks","7.advanced\u002F4.hooks","i-lucide-webhook",{"title":229,"path":230,"stem":231,"icon":232},"MCP Evals","\u002Fadvanced\u002Fevals","7.advanced\u002F5.evals","i-lucide-flask-conical",{"title":234,"path":235,"stem":236,"icon":237},"Sessions","\u002Fadvanced\u002Fsessions","7.advanced\u002F6.sessions","i-lucide-database",{"title":239,"path":240,"stem":241,"icon":242},"Dynamic Definitions","\u002Fadvanced\u002Fdynamic-definitions","7.advanced\u002F7.dynamic-definitions","i-lucide-toggle-right",{"title":244,"path":245,"stem":246,"icon":247},"Code Mode","\u002Fadvanced\u002Fcode-mode","7.advanced\u002F8.code-mode","i-lucide-code",{"title":249,"path":250,"stem":251,"icon":252},"Elicitation","\u002Fadvanced\u002Felicitation","7.advanced\u002F9.elicitation","i-lucide-message-square-quote",{"title":254,"path":255,"stem":256,"children":257,"page":39},"Examples","\u002Fexamples","8.examples",[258,263,268,273,278],{"title":259,"path":260,"stem":261,"icon":262},"Authentication","\u002Fexamples\u002Fauthentication","8.examples\u002F1.authentication","i-lucide-shield-check",{"title":264,"path":265,"stem":266,"icon":267},"API Integration","\u002Fexamples\u002Fapi-integration","8.examples\u002F2.api-integration","i-lucide-globe",{"title":269,"path":270,"stem":271,"icon":272},"Common Patterns","\u002Fexamples\u002Fcommon-patterns","8.examples\u002F3.common-patterns","i-lucide-lightbulb",{"title":274,"path":275,"stem":276,"icon":277},"File Operations","\u002Fexamples\u002Ffile-operations","8.examples\u002F4.file-operations","i-lucide-file",{"title":279,"path":280,"stem":281,"icon":107},"Prompt Examples","\u002Fexamples\u002Fprompt-examples","8.examples\u002F5.prompt-examples",{"id":283,"title":157,"body":284,"description":466,"extension":467,"links":468,"meta":477,"navigation":478,"path":162,"seo":479,"stem":163,"__hash__":482},"docs\u002F6.apps\u002F0.overview.md",{"type":285,"value":286,"toc":461},"minimark",[287,292,301,329,335,369,428,432,452],[288,289,291],"h2",{"id":290},"what-are-mcp-apps","What are MCP Apps?",[293,294,295,296,300],"p",{},"MCP Apps are ",[297,298,299],"strong",{},"interactive HTML widgets"," returned by an MCP tool and rendered inline by compatible hosts. Instead of streaming back text, your tool ships a small UI that the user can read, scroll, filter, and click — connected back to your server through a typed message bridge.",[293,302,303,304,311,312,316,317,320,321,324,325,328],{},"They follow the ",[305,306,310],"a",{"href":307,"rel":308},"https:\u002F\u002Fmodelcontextprotocol.io",[309],"nofollow","MCP UI proposal (SEP-1865)",": a tool returns a ",[313,314,315],"code",{},"text\u002Fhtml;profile=mcp-app"," resource referenced by ",[313,318,319],{},"ui:\u002F\u002F",", the host loads it inside a sandboxed ",[313,322,323],{},"iframe",", and the iframe talks back over ",[313,326,327],{},"postMessage",".",[293,330,331,334],{},[313,332,333],{},"@nuxtjs\u002Fmcp-toolkit"," makes that authoring experience feel like writing a regular Nuxt page:",[336,337,338,349,360,366],"ul",{},[339,340,341,342,345,346,328],"li",{},"One ",[297,343,344],{},"Vue SFC"," per app in ",[313,347,348],{},"app\u002Fmcp\u002F",[339,350,351,352,355,356,359],{},"A ",[313,353,354],{},"defineMcpApp"," macro inside ",[313,357,358],{},"\u003Cscript setup>"," declares the tool, schema, and server handler.",[339,361,351,362,365],{},[313,363,364],{},"useMcpApp()"," composable gives you reactive data, host context, and a typed bridge to the host.",[339,367,368],{},"The toolkit bundles the SFC into a single self-contained HTML file at build time and serves it from your MCP endpoint.",[370,371,374,377,421],"prompt",{":actions":372,"description":373,"icon":164},"[\"copy\",\"cursor\",\"windsurf\"]","Scaffold a new MCP App (Vue SFC)",[293,375,376],{},"Create a new MCP App in my Nuxt app using @nuxtjs\u002Fmcp-toolkit.",[336,378,379,382,390,393,396,403,406,409,412,415,418],{},[339,380,381],{},"Create a Vue SFC in app\u002Fmcp\u002F (e.g. app\u002Fmcp\u002Fcolor-picker.vue)",[339,383,384,385],{},"Use defineMcpApp({ description, inputSchema, handler }) inside ",[386,387],"script",{"setup":388,"lang":389},"","ts",[339,391,392],{},"inputSchema uses Zod; handler runs server-side and returns { structuredContent }",[339,394,395],{},"handler can call any Nuxt API route via $fetch — keep heavy data work on the server",[339,397,398,399],{},"In the template, call useMcpApp",[400,401,402],"t-payload",{},"() to get { data, loading, hostContext, sendPrompt, callTool, openLink }",[339,404,405],{},"data is hydrated from structuredContent on first render — no extra request",[339,407,408],{},"Use sendPrompt(text) to push a follow-up into the chat that triggers another tool\u002Fapp",[339,410,411],{},"Use callTool(name, params) to re-invoke an MCP tool and refresh data in place",[339,413,414],{},"Use openLink(url) to ask the host to open a URL outside the iframe",[339,416,417],{},"Add CSP allow-lists with csp: { resourceDomains, connectDomains } if you load images or call external APIs",[339,419,420],{},"Make the layout fluid (no fixed heights); hosts often render the iframe inline at variable widths",[293,422,423,424],{},"Docs: ",[305,425,426],{"href":426,"rel":427},"https:\u002F\u002Fmcp-toolkit.nuxt.dev\u002Fapps\u002Foverview",[309],[288,429,431],{"id":430},"going-further","Going further",[433,434,435,441,448],"card-group",{},[436,437,440],"card",{"color":438,"icon":208,"title":439,"to":206},"neutral","MCP Apps internals","Build pipeline, host bridge protocol, security model, and advanced composition patterns.",[436,442,443,444,447],{"color":438,"icon":155,"title":152,"to":153},"Mount apps on a dedicated MCP route (e.g. ",[313,445,446],{},"\u002Fmcp\u002Fapps",") separate from your other tools.",[436,449,451],{"color":438,"icon":262,"title":450,"to":260},"Authenticate clients","Hide apps from anonymous callers with the same patterns as tools.",[293,453,454,455,457,458,460],{},"The rest of this section assumes you are comfortable with ",[305,456,41],{"href":47}," (Zod, handlers) and have read ",[305,459,30],{"href":31}," for MCP URLs in dev and production.",{"title":388,"searchDepth":462,"depth":462,"links":463},2,[464,465],{"id":290,"depth":462,"text":291},{"id":430,"depth":462,"text":431},"Build interactive UI widgets that AI hosts render alongside chat — written as Vue SFCs, served as MCP UI resources.","md",[469,472,474,476],{"label":470,"icon":169,"to":167,"color":438,"variant":471},"Authoring","subtle",{"label":473,"icon":174,"to":172,"color":438,"variant":471},"useMcpApp bridge",{"label":475,"icon":64,"to":177,"color":438,"variant":471},"CSP & pipeline",{"label":180,"icon":183,"to":181,"color":438,"variant":471},{},{"title":46,"icon":164},{"title":480,"description":481},"MCP Apps","Author MCP UI Apps as Vue Single-File Components. Auto-bundled, served from a real Nuxt endpoint, and rendered inside MCP Apps-compatible hosts.","dwaQDgfdMEkcW_YkPyG4j6rw9QM_cU7BkGlm51-32ac",[484,486],{"title":152,"path":153,"stem":154,"description":485,"icon":155,"children":-1},"Auto-attribute auto-discovered definitions to multiple MCP handlers via folder convention, with a function-based escape hatch for cross-cutting cases.",{"title":166,"path":167,"stem":168,"description":487,"icon":169,"children":-1},"SFC location, quick start, the defineMcpApp macro, server handler, and shared types.",1777888631058]