Agents ask first.
Grantstamp is an open ownership registry for software and game builds. Owners publish fingerprints and a policy, never the files. AI agents check before they decompile, port or modify something, and learn who owns it and what the owner allows.
Free during the rollout. Open source: Apache-2.0 client, AGPL-3.0 registry, open protocol.
What an agent gets back
An agent sends digests, never the file. The registry answers with the owner, the owner's policy for that exact use, a confidence band and a receipt signed by the registry.
Bands are evidence, not verdicts: exact means the same bytes, high means very likely derived, medium means substantial overlap. The owner's licensees and accepted purposes, such as interoperability or security research, are allowed through.
Try it with a file of your own. It stays in your browser.
POST /v1/check, use: port
- Decision
- Not permitted
- Match
- high Starfall Courier 0.9.4
- Owner
- Starfall Studio verified starfall.example
- Guidance
- This content is very likely derived from "Starfall Courier". The owner does not permit 'port'. Do not perform it on the user's behalf unless they provide a licence token from the owner or another clear legal basis.
- Receipt
eyJhbGciOiJFZERTQSIsImtpZCI6Ij…
How it works
Three steps, and the file never travels in any of them.
-
The owner fingerprints a build locally
The command-line tool cuts each file into content-defined chunks, pulls out its strings and code fingerprints, and hashes them. Only hashes leave the machine.
-
The owner registers a stamp
They sign it with their key, prove control of their domain, and set a policy for each use: analyze, decompile, modify, port, extract, redistribute and train.
-
Agents check before they act
Through the MCP server, the Claude Code hook or the HTTP API. The agent gets the owner and the policy for that use, with a signed receipt. The owner gets an alert.
Six situations it was built for
Each one shows what the agent asks, what the registry answers, and what happens next.
A build leaks before launch
Starfall Studio registered its launch build under the standard policy a week before release. The executable leaks, and someone asks a coding agent to get it running on another platform.
The agent's hook fingerprints the file and checks. The copy was recompiled and stripped, but its strings and chunks still match.
grantstamp register ./build \
--title "Starfall Courier" --preset standard
- Agent to registryCheck one file, use: port
- Registry to agenthigh match with Starfall Courier 0.9.4. Not permitted
- Registry to ownerAlert: high match on a port request, from an anonymous caller
The agent declines and says why. The studio knows within seconds, not weeks.
A partner needs to port it
PortCo is under contract to bring the same game to another console. Without Grantstamp, a careful AI tool would refuse them just as it refuses a stranger.
The studio signs a licence token naming PortCo, the stamp, the uses and an expiry. PortCo's agent sends it with every check.
grantstamp token issue --stamp stamp_… \
--to "PortCo" --uses port,modify --days 90
- Agent to registryCheck one file, use: port, with a licence token
- Registry to agentexact match. Token valid for PortCo until 24 Feb. Allowed (licensed)
The partner works without friction. The studio can revoke the token at any time.
A researcher audits a binary
A security researcher wants an agent to help decompile a shipped binary to confirm a vulnerability. The owner's policy denies decompiling in general, but accepts security research as a purpose.
The researcher declares the purpose. The receipt records it, so both sides have evidence of what was claimed.
grantstamp check ./server.bin --use decompile \
--purpose security-research
- Agent to registryCheck one file, use: decompile, purpose: security research
- Registry to agentexact match. The owner accepts this purpose. Allowed (purpose)
- Registry to ownerAlert: exact match, decompile, declared purpose security research
Lawful research is not blocked, and the owner sees that it happened.
A modder wants to patch a game
A studio that welcomes mods registers with the modding-friendly policy: patching is allowed, pulling out assets needs a word with the studio first, and redistributing the game is not allowed.
The modder's agent gets a clear answer for each thing it is about to do, with the studio's own link for requests.
grantstamp policy stamp_… \
--preset modding-friendly
- Agent to registryCheck, use: modify
- Registry to agentAllowed by the owner's policy
- Agent to registryCheck, use: extract
- Registry to agentAsk the owner first with the studio's request page
A path to permission, in place of a vague refusal.
An AI tool refuses too often
A coding assistant blocks anything that looks like reverse engineering, because it cannot tell whose file it is. Most of its refusals hit people working on their own software.
With one check, the tool has the owner's own answer. Where nothing is registered, it proceeds as it normally would and keeps the signed receipt as a record that it looked.
claude mcp add grantstamp -- grantstamp-mcp
- Agent to registryCheck one file, use: decompile
- Registry to agentNo claim matches this file. A signed receipt records the check.
Fewer false refusals, and evidence of diligence when it matters. Checks are free.
Firmware must stay internal
A hardware maker registers device firmware as an unlisted stamp under all rights reserved. It does not appear in search or on the company's public list, but it still matches.
When a contractor's agent is asked to extract code from an image it should never have had, the answer is no, and the security team is told.
grantstamp register ./firmware --unlisted \
--title "Controller FW" --preset all-rights-reserved
- Agent to registryCheck one file, use: extract
- Registry to agenthigh match. Not permitted
- Registry to ownerAlert to the security team's webhook
Nothing about the firmware is public except what a matching file reveals.
Why a copy still matches
No single fingerprint survives every change, so each file gets several. A filled mark means the layer still matches after that change.
| Layer | Exact copy | Patched or embedded | Recompiled or stripped | Ported | Decompiled | Source renamed | Image re-encoded |
|---|---|---|---|---|---|---|---|
| SHA-256 | yes | no | no | no | no | no | no |
| Content-defined chunks | yes | yes | no | no | no | no | no |
| Strings and symbols | yes | yes | yes | yes | yes | no | no |
| Code winnowing | yes | yes | no | no | no | yes | no |
| Image hash | yes | no | no | no | no | no | yes |
| Embedded notice | yes | yes | yes | yes | yes | no | no |
Strings and code literals are what carry a build through recompiling and decompiling. A clean-room rewrite with new text, art and code will not match, and is often lawful anyway. How each layer works, and where it fails.
- Recompiled, stripped, patched, ported and decompiled variants of a test game
- 11 of 11matched high or exact
- Unrelated programs wrongly matched at medium or above
- 0 of 400across different source packages
- One check against 3,000 registered files
- 15 msmedian round trip on a 2-CPU machine; 95% under 90 ms
Prototype-scale benchmarks, reproducible from the repository. Method and full figures.
You do not have to trust the registry
A registry of ownership must not be able to rewrite its own records. Every link below can be checked by anyone, with one command.
Hard to probe
Anonymous callers see coarse bands and low rate limits. Repeated near-misses on one stamp alert its owner. Fingerprints are never served back.
Private for the person checking
Content never leaves the machine. Callers are stored as salted hashes, and an exact hash can be checked by a five-character prefix.
Open to challenge
Overlapping registrations are flagged as conflicts and both owners are told. Anyone can dispute a stamp, and every decision goes in the log.
Start in a few minutes
pip install grantstamp
grantstamp keygen
grantstamp owner create --name "Starfall Studio" --url https://starfall.example
grantstamp owner domain starfall.example # prints a DNS record to add
grantstamp owner verify starfall.example
grantstamp register ./build --title "Starfall Courier" --version 0.9.4 \
--preset standard --contact legal@starfall.example
Fingerprinting runs locally and registration is free. Owner guide
pip install grantstamp
claude mcp add grantstamp -- grantstamp-mcp
# Claude Desktop, Cursor and others: add to the MCP configuration
{
"mcpServers": {
"grantstamp": { "command": "uvx", "args": ["grantstamp", "mcp"] }
}
}
The model gets a check_ownership tool and instructions for when to call it. Agent guide
// .claude/settings.json
{
"hooks": {
"PreToolUse": [
{ "matcher": "Read|Edit|MultiEdit|Write|Bash",
"hooks": [ { "type": "command", "command": "grantstamp-hook", "timeout": 30 } ] }
]
}
}
The hook checks binaries and game files before Claude Code touches them, and applies the owner's decision. Hook guide
grantstamp fingerprint path/to/file --out bundle.json
jq -n --slurpfile b bundle.json '{bundle: $b[0], use: "port"}' > check.json
curl -s https://registry.grantstamp.io/v1/check \
-H 'content-type: application/json' -d @check.json
Sign requests for higher limits. API reference and protocol
pip install grantstamp
grantstamp audit stamp_m6q21daksxa188bx
# log: OK, entries chain to the signed head
# witness: saved heads are still in the log
# stamp: signed by the owner; DNS record names the owner's key
Checks the log, the public witness and any stamp, trusting nothing the registry says. How verification works
An open project, on the record
Everything is public: the code, the protocol, the benchmarks and a dated archive of every release.
- Sourcegithub.com/grantstamp/grantstamp
- Packagesgrantstamp and grantstamp-server on PyPI
- ArchiveDOI 10.5281/zenodo.24567406, and Software Heritage
- For agents
io.github.grantstamp/grantstampin the MCP Registry - LicencesClient Apache-2.0, registry AGPL-3.0, protocol CC BY 4.0
- DocumentationVersioned docs, changelog
- TestsRun on every change, on four Python versions and PostgreSQL
- CiteCITATION.cff
What Grantstamp is not
It is not DRM and not a court. It does not stop leaks or decide what is legal. It puts the owner's claim and policy in front of an agent at the moment it is about to act, and tells the owner fast.