Imported from reachjalil/openwork-remote-mcp-app-example (
AGENTS.md). Install upstream withnpx skills add reachjalil/openwork-remote-mcp-app-example. Copyright stays with the author.
Agent guide for the OpenWork MCP App examples
This is a public, forkable monorepo of independently authored standard MCP Apps. Agents may add examples, change interfaces, fixtures, and native tools while preserving the protocol and security boundaries below.
Start and verify
pnpm install
pnpm dev
pnpm start:mcp
pnpm verify
pnpm devbuilds every App and opens the multi-App local host athttp://localhost:5173/.pnpm start:mcpexposes the real stateless Streamable HTTP server athttp://127.0.0.1:8787/mcp.pnpm verifytype-checks, builds all self-contained resources, enforces portability/size limits, and tests tools, resources, UI metadata, gateway calls, and result fields.
Editing surfaces
- Add or change an App in
apps/<example>/src. - Share handshake/tool-call logic through
packages/mcp-app-runtime. - Share UI elements through
packages/example-ui. - Change deterministic local/server data in
fixtures/mock-data.json. - Change browser-host behavior in
playground. - Change the standard MCP server in
scripts/mcp-server.mjs. - Add generated targets in
scripts/build-examples.mjs. - Never hand-edit
docs; regenerate it withpnpm buildand commit source and output together.
Contract invariants
- Expose ordinary MCP tools and resources. Do not add an OpenWork-specific HTML manifest, iframe protocol, or wrapper-tool protocol.
- Every launch tool attaches one exact resource through
_meta.ui.resourceUri; eachui://URI must be immutable/versioned and readable astext/html;profile=mcp-app. - Apps call only app-visible tools on the MCP server that served their UI.
- For OpenWork URL imports, read the exact capability-search and execution tool names from launch
structuredContent.serverTools; never guess them or embed an installation ID. - Search and execution use ordinary MCP
tools/calland results. Programs remain server-side durable resources; do not reintroduce per-Apprun_program_*tools. - Preserve authorization, annotations, confirmation requirements, and audit behavior. The UI must never receive credentials or directly contact unrelated MCP servers.
- React and Vite are authoring choices. The compiled HTML is the runtime MCP App resource; do not call this React SSR.
- Fixture records, credentials, connection IDs, and provider secrets must never enter a compiled resource.
- A static URL App must remain useful in launch-only mode or clearly explain that its gateway is unavailable.
- Keep OpenWork-generated UI authoring separate. This repo demonstrates external authoring, native MCP Apps, URL import, and capability use—not source submission to OpenWork.
Agent acceptance check
After a change, run pnpm verify, then use pnpm dev to confirm all three frames reach Connected. Search projects in Project Atlas, search and execute a match in Capability Explorer, and switch through every Component Gallery state. If an MCP contract changes, update the App, server, playground, protocol checks, execution contract, and demo script together.