by vite-hub
Provides a unified server layer for Vite applications, offering portable primitives such as KV stores, databases, queues, agents, workflows, and more, with a single API that can be deployed to Cloudflare, Vercel, Netlify, Deno, or Node environments.
ViteHub delivers a collection of server primitives that can be composed via a single Vite plugin. It abstracts away host‑specific implementations, letting developers write routes once and run them on any supported platform (Cloudflare Workers, Vercel, Netlify, Deno, Node).
npx npm@latest install vite-hub nitro h3
npx npm@latest install -D vite
// vite.config.ts
import { vitehub } from "vite-hub";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vitehub({ preset: "node", kv: true })]
});
server/ using the H3 helper functions. Example KV read:
// server/api/settings.get.ts
import { defineEventHandler } from "h3";
import { kv } from "vite-hub/kv";
export default defineEventHandler(async () => {
const [error, settings] = await kv.get("settings");
if (error) throw error;
return settings;
});
Env primitive.cloudflare, vercel, netlify, deno, node) simplify host‑specific setup.npx skills add https://vitehub.dev --skill vitehub.docs/ folder.Use each primitive alone, or use them together in one app.
// server/api/settings.get.ts
import { defineEventHandler } from "h3";
import { kv } from "vite-hub/kv";
export default defineEventHandler(async () => {
const [error, settings] = await kv.get("settings");
if (error) throw error;
return settings;
});
This route does not change between hosts. The host selects the provider:
| Host | KV | Blob | Database |
|---|---|---|---|
| Cloudflare | Workers KV | R2 | D1 |
| Vercel | Upstash Redis | Vercel Blob | libSQL or D1 HTTP |
| Netlify | Upstash Redis | Netlify Blobs | libSQL |
| Deno | Deno KV | S3-compatible | libSQL |
| Node | fs-lite or Upstash |
fs or S3-compatible |
SQLite or libSQL |
Support is different for each primitive. Read the support matrix before you select a host.
pnpm add vite-hub nitro h3
pnpm add -D vite
If pnpm stops with ERR_PNPM_IGNORED_BUILDS and names esbuild, the packages from that command are installed. Run pnpm approve-builds esbuild one time to let esbuild run its install script. Then run pnpm add -D vite before you continue.
// vite.config.ts
import { vitehub } from "vite-hub";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vitehub({ preset: "node", kv: true })],
});
Nitro serves the routes in server/ and builds the output for your host. For a complete app, follow the First Server Primitive tutorial. It runs offline and needs no account.
If a coding agent writes your app, install the ViteHub skill:
npx skills add https://vitehub.dev --skill vitehub
Requirements: Node.js 22.22 or newer and Vite 8 or newer. Presets: cloudflare, netlify, vercel, deno, and node.
Agents are one more primitive. Their Capabilities wrap the same primitives that your routes call, so a route can read the KV store that an Agent writes. Start with the First Agent tutorial.
ViteHub is in active development and has not reached 1.0. Interfaces can change between 0.x releases, and security fixes land on main only. Pin your versions, and read Prepare a production deployment before you serve traffic.
See AGENTS.md for the code map and checks. ViteHub uses the Apache License 2.0. Report vulnerabilities through the security policy.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by headroomlabs-ai
Compress tool outputs, logs, files, RAG chunks, and conversation history before they reach the LLM, keeping answers identical while saving up to 95% of tokens for JSON payloads.
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.