Read-only MCP server for Chatpack documentation, framework setup guides, and React UI block source. Runs locally over stdio with npx -y @chatpack/mcp. Node.js 20 or later; MIT license; no account or API key required.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Open-source chat infrastructure for developers.
Install a package, wire up your database and auth, and get a production-ready chat backend - 1:1 and group conversations, messages, permissions, read-state, and real-time delivery - without rebuilding it from scratch.
Documentation β docs.chatpack.dev -
quickstart, concepts, real-time, storage adapters, framework guides, and the
full REST reference. (Source in apps/docs; run locally with
pnpm --filter @chatpack/docs dev.)
A project by DanielCH and DavidCH Β· principal author Yeabsra Habtu Β· all contributors
Status:
0.x- v0 MVP + real-time plugins + unread counts + browser client + reactions + search + group chats + mentions + forwarding, live on npm. The v0 MVP (core engine, HTTP handler, real-time SSE, Postgres adapter) plus the opt-in real-time plugins -typing(),presence(), andreceipts(), all shipping today inside@chatpack/coreunder the@chatpack/core/pluginssubpath (see Real-time plugins) - are published and installable now, along with the first-party@chatpack/client, which provides the matching typed REST, SSE, and React client. The API is young - expect minor breaking changes before1.0. Follow along or contribute.
Every app that needs messaging ends up rebuilding the same things: conversations, messages, permissions, read receipts, real-time delivery, group membership and roles, and countless edge cases.
Chatpack removes that repetition - the same way BetterAuth did for authentication. You bring your auth and your frontend; Chatpack gives you a small, well-designed chat backend that just works.
Real-time comes built in: your frontend opens one EventSource and gets
live messages with automatic reconnection and missed-message backfill - no
WebSocket server, no Socket.IO, no reconnect code to write.
Prefer learning from a complete app?
examples/messengeris a full 1:1 messenger - sidebar, live messages, read receipts - in vanilla HTML+JS with a step-by-step tutorial README.
Both packages are needed for the quickstart - @chatpack/core is the engine,
@chatpack/adapter-memory is the storage it plugs into:
Bun note: if Bun's supply-chain guard (
minimumReleaseAge) is enabled, versions published in the last 24 h are skipped and Bun silently resolves an older release. If you get an unexpectedly old version right after a release, that's the guard - not a broken package. Check withnpm view @chatpack/core dist-tags.
The
authhook must returnChatpackUser | null- an object with at least{ id: string }(extra fields are allowed and ignored), ornullfor unauthenticated requests. Returning a bare string is treated as unauthenticated and every request will get a401.Prefer cookie-based sessions over
Authorizationheaders: the browser sends cookies automatically on every request - including the SSE stream in step 6, where custom headers are impossible.The hook receives a raw Web-standard
Request- there is norequest.cookieshelper. Parse thecookieheader yourself:Setting the demo cookie in an embedded preview (Lovable, v0, Bolt, ...)? Those editors show your app inside a cross-site iframe, where browsers silently drop
SameSite=Laxcookies - the app 401s in the preview pane but works in a real tab. Set demo cookies with iframe-proof attributes:
For production, swap the storage line for Postgres -
@chatpack/adapter-drizzle:
If your application already uses Prisma ORM 7, use the server-only
@chatpack/adapter-prisma adapter. Copy its
Prisma models and migration into your app, generate your own client, and pass
it to prismaAdapter(client). Verified provider is PostgreSQL 16; Prisma 8
and other providers are not claimed compatible.
No direct Postgres connection string? Platforms that only expose a database client (Supabase's JS client, Convex, and most AI-builder clouds) are supported through a custom
StorageAdapter. The full guide - reference schema, invariants, skeleton, and a verification checklist - is Part 2 ofllms.txt.Building with an AI assistant or app builder?
llms.txtis the single-fetch integration guide (hard rules, wiring, per-framework mount recipes, preview-iframe cookie recipe, verification steps). It also ships inside every@chatpack/*npm package asllms.txt- point your agent atnode_modules/@chatpack/core/llms.txt.
For Turso/libSQL, install @chatpack/adapter-turso, @libsql/client, and
drizzle-orm, then run its exported migration statements before creating the
Chatpack instance. See the Turso adapter guide.
For MySQL 8, install @chatpack/adapter-mysql, mysql2, and drizzle-orm,
create a server-side transaction-capable pool, and run its exported migration
statements before creating the Chatpack instance. See the MySQL adapter
guide. This package does not claim
MariaDB, PlanetScale, Aurora, serverless/HTTP drivers, or edge-runtime support.
Using a coding agent (Claude Code, Cursor, Codex)? Install the Chatpack agent skill into your app's repo so the agent follows the correct workflow automatically:
For MCP clients, @chatpack/mcp provides read-only tools for
documentation search, framework guides, and React UI source. See its README for
local setup and client configuration.
Or, with the @chatpack/next helper (same result, reads
better):
The route file must be a catch-all (
[...chatpack]in Next.js) - Chatpack serves many sub-paths underbasePath(default/api/chat), so a singleapp/api/chat/route.tswould 404 everything but the root.Never hand-write your own message or stream routes. The one handler already serves every route - conversations, messages, read-state, plugins, and the SSE stream. Custom
/api/messages-style routes split state and break live delivery.
Your chat backend is now live at /api/chat - find-or-create conversations,
send/list/edit/delete messages, read-state, and a live SSE stream at
/api/chat/stream, with your auth enforced on every request.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/chatpack-mcp)<a href="https://allmcps.com/mcp/chatpack-mcp"><img src="https://allmcps.com/api/badge/chatpack-mcp?style=directory" alt="Chatpack MCP on AllMCPs" /></a>