This is the documentation for version 0.4. Read this page for version 0.5, the latest.

Integrations you need, with instructions#

Everything needed to go live is free, except a domain. Paid services are listed separately and are not needed until you charge money or file for a trademark.

What you need#

Service Why Cost When
GitHub (organisation + public repo) code, issues, CI, website (Pages), Docker images (GHCR), log witness free today
Domain, e.g. grantstamp.io brand ownership, website, registry URL, email, owner verification about $10–20 a year today
Neon (Postgres) registry database that survives restarts free plan: 1 GB per project, no card today
Render (web service) runs the registry API from the Dockerfile free plan (sleeps after 15 min idle) today
PyPI pip install grantstamp and pip install grantstamp-server free today
MCP Registry makes the MCP server discoverable by AI clients free today
Cloudflare (DNS, email routing, web analytics) DNS, contact@ forwarding, privacy-friendly stats free optional
UptimeRobot uptime alerts for /healthz free plan optional
Slack or Discord webhook your own alerts free optional
Zenodo + Software Heritage DOI and public archive per release (dated priority evidence) free recommended
Bluesky, Mastodon, LinkedIn, dev.to promotion, partly automated free launch day
Later: USPTO trademark, attorney, company formation legal protection paid when revenue or risk justifies it

Sources for the free plans: Render free web services (15-minute idle spin-down, ephemeral disk) and Neon free plan (no card, permanent free plan).

GitHub (15 minutes)#

  1. Create an organisation named after the brand (grantstamp), or use your personal account. The MCP name in server.json and the README is io.github.<org>/grantstamp. Run python scripts/rebrand.py Grantstamp --github-org <yours> if your org name differs.
  2. Create a public repository grantstamp with no template. Then push:

    unzip grantstamp.zip && cd grantstamp
    git init -b main && git add -A && git commit -m "Grantstamp 0.1.0"
    git remote add origin https://github.com/<org>/grantstamp.git && git push -u origin main
    
  3. Settings → Pages → Source: GitHub Actions. Settings → Secrets and variables → Actions → Variables: add SITE_DOMAIN = grantstamp.io and REGISTRY_URL = https://registry.grantstamp.io.

  4. Settings → Code security → enable Private vulnerability reporting. Settings → General → enable Discussions for community questions.
  5. Settings → Environments → create pypi (used by the release workflow).

Domain and DNS (20 minutes plus propagation)#

Buy grantstamp.io from any registrar (Cloudflare Registrar sells at cost, and Porkbun and Namecheap also work). .dev sites must use HTTPS. GitHub Pages and Render handle certificates for you. Then add these records:

Record Name Value Purpose
A ×4 @ 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153 website on GitHub Pages
AAAA ×4 (optional) @ 2606:50c0:8000::153 … 2606:50c0:8003::153 IPv6 for Pages
CNAME www <org>.github.io www redirect
CNAME registry <your-service>.onrender.com (from Render) the API
TXT _grantstamp grantstamp-verify=<owner id>:<key id> (from grantstamp owner domain grantstamp.io) verify yourself as owner (dogfooding)

In GitHub, add the custom domain under Settings → Pages before you create the DNS records, as GitHub's documentation recommends. Then tick "Enforce HTTPS" once the certificate is issued.

Email: turn on your registrar's free forwarding (Cloudflare Email Routing, Porkbun or Namecheap) for contact@, security@, legal@ and privacy@, pointing at your inbox. The Terms, the privacy notice and the case policy name these addresses.

Neon Postgres (5 minutes)#

  1. Sign up at neon.com with GitHub and create a project named grantstamp. Pick the region closest to your Render region (both have US-East options).
  2. Copy the connection string. It looks like postgresql://user:password@ep-xxxx.us-east-2.aws.neon.tech/neondb?sslmode=require.
  3. Keep it secret. It goes into Render as GRANTSTAMP_DB.

The registry creates its tables on first start, and adds new columns itself when you upgrade.

Storage is what fills first. It was measured at about 76 KB of database per registered executable, and about 16 MB per GB of art or data files (bench/LOAD.md). Neon's free plan gives 1 GB per project, which holds about 12,000 executables or about 60 GB of game assets.

GET /v1/status reports the database size, and the fair-use ceilings in 5.12 stop one owner from filling it.

