chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.4.0 Latest 5 packages
0
0
<script lang="ts">
import { onMount } from 'svelte';
import Icon from '../atoms/Icon.svelte';
/** How to connect an AI, which then puts tiles on these canvases through HUD's canvas tools. */
let { onclose }: { onclose: () => void } = $props();
const url = `${location.origin}/mcp`;
let dialog: HTMLDialogElement | undefined = $state();
let copied = $state(false);
async function copy() {
try {
await navigator.clipboard.writeText(url);
copied = true;
window.setTimeout(() => (copied = false), 2000);
} catch {
copied = false;
}
}
onMount(() => dialog?.showModal());
</script>
<dialog bind:this={dialog} class="dialog connect" aria-labelledby="connect-title" {onclose} onclick={(event) => event.target === dialog && dialog?.close()}>
<h2 id="connect-title">Connect your AI</h2>
<button type="button" class="icon-button close" aria-label="Close" onclick={() => dialog?.close()}><Icon name="close" /></button>
<p>
Add this address as a custom connector in Claude, ChatGPT or Cursor, sign in with the same handle, then ask it to put things on your canvas, as “put my For You feed on my HUD
canvas”. What it adds shows here as it happens, marked as an agent’s.
</p>
<div class="copy">
<input class="input" type="text" readonly value={url} aria-label="Connector address" onfocus={(event) => event.currentTarget.select()} />
<button type="button" class="btn" onclick={() => void copy()}>{copied ? 'Copied' : 'Copy'}</button>
</div>
</dialog>
<style>
.connect {
position: fixed;
}
p {
margin-top: var(--space-3);
color: var(--mute);
font-size: var(--text-sm);
}
.copy {
display: flex;
gap: var(--space-2);
margin-top: var(--space-4);
}
.copy input {
flex: 1;
font-family: var(--font-mono);
}
</style>