Show your AI what to fix. Click your UI, leave notes, generate agent-ready context.
annotaKit is a Svelte component that lets you annotate UI elements and export structured markdown. Click elements, add comments, and copy the output straight into Claude, Cursor, or any AI agent.
pnpm add annotakit
npm install annotakit
yarn add annotakit
Requires svelte ^5.35.0 as a peer dependency.
Import the component in your root layout:
<!-- src/routes/+layout.svelte -->
<script>
import { Annotakit } from 'annotakit';
</script>
<Annotakit />
<slot />
That's it. A floating toolbar appears in the corner of your app.
Start collapsed with <Annotakit minimized />.
Output includes CSS selectors, Svelte component info, accessibility attributes, and computed styles. Everything an agent needs to locate and understand the element.
| Prop | Type | Default | Description |
|---|---|---|---|
position |
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' |
'bottom-right' |
Toolbar position on screen |
outputFormat |
'compact' | 'standard' | 'detailed' |
'standard' |
Default markdown output format |
theme |
'light' | 'dark' | 'auto' |
'auto' |
Color theme (auto follows system/<html class="dark">) |
storageKey |
string |
'annotakit' |
localStorage key for persisted annotations |
retentionDays |
number |
7 |
Days to keep annotations in storage |
highlightColor |
'green' | 'blue' | 'purple' | 'red' | 'orange' | 'yellow' |
'green' |
Annotation highlight color |
enabled |
boolean |
true |
Show/hide the toolbar |
minimized |
boolean |
false |
Start the toolbar collapsed |
mcpServerUrl |
string |
- | MCP server URL for status indicator (e.g. 'http://localhost:4156') |
onOutput |
(markdown: string) => void |
- | Callback when markdown is generated |
annotaKit generates structured markdown in three formats:
Compact - one line per annotation, minimal:
1. `nav > button.menu` (HeaderNav) - Fix hover state
Standard - grouped with selector, component info, accessibility:
### 1. BUTTON
- **Selector:** `nav > button.menu`
- **Component:** HeaderNav (`src/lib/HeaderNav.svelte`)
- **Comment:** Fix hover state
- **Accessibility:** role="button", aria-label="Menu"
Detailed - everything above plus dimensions, computed styles, and component chain.
annotaKit can connect to an MCP server so AI agents (Claude Desktop, Claude Code, etc.) can receive and respond to your annotations in real time.
pnpm add @annotakit/mcp
Start the server:
npx @annotakit/mcp
Wire up the browser bridge:
<script lang="ts">
import { Annotakit, annotakitState } from 'annotakit'
import { createMcpBridge } from '@annotakit/mcp/bridge'
import { browser } from '$app/environment'
import { onDestroy } from 'svelte'
const mcpBridge = browser ? createMcpBridge() : null
$effect(() => {
if (mcpBridge) {
mcpBridge.sync(annotakitState.annotations, window.location.href, document.title)
}
})
onDestroy(() => mcpBridge?.disconnect())
</script>
<Annotakit mcpServerUrl="http://localhost:4156" />
A status dot in the settings panel shows whether the MCP server is connected. The server exposes 9 tools for AI agents to list sessions, read annotations, acknowledge, resolve, dismiss, reply, and watch for new annotations.
See the @annotakit/mcp README for full setup and tool reference.
| Package | Description |
|---|---|
annotakit |
Core library - Svelte 5 component + framework-agnostic engine |
@annotakit/mcp |
MCP server - connects annotations to AI agents in real time |
Have an idea? Open an issue.
We're looking for help with documentation, DX/testing, export formats, and framework support. See the contributing guide for details on how to get started.
Requires pnpm and Node.js 18+.
# Install dependencies
pnpm install
# Start dev playground
pnpm dev
# Type check
pnpm check
# Build package
pnpm build
Inspired by Agentation (PolyForm Shield 1.0.0). Annotakit is a clean-room implementation built for the SvelteKit ecosystem, written from scratch under the MIT license.
© 2026 nodestarQ