Render web service (10 minutes)#

  1. Sign up at render.com with GitHub, then choose New → Blueprint and pick the repository. render.yaml defines a free Docker web service.
  2. Set the environment variables:

    • GRANTSTAMP_DB: the Neon connection string.
    • GRANTSTAMP_PUBLIC_URL: https://registry.grantstamp.io.
    • GRANTSTAMP_REGISTRY_KEY: a PEM key that keeps receipts verifiable even if the database is reset. Generate it locally with python -c "from grantstamp.crypto import generate_key, private_key_to_pem; print(private_key_to_pem(generate_key()).decode())".
    • GRANTSTAMP_LINKEDIN_CLIENT_ID and GRANTSTAMP_LINKEDIN_CLIENT_SECRET: from your LinkedIn developer app, with the product "Sign In with LinkedIn using OpenID Connect" added and https://registry.grantstamp.io/v1/identity/linkedin/callback listed under Auth → Authorized redirect URLs. Without them, owners are told to write to you to be checked by hand.

    Paste secrets only into Render's environment settings, never into a chat, an issue or the repository.

  3. Deploy, then open https://<service>.onrender.com/healthz and check that it shows "ok": true and the version you expect. GET /v1/whoami shows how the registry sees you. The caller value must stay the same when you add a made-up X-Forwarded-For header. On Render the registry reads CF-Connecting-IP for this without any setting.

  4. Settings → Custom Domains → add registry.grantstamp.io, then create the CNAME from 5.3.

Free-plan behaviour: the service sleeps after 15 minutes without traffic and takes about a minute to wake. That is fine for a prototype. An UptimeRobot check every 5 minutes keeps it awake. One service running all month stays within Render's 750 free hours.

For always-on with no cold starts, move to a paid instance (about $7 a month).

Alternatives:

PyPI (10 minutes)#

  1. Create an account at pypi.org and turn on two-factor authentication.
  2. Account → Publishing → Add a pending publisher, twice: once for project grantstamp (the Apache-2.0 client) and once for grantstamp-server (the AGPL-3.0 registry). Both use your GitHub owner and repository, workflow release.yml and environment pypi. This is trusted publishing, so no token needs to be stored.
  3. Release:

    git tag v0.1.0 && git push origin v0.1.0
    

    The release workflow builds both packages, publishes them to PyPI, creates a GitHub release, pushes ghcr.io/<org>/grantstamp and publishes to the MCP Registry.

  4. On GitHub → Packages → grantstamp → Package settings, set the visibility to Public.

Publishing to PyPI early also claims both package names.

MCP Registry and directories (10 minutes)#

The release workflow runs mcp-publisher login github-oidc and mcp-publisher publish using server.json. Two things must be true:

To validate locally, install mcp-publisher and run mcp-publisher validate. Then submit the GitHub URL to community directories: Smithery, Glama, PulseMCP and mcp.so (free forms).

Alerts, uptime and witness#

Witnesses and mirrors (0.4). The registry serves its log as tiles at /log/ and signs checkpoints with its own key. Its origin is the public URL's host and path plus /log, unless GRANTSTAMP_LOG_ORIGIN says otherwise.

  1. Pin the log key. After deploying, run curl -s https://registry.grantstamp.io/v1/log/policy > src/grantstamp/logs/registry.grantstamp.io_log.policy. In the Render shell, run grantstamp admin log-key and check that it prints the same key as the log line. Then commit the file. Every client then trusts that key, and the Pages mirror below switches on.
  2. The GitHub witness. Follow the setup at the top of .github/workflows/cosign.yml. It cosigns from a key the registry's host never sees. Start it with a timer: see Pick a timer. It saves its state to the witness-state branch before it hands a cosignature in, with grantstamp witness cosign --no-submit, then grantstamp witness submit. Then set GRANTSTAMP_WITNESS_POLICY on Render to witness github <its key>; quorum github. From then on /log/checkpoint serves only checkpoints the witness has cosigned.
  3. Independent witnesses. Ask operators of C2SP witnesses to witness the log, or ask someone you trust to run grantstamp witness serve. Add each one as witness NAME KEY URL. The registry pushes new checkpoints to every witness with a URL. Raise the quorum as they join, for example group two 2 github w1 w2; quorum two. A witness must never also run a host.
  4. Checks through hosts (experimental). Set GRANTSTAMP_MAP=1 to publish the check map and run the token service.

    • A new generation is built when stamps change, at most every 10 minutes, and logged.
    • GRANTSTAMP_MAP_DIR says where its files go. The default is a temporary folder. After a restart the registry writes the same generation again, without a new log entry.
    • grantstamp admin rotate-map-key makes every older copy useless, at once.
    • The web server builds maps of up to 400,000 features. For a bigger one, run grantstamp admin build-map on a machine with more memory.
    • A check through hosts accepts a host's map only if it is the current one, or was made in the last 2 hours (--max-age).

    See Mirrors and witnesses.

  5. The Pages mirror. .github/workflows/pages.yml copies the log and the listed stamps to https://grantstamp.io/registry/ each time it runs, checking everything against the pinned key. List it in GRANTSTAMP_LOG_MIRRORS so clients know where else to fetch. When the registry is asleep, the website reads the mirror instead.

