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)#
- Create an organisation named after the brand (
grantstamp), or use your personal account. The MCP name inserver.jsonand the README isio.github.<org>/grantstamp. Runpython scripts/rebrand.py Grantstamp --github-org <yours>if your org name differs. -
Create a public repository
grantstampwith 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 -
Settings → Pages → Source: GitHub Actions. Settings → Secrets and variables → Actions → Variables: add
SITE_DOMAIN=grantstamp.ioandREGISTRY_URL=https://registry.grantstamp.io. - Settings → Code security → enable Private vulnerability reporting. Settings → General → enable Discussions for community questions.
- 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)#
- 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). - Copy the connection string. It looks like
postgresql://user:password@ep-xxxx.us-east-2.aws.neon.tech/neondb?sslmode=require. - 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)#
- Sign up at render.com with GitHub, then choose New → Blueprint and pick the repository.
render.yamldefines a free Docker web service. -
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 withpython -c "from grantstamp.crypto import generate_key, private_key_to_pem; print(private_key_to_pem(generate_key()).decode())".GRANTSTAMP_LINKEDIN_CLIENT_IDandGRANTSTAMP_LINKEDIN_CLIENT_SECRET: from your LinkedIn developer app, with the product "Sign In with LinkedIn using OpenID Connect" added andhttps://registry.grantstamp.io/v1/identity/linkedin/callbacklisted 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.
-
Deploy, then open
https://<service>.onrender.com/healthzand check that it shows"ok": trueand the version you expect.GET /v1/whoamishows how the registry sees you. Thecallervalue must stay the same when you add a made-upX-Forwarded-Forheader. On Render the registry readsCF-Connecting-IPfor this without any setting. - 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:
-
Free, persistent, your own machine:
grantstamp serve --host 127.0.0.1 --port 8000behind a Cloudflare Tunnel. Installcloudflared, then:cloudflared tunnel login cloudflared tunnel create grantstamp cloudflared tunnel route dns grantstamp registry.grantstamp.io cloudflared tunnel run --url http://localhost:8000 grantstampThis needs the domain's DNS on Cloudflare. It is up only while your computer is on.
-
Cheap and always on: a small VPS (about $4–6 a month). Run
git clone …, editCaddyfile, thendocker compose up -d. Caddy gets HTTPS certificates automatically, and SQLite lives on a Docker volume.
PyPI (10 minutes)#
- Create an account at pypi.org and turn on two-factor authentication.
- Account → Publishing → Add a pending publisher, twice: once for project
grantstamp(the Apache-2.0 client) and once forgrantstamp-server(the AGPL-3.0 registry). Both use your GitHub owner and repository, workflowrelease.ymland environmentpypi. This is trusted publishing, so no token needs to be stored. -
Release:
git tag v0.1.0 && git push origin v0.1.0The release workflow builds both packages, publishes them to PyPI, creates a GitHub release, pushes
ghcr.io/<org>/grantstampand publishes to the MCP Registry. -
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:
- the README must contain
mcp-name: io.github.<org>/grantstamp(it does, in an HTML comment) - the PyPI version must exist before publishing (the workflow waits 60 seconds).
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).
Zenodo and Software Heritage (5 minutes; recommended for priority evidence)#
- Zenodo: log in with GitHub, open the GitHub tab, and switch on the
grantstamprepository. Every GitHub release is then archived with a DOI and a date stamp. Add the DOI badge to the README. - Software Heritage: submit the repository URL at softwareheritage.org → "Save code now". It archives the history with permanent identifiers (SWHIDs).
Alerts, uptime and witness#
- Your alerts: create a Slack incoming webhook or a Discord channel webhook, then run
grantstamp owner webhook <url> --format slack(or--format discord). - Uptime: create a free UptimeRobot HTTP monitor on
https://registry.grantstamp.io/healthzevery 5 minutes, with email alerts. - Log witness:
.github/workflows/witness.ymlcommits the signed log head daily towitness/heads.jsonl, saves a copy underwitness/ots/and timestamps that copy with OpenTimestamps. It needs theREGISTRY_URLvariable from 5.2, and you can run it manually once to test. Check it withgrantstamp audit. - Status page:
status.htmlon the website asks the registry, the witness file and PyPI from the visitor's browser. It needs no setup.
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.
- 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, rungrantstamp admin log-keyand check that it prints the same key as thelogline. Then commit the file. Every client then trusts that key, and the Pages mirror below switches on. - 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 thewitness-statebranch before it hands a cosignature in, withgrantstamp witness cosign --no-submit, thengrantstamp witness submit. Then setGRANTSTAMP_WITNESS_POLICYon Render towitness github <its key>; quorum github. From then on/log/checkpointserves only checkpoints the witness has cosigned. - Independent witnesses. Ask operators of C2SP witnesses to witness the log, or ask someone you trust to run
grantstamp witness serve. Add each one aswitness NAME KEY URL. The registry pushes new checkpoints to every witness with a URL. Raise the quorum as they join, for examplegroup two 2 github w1 w2; quorum two. A witness must never also run a host. -
Checks through hosts (experimental). Set
GRANTSTAMP_MAP=1to 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_DIRsays 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-keymakes 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-mapon 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).
-
The Pages mirror.
.github/workflows/pages.ymlcopies the log and the listed stamps tohttps://grantstamp.io/registry/each time it runs, checking everything against the pinned key. List it inGRANTSTAMP_LOG_MIRRORSso 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:
BLUESKY_HANDLEandBLUESKY_APP_PASSWORD(Bluesky → Settings → Privacy and security → App passwords). Tip: use your domain as your handle (@grantstamp.io). Bluesky verifies it with a DNS TXT record.MASTODON_INSTANCE(e.g.https://mastodon.social) andMASTODON_TOKEN(Preferences → Development → New application, scopewrite:statuses).
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:
- In Cloudflare, set SSL/TLS → Overview to Full (Render's guide for Cloudflare asks for this mode).
- Switch the
registryDNS record from "DNS only" to "Proxied". - Add one rate-limiting rule for paths starting with
/v1/(the free plan includes one). - Open
https://registry.grantstamp.io/v1/whoamifrom two different networks, for example a laptop and a phone on mobile data. The twocallervalues must differ. If they are the same, every visitor is sharing one rate-limit bucket: switch the record back to "DNS only" and checkGRANTSTAMP_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"
verify-identityis the route for owners who cannot or will not use LinkedIn. The name you record is published on their stamps.noticegives the owner 14 days unless you pass--days, or setGRANTSTAMP_NOTICE_DAYSwhere you run it.noticeprints the owner's contacts and an email ready to send. Send it to the address you gave as--sent-to.- Only a notice with a recorded address can lapse. One that passes its date unanswered suspends the stamp on its own and tells the owner.
- Alerts made by these commands (a notice, a decision) reach the owner's webhook with the registry's next request, within about a minute.
resolve … upheldneeds an answered or lapsed notice first (--without-noticewhen the owner agrees). A decided case changes only with--reopen.
The rules are in Who can stamp, and conflicts and the case policy.
Backups and rolling back#
- Before an upgrade, take a Neon snapshot or branch of the database (Neon console → Branches → Create branch). New versions add columns and never remove them, so an older version can still run on the upgraded database.
- To roll back, redeploy the previous image or commit on Render. If the new version wrote data the old one cannot read, restore the branch you made.
- Keep
GRANTSTAMP_REGISTRY_KEYsomewhere safe off Render. Without it, receipts and log heads issued so far cannot be verified against a new key.
Releasing a new version#
- Merge the release branch into
main. Render redeploys the registry. - Wait until
GET https://registry.grantstamp.io/v1/statusreports the new version, and check the stamp page and a check. - 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.