MindooDB has published a detailed post-mortem on integrating AI agents across twelve applications within their Haven workspace, utilizing the emerging WebMCP standard. The open-source project, which builds on Apache 2.0 licensed local-first database technology, moved away from traditional server-side Model Context Protocol (MCP) implementations to register tools directly within the browser tab via document.modelContext.registerTool. This shift allows agents to interact with user sessions and encrypted data without separate API keys or standalone server processes, leveraging the existing browser context for authentication and logic execution.
The Shift From Server-Side MCP to WebMCP
While Anthropic’s original MCP specification, now under the Linux Foundation, relies on separate server processes or web services, WebMCP embeds tool definitions directly into the web page. Karsten Lehmann, writing for MindooDB, notes that classic MCP requires a detour for web applications where data and session logic already reside in the browser. By moving tools into the page, Haven ensures that agent calls run under the user’s existing session and permissions. Although WebMCP is currently a draft Community Group Report at the W3C and only available in Chrome via an origin trial (version 149+), MindooDB bridges this gap using a local service that exposes these in-page tools to standard MCP clients like goose and Claude Code.
Dynamic Tool Exposure and Context Management
A core lesson from the twelve-app suite is that exposing all tools simultaneously overwhelms models, particularly smaller or local ones. Haven implements a layered discovery system where agents initially see only haven_* tools to understand the user’s context. As the agent opens specific applications—such as the Teacher’s Desk or TeamGrid—Haven dynamically adds that app’s tools to the agent’s view and notifies connected clients via notifications/tools/list_changed. This approach ensures that an agent working in a spreadsheet does not carry the context weight of unrelated CRM or email tools, significantly improving accuracy and token efficiency.
Designing for Model Logic, Not UI Clicks
The team found that tools must perform domain operations rather than simulating UI clicks. For example, a tool should be named todo_tasks_complete with a task ID, rather than describing a checkbox interaction. Crucially, every application provides a get_context tool to ground the model in reality, supplying the current date, user identity, and data state. This prevents common errors where models hallucinate dates or misunderstand relative timeframes like "next Friday." The developers also emphasized that file exports should not pass raw bytes through the model; instead, files are written to a local exchange folder, and the agent receives a reference, keeping the context window clean and focused on logic rather than data transport.
Key Takeaways
- WebMCP allows tools to run within the browser tab, inheriting user sessions and eliminating separate API key management.
- Dynamic tool exposure is critical; showing all tools at once degrades model performance, especially for local LLMs.
- Tools must operate on domain models (e.g., task IDs) rather than UI elements to ensure robust automation.
- Context tools providing real-time state (date, user, open apps) are essential for preventing model hallucinations.
- The Haven Agent Bridge currently facilitates WebMCP integration for standard MCP clients via a local HTTP service.
The Bottom Line
WebMCP represents a necessary evolution for local-first applications, but the real innovation here is the rigorous discipline in tool design. MindooDB proves that agent usability isn't just about API access, but about curating a minimal, context-aware interface that respects the model's cognitive limits.