{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "ggoggam-vitre--let-llm-agent-drive-webview-over-mcp",
 "repo": "ggoggam/vitre",
 "repo_url": "https://github.com/ggoggam/vitre",
 "repo_slug": "ggoggam-vitre",
 "title": "Let an LLM agent drive an embedded page through MCP tools",
 "page_title": "How to let an LLM agent drive an embedded page through MCP tools with Vitre",
 "summary": "Expose the Vitre step vocabulary to an agent as MCP tools so it can navigate, read and act on a page.",
 "who": "An AI or platform engineer who wants an agent to operate a page in the app without writing Kotlin for each task.",
 "problem": "An agent that has never seen a page needs a safe, readable way to act on it and see what each action returned.",
 "outcome": "An agent session where each page action appears as an MCP tools/call with the JSON response, and the page stays under control of the app.",
 "steps": [
  "Add vitre-mcp and vitre-core to your commonMain dependencies from Maven Central.",
  "Start the in-process MCP transport that vitre-mcp provides in your app.",
  "Connect your MCP-capable model client to that transport.",
  "Ask the agent for a task on the page, then review each tools/call result it returns."
 ],
 "agent_prompt": "Using the vitre-mcp module in <project-path>, connect an MCP client to the in-process Vitre server and ask it to <task-on-page>. Expected output: a sequence of tools/call requests and JSON results, ending in a final answer. Verify that each step's JSON result matches the actual page state shown in the WebView.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "3 hours",
 "basis": "readme",
 "caveat": "The README says the Koog tools are a separate delivery, and this MCP path is an in-process transport, so wire up your own model client rather than expecting a hosted service.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "kotlin",
 "requirements": [
  "Kotlin 2.3.10 Multiplatform project (Android minSdk 24, iOS 15.0+, or desktop with JetBrains Runtime and JCEF 21)",
  "Maven Central access, which is the only setup needed for the published artifacts",
  "Compose Multiplatform if you want the optional vitre-compose UI layer"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "If the agent reads cookies or drives a logged-in session, it can access session data such as HttpOnly cookies, so limit what the page can expose."
  }
 ],
 "best": false,
 "score": 0.6,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ggoggam-vitre/let-llm-agent-drive-webview-over-mcp/",
 "md": "https://dedupedai.com/use-cases/ggoggam-vitre/let-llm-agent-drive-webview-over-mcp/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ggoggam-vitre--let-llm-agent-drive-webview-over-mcp.json",
 "api_version": "v1"
}