Social automation (optional)#

Add these repository secrets (Settings → Secrets → Actions), and .github/workflows/announce.yml posts each release automatically:

X/Twitter posting through the API is paid, so post there by hand. The same goes for LinkedIn, Hacker News and Reddit, which work best posted by a person anyway.

Agent integrations#

See ../integrations/README.md: Claude Code (MCP and enforced hook), Claude Desktop, Cursor, VS Code, plain HTTP, the Python client, and instructions for AI providers.

Operating the registry#

Task Command
verify an owner's domain by hand (e.g. after an email check) grantstamp admin --db "$GRANTSTAMP_DB" verify-domain own_… example.com --note "emailed legal@"
trust an AI provider's agent (full evidence) grantstamp admin --db … trust-agent agt_…
give a provider's agent its own rate limit grantstamp admin --db … agent-limit agt_… 20000 (requests a minute, and 0 returns it to its class's)
let a new key take over an owner account, after checking who asks grantstamp admin --db … approve-recovery rcv_… --note "what you checked" (takes effect after GRANTSTAMP_RECOVERY_DAYS, 7 by default. Owners can also prove it themselves through a domain or LinkedIn)
what is waiting for you grantstamp admin --db … queue (new cases, notices and their dates, answers to read, recent lapses)
list and decide cases grantstamp admin --db … disputes · grantstamp admin --db … resolve dsp_… upheld --note "…"
answer an access or deletion request grantstamp admin --db … export-owner own_… · grantstamp admin --db … erase-identity own_… [--provider linkedin]
suspend an abusive owner or stamp grantstamp admin --db … owner-status own_… suspended stops the owner registering or changing stamps and takes their stamps out of search. Their stamps keep matching until you also run stamp-status stamp_… suspended for each.
correct an owner's name, website or private contact grantstamp admin --db … owner-edit own_… --name "…" --url https://… --contact … (logged, without the private contact)
free the space a junk stamp took grantstamp admin --db … purge-stamp stamp_… --note "…" (suspends it and deletes its fingerprints)
stats grantstamp admin --db … stats or GET /v1/stats

Run these from your own machine with the Neon connection string. Each one is written to the transparency log.

Settings that protect the registry (environment variables on the server):

