ext-apps/examples/basic-server-vanillajs/mcp-app.html
Jonathan Hefner 4b5b0c7d79 Add basic-server-vanillajs example
Demonstrates MCP App SDK usage with vanilla JavaScript (no framework),
providing parity with the existing basic-server-react example.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 14:28:27 -06:00

34 lines
1,015 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get Time App</title>
</head>
<body>
<main class="main">
<p class="notice">Watch activity in the DevTools console!</p>
<div class="action">
<p><strong>Server Time:</strong> <code id="server-time">Loading...</code></p>
<button id="get-time-btn">Get Server Time</button>
</div>
<div class="action">
<textarea id="message-text">This is message text.</textarea>
<button id="send-message-btn">Send Message</button>
</div>
<div class="action">
<input type="text" id="log-text" value="This is log text.">
<button id="send-log-btn">Send Log</button>
</div>
<div class="action">
<input type="url" id="link-url" value="https://modelcontextprotocol.io/">
<button id="open-link-btn">Open Link</button>
</div>
</main>
<script type="module" src="/src/mcp-app.ts"></script>
</body>
</html>