Mike Cann's avatar
Mike Cann
2 months ago

Exploring the NEW Convex Claude Code Plugin!

Hot on the heels of our Codex integration, there's good news for Claude Code users. The new Convex Claude Code plugin is out, and it's good. Better than the Codex one, I'd say, because it hooks into Claude more deeply. Here's what that looks like in practice.

Installing the plugin

From the desktop app:

  1. Open Customize, then Personal Plugins.
  2. Click Browse Plugins.
  3. Search for Convex.

It shows up right there.

From the CLI: open Claude, type /plugin, and search the same way.

I'm more of a UI person than a terminal person, so I did the rest from the desktop app.

A drawing app, without ever saying "Convex"

I asked Claude Code to build a collaborative drawing app for my family: a daily whiteboard everyone could draw on and message each other through, one that resets every day. Convex never came up in that prompt. That's the interesting part.

Claude Code worked out on its own that this was a good fit for Convex and pulled in the skill that ships with the plugin. It said something like "great project for Convex," then asked me a handful of clarifying questions about which technologies I wanted and how the family password should work.

The Codex integration doesn't do that. It sits there until you type @Convex.

Diagram comparing Claude Code and ConvexDiagram comparing Claude Code and Convex

It took about 10 to 15 minutes to build, and it used its built-in browser to validate the result before handing it back. The app uses tldraw for the whiteboard itself, and you can flip between days to get a fresh canvas. To check whether it was really real time, I opened it side by side as two different family members, signed in with the shared family password, and drew on one side. It appeared on the other instantly.

A harder test: migrating Supabase to Convex

Building something Convex-shaped from scratch is one test. I wanted a messier, more realistic one: take an existing Supabase app and convert it over.

First I needed a Supabase app, so I prompted my way to one. A simple pocket-money tracker where my son logs the jobs he's done and their amounts, with a running weekly total. It built fine. It wouldn't run, though, until I manually created a Supabase project and pasted SQL into their editor myself. You can't spin up a Supabase project from the CLI the way you can with Convex. I missed Convex almost immediately. That setup friction is just what building on Supabase involves and AI-assisted coding didn't introduce it, but it stood out by comparison.

Once it was running I tested the sync. I logged one job on one screen and it appeared. I logged a second, "mowed the lawn," and this time nothing showed up on the other screen until I refreshed by hand. The generated app wasn't using Supabase's real-time features by default, so live updates would have meant going in and wiring that up myself. Rather than debug that, I asked Claude Code to convert the whole thing to Convex.

Debugging the auth error

Even before I finished describing the migration, Claude Code had picked up that authentication would be the hard part. It suggested Convex Auth with email and password, the simplest option to wire up. Auth is the one area where Supabase (and Firebase, for that matter) is still ahead of Convex today. We're working on making it easier. Right now it isn't the smoothest part of the experience.

That showed up almost immediately. I tried creating an account and got "Failed to authenticate: No auth provider found matching the given token." I handed the console error back to Claude Code and asked it to investigate.

It came back with a small, stupid mistake. The secret was being read through the untyped process.env side of Convex's environment variable system.

1// Reads as string | undefined, no validation, typos slip through to runtime
2const authSecret = process.env.AUTH_SECRET;
3

Convex lets you declare environment variables with a validator so they come back through a generated, typed env object instead.

1// convex/convex.config.ts
2const app = defineApp({
3  env: {
4    AUTH_SECRET: v.string(),
5  },
6});
7
8// anywhere under convex/
9import { query, env } from "./_generated/server";
10env.AUTH_SECRET; // typed as string, validated at deploy time
11

Claude Code fixed it, I created an account, and it worked. Then came the real test. I opened the app on two screens, logged "mow the lawn" for $1 on one side, and it appeared on both immediately. Same with the next entry.

That's three sync tests across the two builds:

What I testedLive sync?
Drawing app, built on Convex from a single promptYes. Drew on one screen, it appeared on the other.
Pocket-money app, generated on SupabaseNo. "Mowed the lawn" sat there until I refreshed by hand.
The same app after Claude Code migrated it to ConvexYes. Both entries landed on both screens right away.

The app was properly convexified and syncing live, which was the whole point of the migration.

What's inside the plugin

Open Customize, look at the Convex plugin's own settings, and you can see what it's built from.

PieceWhat it does
Design skillsThe Convex guidance Claude Code pulls in on its own. I watched it reach for these across both builds.
ConnectorsI'm not entirely sure. From the settings it looks like they start the Convex MCP server.
MCP serverLets the model introspect a deployment's tables and functions, and run queries, without shelling out to the CLI for everything.
Convex Expert agentWrites Convex code grounded in Convex's own guidelines rather than general training knowledge. It got invoked constantly.
HooksRun after every tool use, type-checking automatically whenever the model writes or edits code.

Our MCP server is pretty fully featured, though it still doesn't cover 100% of what the CLI can do. That's one reason I reach for the CLI more often than MCP these days.

Between the autonomous activation, the dedicated agent, and the type-checking hooks, this plugin is going to be the main surface we use to keep improving the Claude Code experience for Convex. We'll add more integrations as Anthropic extends what plugins can do. If you're using Claude Code with Convex, install it.

All gas, no breakages

Convex is the reactive backend platform that keeps up with you and your agents. Database, functions, workflow, sync, search, file storage, and more. All TypeScript, zero glue.

Get started