io.github.emercoin/emercoin-agent
Official5 toolsby emercoin · Python
Emercoin Agent
On-chain identity and durable memory for AI agents on the Emercoin blockchain (NVS).
On-chain identity and persistent memory for AI agents using Emercoin blockchain.
Topics
Captured live from the server via tools/list.
node_status
Report the Emercoin node's version, block height, header height, peer connections and sync state (`synced` true once block == header height). Read-only, no sign-in required, no parameters. Call it first in a session to confirm the node is healthy and fully synced before trusting `read_record` or writing with `register_identity` / `store_memory`.
No parameters.
read_record
Read one Emercoin NVS (Name-Value Storage) record by its full name — an agent's identity (`ai:gh:<github_id>`) or a memory (`ai:gh:<github_id>:mem:<hash>`) written by `register_identity` / `store_memory`. Returns the confirmed on-chain record, or a `pending` one still in the mempool — the `status` field ('confirmed' | 'pending') distinguishes them. Read-only, no sign-in required; use `whoami` to find your own github_id. Returns null fields for a name that does not exist.
Parameters (1)
- namestringrequired
Full NVS record name to read. Identity records are 'ai:gh:<github_id>' (e.g. 'ai:gh:3772563'); memory records are 'ai:gh:<github_id>:mem:<sha256-hex>'. Any existing NVS name works.
whoami
Report the current session's identity. Read-only, no sign-in required: an anonymous session gets `{authenticated: false}` with a hint (not an error), a signed-in one gets `{authenticated: true}` plus the GitHub-rooted id, login and tariff. Call it to confirm who you are before `register_identity` / `store_memory`; an anonymous caller must sign in (GitHub OAuth) first.
No parameters.
register_identity
Create or rotate your on-chain identity record `ai:gh:<github_id>`, binding an Emercoin address to your GitHub identity. Requires a signed-in session (OAuth) and counts against the FREE-tier per-minute write limit. Run `whoami` first to confirm you are signed in; anchor memories under this identity afterwards with `store_memory`. Writes one NVS transaction paid by the gateway (you need no EMC); the record reads back as `pending` at once and `confirmed` after the next block (~10 min on average). Idempotent — calling again rebinds the address. Returns the record name and the transaction id.
Parameters (2)
- addressstringrequired
Emercoin address to bind to your GitHub identity, e.g. 'EVfAn...'. It is the anchor for later signature login — you must control its key (control is proven when you sign a challenge at login, not here).
- metadataany
Optional JSON object stored verbatim in the identity record, e.g. {"agent": "my-bot", "url": "https://..."}. Omit if unused.
store_memory
Anchor a memory/artifact on-chain as the NVS record `ai:gh:<github_id>:mem:<content_hash>` — a tamper-evident fingerprint others can verify later. Requires a signed-in session (OAuth) and counts against the FREE-tier per-minute write limit. Writes one NVS transaction paid by the gateway; reads back `pending` at once, `confirmed` after the next block (~10 min). Not idempotent — each distinct hash is a new record. Register your identity first. Returns the record name and the transaction id.
Parameters (2)
- content_hashstringrequired
Hash of the artifact/memory, e.g. a SHA-256 hex digest. It becomes the record's ':mem:<hash>' suffix; the content itself stays off-chain (e.g. IPFS) — only this fingerprint is anchored.
- metadataany
Optional JSON object stored with the record (note, source, tags, …). Omit if unused.
README not available yet.
Install
Configuration
GATEWAY_URLdefault https://ai.emercoin.comBase URL of the edge gateway the MCP server talks to
claude_desktop_config.json
{
"mcpServers": {
"emercoin-agent": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/emercoin/mcp:0.1.0"
],
"env": {
"GATEWAY_URL": "https://ai.emercoin.com"
}
}
}
}