Setting Default What it does
GRANTSTAMP_IP_HEADER cf-connecting-ip on Render, otherwise empty The header your edge sets with the caller's address. Use it behind Cloudflare.
GRANTSTAMP_PROXY_HOPS 1 Without the header above: which entry of X-Forwarded-For to trust, counted from the right. Set it to the number of your own proxies. Entries further left come from the caller and are ignored.
GRANTSTAMP_REQUIRE_IDENTITY 1 Owners need an identity on record and a public contact before they can stamp. 0 turns this off, for a private registry.
GRANTSTAMP_LINKEDIN_CLIENT_ID / _CLIENT_SECRET empty Credentials of your LinkedIn developer app, for the one-time sign-in. Add <public URL>/v1/identity/linkedin/callback as a redirect URL in the app. Without them, owners are told to write to you.
GRANTSTAMP_LINKEDIN_PRODUCT signin signin uses Sign In with LinkedIn using OpenID Connect, which ties the owner account to a LinkedIn account. LinkedIn does not verify identities with it. verified uses Verified on LinkedIn (an identity check), if your app has that product.
GRANTSTAMP_DOMAIN_MIN_AGE_DAYS 90 A proven domain younger than this is shown as new and does not count as verified.
GRANTSTAMP_CODESIGN_ROOTS empty A PEM or DER file of code-signing roots to trust in place of the roots Microsoft trusts. For testing and private registries.
GRANTSTAMP_QUOTA_STAMPS_UNVERIFIED / _VERIFIED 25 / 5,000 Stamps one owner may hold. 0 means no ceiling.
GRANTSTAMP_QUOTA_FEATURES_UNVERIFIED / _VERIFIED 250,000 / 2,000,000 Fingerprint features one owner may store (about 92 bytes each).
GRANTSTAMP_QUOTA_FEATURES_UNVERIFIED_TOTAL 1,000,000 Features all unverified owners may store between them, so throwaway accounts cannot fill the registry.
GRANTSTAMP_QUOTA_FEATURES_TOTAL 4,000,000 Features the whole registry may store. The default stays well inside a 1 GB database. Raise it when you have more room. GET /v1/status shows how much is used.
GRANTSTAMP_LIMIT_ANONYMOUS and the other LIMIT_* 30, 600, 6,000 a minute Rate limits per caller class.
GRANTSTAMP_OPEN_REGISTRATION 1 Set to 0 to stop new owner accounts.
GRANTSTAMP_TERMS_VERSION 2026-11-27 The version of the Terms owners must accept before stamping. Change it when you change the Terms. Owners are then asked to accept again. none turns acceptance off.
GRANTSTAMP_TERMS_URL / GRANTSTAMP_PRIVACY_URL / GRANTSTAMP_CASE_POLICY_URL the site's own pages Where your Terms, privacy notice and case policy are. The pages that ship with the package are the hosted registry's: on a registry of your own, publish yours and point these at them. Set GRANTSTAMP_CASE_POLICY_URL where you run admin notice too, so the notice email links it.
GRANTSTAMP_RETENTION_DAYS 365 Events and alerts older than this are deleted, hourly.
GRANTSTAMP_RECOVERY_DAYS 7 Days between proving a lost-key recovery and the new key taking over. The current key can cancel in that time.
GRANTSTAMP_MAX_SIGNATURES 500 Publisher signatures verified per upload. Files beyond this are stored without a verified publisher.
GRANTSTAMP_REVOCATION_BUDGET 10 Seconds one upload may spend fetching revocation lists. After that, revocation is recorded as not checked. A list that could not be fetched is not tried again for 15 minutes.

Before you announce the registry, put a shield in front of it. A single small server has no other defence against a flood. With the domain on Cloudflare and the custom domain already verified on Render:

  1. In Cloudflare, set SSL/TLS → Overview to Full (Render's guide for Cloudflare asks for this mode).
  2. Switch the registry DNS record from "DNS only" to "Proxied".
  3. Add one rate-limiting rule for paths starting with /v1/ (the free plan includes one).
  4. Open https://registry.grantstamp.io/v1/whoami from two different networks, for example a laptop and a phone on mobile data. The two caller values must differ. If they are the same, every visitor is sharing one rate-limit bucket: switch the record back to "DNS only" and check GRANTSTAMP_IP_HEADER.

Owners and cases#

grantstamp admin queue                         # what is waiting for you
grantstamp admin verify-identity <owner> --name "Name as published" --profile https://… --note "what you checked"
grantstamp admin disputes                      # open cases; --status noticed, answered, lapsed
grantstamp admin notice <case> --days 14 --sent-to legal@owner.example   # only after you judged that it has merit
grantstamp admin resolve <case> upheld --note "only the claimant showed proof"     # suspends the stamp
grantstamp admin resolve <case> rejected --note "the owner showed a dated source history"

The rules are in Who can stamp, and conflicts and the case policy.

Backups and rolling back#

Releasing a new version#

  1. Merge the release branch into main. Render redeploys the registry.
  2. Wait until GET https://registry.grantstamp.io/v1/status reports the new version, and check the stamp page and a check.
  3. Then tag it: git tag v0.3.1 && git push origin v0.3.1. The release workflow publishes the client and server to PyPI. Tagging last means nobody installs a client that needs a registry feature before the registry has it.

Source of this page on GitHub. Documentation for Grantstamp 0.4, licensed CC BY 4.0.