discerns
A private pastebin for prompts, memories, snippets, and .env files that I can share with collaborators and that Claude can read and write over MCP.
Live at https://discerns.app.
- Sign in with GitHub or Google.
- Every item is private until I share it. I add people by email as viewers or editors. People without an account get an invite link and gain access when they sign in.
- Five kinds:
text, prompt, memory, env, code. Env items are encrypted at rest (AES-256-GCM) and can never be made public.
- Every save is a version, whether it came from the web, a collaborator, or Claude. Any version can be restored.
- A remote MCP server at
/mcp exposes the same features to Claude, authenticated with OAuth 2.1 (dynamic client registration, PKCE).
Connect Claude
Claude Code, with the plugin (recommended). The plugin includes the MCP server, the skill,
six commands, and a session hook, so there is nothing else to install:
/plugin marketplace add broisnischal/discerns
/plugin install discerns@discerns
Claude Code, by hand. Use this instead of the plugin, not as well, or you get two copies of
the server. The skill is optional:
claude mcp add --transport http discerns https://discerns.app/mcp
mkdir -p ~/.claude/skills && curl -fsSL https://discerns.app/downloads/discerns-skill.zip -o /tmp/discerns-skill.zip && unzip -oq /tmp/discerns-skill.zip -d ~/.claude/skills
Either way, run /mcp in Claude Code and sign in.
claude.ai, Desktop, mobile: Settings → Connectors → Add custom connector → https://discerns.app/mcp. The skill can be uploaded separately from Settings → Capabilities → Skills using discerns-skill.zip.
MCP tools
| Tool | What it does |
|---|
save_item | Save a new item; returns its id and URL |
get_item | Read an item, or an older version of it |
list_items | List or search mine and shared-with-me, filter by kind, tag, or owner |
update_item | Change an item; content changes create a version |
share_item / unshare_item | Add or remove a collaborator by email |
list_collaborators | Owner, collaborators, pending invites |
item_history / restore_version | Version history |
delete_item | Owner only |
whoami | The account the tools act as |
Items are also exposed as resources at discerns://items/{id}.
Stack
Started from Cove Stack by mugnavo.
- TanStack Start (React, Router, Query) on Cloudflare Workers via
@cloudflare/vite-plugin
- Cloudflare D1 with Drizzle ORM (1.0 RC, relations v2)
- Better Auth: GitHub and Google sign-in, plus
@better-auth/mcp and jwt() as the OAuth server for MCP
- MCP TypeScript SDK v2 (
@modelcontextprotocol/server), stateless Streamable HTTP
- Tailwind CSS and shadcn/ui on Base UI
- evlog wide events into Workers Logs
- Vite+ (
vp) for dev, build, lint, format, and tests
Layout
src/lib/items/service.server.ts item logic shared by the website and the MCP tools
src/lib/items/access.ts who can view, edit, and manage
src/lib/mcp/server.server.ts MCP tools and resources
src/lib/auth/options.ts Better Auth config (providers, MCP OAuth server)
src/routes/mcp.ts /mcp, token verification
src/routes/[.]well-known/$.ts OAuth discovery metadata
src/server.ts Worker entry, request logging
plugins/discerns/ Claude plugin: skill + MCP server config
.claude-plugin/marketplace.json plugin marketplace
Local development
Requirements: Node 24+, pnpm 12 (pinned in mise.toml), and optionally the vp CLI. vpr x below is vp run x; pnpm run x works the same.
-
Install: pnpm install (also generates worker-configuration.d.ts).
-
Create .dev.vars with local secrets:
BETTER_AUTH_SECRET=<openssl rand -base64 32>
ENCRYPTION_KEY=<openssl rand -base64 32>
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GitHub and Google are optional locally. Their OAuth apps need the callback http://localhost:3000/api/auth/callback/<provider>.