reference

The MCP server

If an AI tool is building your app, give it the whole Gemmein contract as tools — in the editor, no tab-switching. @gemmein/mcp serves the guide, the reference, rule and error explainers, and a live check of your app's boundaries.

It's read-only by design: nothing in it can create, change, or delete anything real — no records, no users, no config. (Its one live check spins up throwaway test sessions in a development environment only; they reach no real data and don't persist.) It teaches your agent to use @gemmein/sdk correctly, and proves the result.

Set it up

Claude Code:

claude mcp add gemmein -- npx -y @gemmein/mcp

Cursor, or any client that takes an mcpServers block:

{ "gemmein": { "command": "npx", "args": ["-y", "@gemmein/mcp"] } }

What your agent gets

  • guide — the full builder's guide: auth flow, the seven safety rules, record shapes, links, uploads, contention, payments.
  • reference — every SDK method, exact signature, return shape, error code.
  • search_docs — targeted search over both, when it needs one fact.
  • explain_rule — any rule's contract, what it's right for, the mistakes to avoid — or a cheat-sheet of all seven at planning time.
  • explain_error — what a GemmeinError code means and exactly what to do about it.
  • validate_collection_name — catches the misnamed-collection trap before it silently blanks an app.
  • reaffirm_template — the CI harness, ready to copy.
  • check_integration — the one that matters most: runs your isolation and access checks live against your own app and hands back structured pass/fail. Detailed below.

check_integration — the one that proves it

Not just a validator — the same boundary checks the reaffirm CI harness runs, handed to your agent live, at build time. Anonymous access refused where it must be, collection names valid, and — with your dev secret key — cross-user isolation proven with two throwaway test sessions. Structured pass/fail back, so the agent fixes what it finds before the app ships.

It catches the class of bug that passes with one user and breaks with two — the "everyone collapses onto the same record" mistake a single-user test never reveals. And there isn't much else for it to test: apps talk to Gemmein in JSON through a rule-enforced API — no query language exposed, no schema a client can enumerate, no raw data layer to reach. The injection-and-enumeration attacks that start with "map the database" have no surface here; the one real surface is the access rules, which is exactly what this checks.

Give tools your pk_ public key — that alone runs the anonymous checks. The cross-user isolation proof also needs an sk_dev secret: the development-only secret key you create in your dashboard. Don't let the sk_ prefix alarm you — it's development-scoped by construction: it works in a development environment only, reaches no real user data, runs behind the same rules and rate limits as everything else, and can never touch the live environment. Keep it in server env vars like any secret. The sk_live secret is refused for test sessions by construction, so this tooling can never touch real users.