MM-AMP Integration

The mm CLI (memorymarket) is a superset of the upstream @arkzero/amp CLI. It ships the same keygen, sign, verify, install, uninstall, and inspect commands from the protocol, plus MM-specific commands: publish, login, register-key, search, and update. See AMP protocol docs for the protocol-level commands.

Recommended: skill-driven flow

The fastest way to publish or install packs is to let your agent drive the CLI through two bundled skills, /mm-publish and /mm-add. The CLI ships them inside the npm package; install them once, then call them from your agent.

$ npm install -g memorymarket
# then ask your agent to install the skills:
Install the MemoryMarket skills from the npm package.
# create your draft on the web (memorymarket.co/sell/new),
# click + New pack, then copy the pack-id from the URL bar.
# then in your agent:
$ /mm-publish --pack-id <uuid> # creator: package + sign + publish
$ /mm-add @user/slug # buyer: install someone else's pack

/mm-publish handles auth, key setup, scanning your memory files, building a valid pack directory, signing, and publishing — but the draft itself is always created on the web (memorymarket.co/sell/new). The skill takes the pack-id as input. /mm-add walks the install side: pick a pack, choose project or user scope, run mm install, and optionally weave the pack into your knowledge wiki.

The raw CLI reference below is the manual fallback — useful for CI, scripting, or if you prefer to drive each step yourself.

What mm adds

The upstream @arkzero/amp CLI handles the pack format, signing contract, and local install mechanics. memorymarket layers the MemoryMarket registry on top: authentication, key registration, server-side credential scanning, publishing, and update tracking. If you only need to install or verify packs locally, @arkzero/amp is sufficient. If you want to publish to the registry or install from it, use memorymarket. See the protocol docs for the full AMP command reference.

Raw CLI reference (advanced)

The mm CLI (npm install -g memorymarket, Node.js 18+) covers both registry operations and protocol-level pack work. For the underlying protocol, see the AMP protocol docs.

mm login

Authenticate with MemoryMarket. Opens a browser window to complete the flow.

$ mm login

mm logout

Sign out of MemoryMarket. Revokes the bearer token server-side and deletes the local credentials file at ~/.config/memorymarket/credentials.json. Idempotent — calling it without an active session is a no-op.

$ mm logout

mm whoami

Show the currently authenticated user.

$ mm whoami

mm search

Search packs on the registry.

$ mm search typescript style guide

mm install

Install a pack from the registry or a local directory. Registry installs require authentication and enforce all signature gates. --agent accepts: claude-code, codex, cursor, windsurf, openclaw. Auto-detected from project markers if omitted.

$ mm install @creator/slug
$ mm install @creator/slug --scope user
$ mm install --from-path ./my-pack
$ mm install --from-path ./my-pack --agent claude-code

mm update

Pull the latest version of an installed pack from the registry.

$ mm update my-pack
$ mm update my-pack --dry-run

mm inspect

Show metadata and tamper status of an installed pack.

$ mm inspect my-pack

mm uninstall

Remove an installed pack. Cleans the managed block and deletes the pack directory.

$ mm uninstall my-pack
$ mm uninstall my-pack --scope user

mm keygen

Generate an Ed25519 signing keypair. Stored at ~/.memorymarket/keys/signing.key and ~/.memorymarket/keys/signing.pub by default.

$ mm keygen
$ mm keygen --out ./my-key.key
$ mm keygen --force

mm sign

Sign a pack with your private key. Writes signed: true and signature into manifest.json.

$ mm sign ./my-pack
$ mm sign ./my-pack --key ./my-key.key

mm verify

Verify a pack's signature. Exits 0 if valid, 1 if tampered or missing.

$ mm verify ./my-pack --public-key ~/.memorymarket/keys/signing.pub

mm register-key

Link your public key to your MemoryMarket account. Required before your first publish.

$ mm register-key
$ mm register-key --pub ./my-key.pub --label work

mm publish

Publish a signed pack from the current directory. The registry runs a server-side credential scan before accepting.

$ mm publish
$ mm publish --dry-run
$ mm publish --pack-id <uuid> # re-publish to existing pack

Publish flow

01
CREATE THE PACK DIRECTORY

You need at minimum a manifest.json, an agents.md routing table, and at least one capability file. Use exactly this manifest shape — the version field must be an object with a number key, and title and agents are required:

manifest.json
{
"name": "my-pack",
"title": "My Memory Pack",
"version": { "number": 1 },
"layout": "semantic-cluster",
"primitive_format": "inline-tag-v0.4",
"agents_file": "agents.md",
"agents": ["claude-code"],
"capability_files": ["operating-principles.md"],
"signed": false,
"signature": ""
}

Note: "signed" and "signature" are placeholders — mm sign fills them in automatically.

PACK LAYOUT
my-pack/
manifest.json
agents.md
operating-principles.md
copy-voice.md (optional)

See the AMP protocol docs for how to write agents.md and capability files using the four primitives.

02
GENERATE A KEYPAIR

One-time setup. Run mm keygen to create your Ed25519 signing keypair. Your private key stays on your machine — only the public key is registered with MemoryMarket.

$ mm keygen
[verified] keypair written to ~/.memorymarket/keys/
03
REGISTER YOUR PUBLIC KEY

One-time setup. mm register-key links your ~/.memorymarket/keys/signing.key.pub to your MemoryMarket account. This is required before your first publish — mm publish will error if no key is registered.

$ mm register-key
[verified] public key linked to your account
04
SIGN THE PACK

Signs every file with Ed25519 and writes signed: true and the signature into manifest.json. Tampered packs are rejected by the registry on install.

$ mm sign ./my-pack
[verified] signed:true written to manifest.json
05
AUTHENTICATE

Run mm loginto open a browser window and authenticate. Skip this step if you're already logged in.

$ mm login
06
PUBLISH

Run mm publish from your pack directory. The registry runs a server-side credential scan before accepting the pack.

$ mm login
$ mm publish
[verified] credential scan passed
[done] live at memorymarket.co/pack/you/my-pack

The pack URL follows the pattern memorymarket.co/pack/you/my-pack (note the /pack/ prefix).

Registry gates

The AMP protocol's 5 validation gates apply on every install. MemoryMarket adds these additional gates before a pack is accepted into the registry:

  • Publisher key registered (linked to your account via mm register-key)
  • Publisher identity bound to GitHub + Stripe
  • Server-side re-scan passes (credential scanner)
  • Pack not revoked

Web wizard

For quick uploads, use the web wizard at /sell/new. Upload up to 20 files (200KB total — markdown, YAML, JSON, or plain text). Signing is handled server-side.

Free packs publish immediately. Paid packs require a Stripe Express account connected at Settings → Payouts.

Installing from the registry vs locally

Registry install — requires auth, signature verified, all registry gates enforced:

$ mm install @creator/slug
[verified] ed25519 ok
[done] installed

Local install — skips auth and signature check. Use for development and testing:

$ mm install --from-path ./my-pack

After publishing

Your pack is live at memorymarket.co/pack/you/my-pack. Install it with:

$ mm install @you/my-pack

Buyers can run mm update to pull the latest version. To release an update, bump version.number in manifest.json, re-sign with mm sign, and re-publish with mm publish.

Pricing

Beta: 0% platform fee. Volume phase: 2%. GA: 15%. Promotions between phases are announced in advance. During beta, 100% of each sale (minus Stripe's processing fee) goes to the creator.