🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@feedthrough/sveltekit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feedthrough/sveltekit

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@feedthrough/sveltekit

feedthrough.dev · npm · GitHub

SvelteKit adapter for Feedthrough. Injects the browser bridge into every server-rendered page during development so an AI agent can observe console logs, network requests, and DOM state in real time.

Installation

npm install --save-dev @feedthrough/sveltekit

Setup

Add feedthroughHandle (or the result of setupFeedthrough()) to your hooks.server.ts:

// src/hooks.server.ts
import { feedthroughHandle } from "@feedthrough/sveltekit";
import { sequence } from "@sveltejs/kit/hooks";

export const handle = sequence(feedthroughHandle);

If you have other handles, include them in the sequence call. Feedthrough is a no-op outside NODE_ENV=development, so it is safe to leave wired in across all environments.

Custom options

import { setupFeedthrough } from "@feedthrough/sveltekit";
export const handle = sequence(setupFeedthrough({ port: 8765 }));

Running with the MCP server

# Terminal 1 — app
npx vite dev

# Terminal 2 — MCP server
npx @feedthrough/mcp

Then connect your AI agent (Claude Code, Cursor, or any other MCP client) to the server and use connection_status, get_console_logs, query_dom, etc.

How it works

The adapter exports a SvelteKit Handle function that uses resolve(event, { transformPageChunk }) to inject the Feedthrough IIFE bridge into the <head> of every HTML response. The bridge script is embedded at build time — there are no runtime fetches from the adapter itself.

The guard process.env.NODE_ENV !== "development" means the handle is a transparent pass-through in production builds.

FAQs

Package last updated on 07 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts