antd-mcp

v0.2.1
antd-mcp Checked 2 days ago Published 1 day ago

MCP server that lets AI agents store and fetch data on the Autonomi network through the antd daemon

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

store_data

Store text on the Autonomi network. Args: text: The text content to store. private: If True, store as private (encrypted). The returned ``address`` is the caller-held DataMap and is NOT itself stored on-network — keep it safe. Default: public (DataMap stored on-network at ``address``). payment_mode: Payment strategy — "auto" (default, uses merkle for 64+ chunks), "merkle" (force batch payments, min 2 chunks), or "single" (per-chunk payments). Returns: JSON with ``address`` (on-network addr…

ParameterTypeDescription
text *string
payment_modestring
privateboolean

retrieve_data

Retrieve data from the Autonomi network by address. Args: address: The on-network address (public) or the caller-held DataMap (private). private: If True, retrieve as private (decrypted). Default: public. Returns: JSON with the retrieved text, or error details.

ParameterTypeDescription
address *string
privateboolean

upload_file

Upload a local file to the Autonomi network. Args: path: Absolute path to the local file. private: If True, upload as private (encrypted). The returned ``address`` is the caller-held DataMap and is NOT stored on-network — keep it safe. Default: public (DataMap stored on-network at ``address``). payment_mode: Payment strategy — "auto" (default, uses merkle for 64+ chunks), "merkle" (force batch payments, min 2 chunks), or "single" (per-chunk payments). Returns: JSON with ``address`` (on-net…

ParameterTypeDescription
path *string
payment_modestring
privateboolean

download_file

Download a file from the Autonomi network to a local path. Args: address: The on-network address (public) or the caller-held DataMap (private). dest_path: Local path to save to. private: If True, download as private (decrypted). Default: public. Returns: JSON confirming success, or error details.

ParameterTypeDescription
address *string
dest_path *string
privateboolean

stream_download_file

Download a network object to a local path, streaming with constant memory. Unlike ``download_file`` (which asks the daemon to write the file server-side, requiring the daemon and this MCP server to share a filesystem), this tool streams the raw bytes back to the MCP server process and writes them to ``dest_path`` on **this** host, one chunk at a time. It never buffers the whole object in memory, so it suits large objects. Args: address: The on-network address (public) or the caller-held DataMap (private). dest_path: Local path (on the MCP s…

ParameterTypeDescription
address *string
dest_path *string
privateboolean

get_cost

Estimate storage cost before committing data to the network. Provide exactly one of text or file_path. Args: text: Text content to estimate cost for. file_path: Local file path to estimate cost for. payment_mode: Payment strategy the estimate should reflect — "auto" (default), "merkle", or "single". Returns: JSON with cost estimate in atto tokens, or error details.

ParameterTypeDescription
file_path
payment_modestring
text

check_health

Check antd daemon health and network status, and whether antd-mcp is current. Returns: JSON with health, network, and (when reported by antd >= 0.4.0) diagnostic fields: version, evm_network, uptime_seconds, build_commit, payment_token_address, payment_vault_address. Also antd_mcp_version, latest_antd_mcp_version and update_available (null until PyPI has answered, or when the check is off or failed; update_check says which). When update_available is true, update_hint says how to upgrade: tell the user. Error results (DAEMON_N…

wallet_address

Get the wallet's public address from the antd daemon. Returns: JSON with the wallet address (e.g. "0x..."), or error details. Returns an error if no wallet is configured.

wallet_balance

Get the wallet's token and gas balances from the antd daemon. Returns: JSON with balance (token balance) and gas_balance (gas token balance), both as strings in atto units. Returns an error if no wallet is configured.

wallet_approve

Approve the wallet to spend tokens on payment contracts. This is a one-time operation required before any storage operations. Must be called after configuring a wallet but before storing data. Returns: JSON with approved boolean, or error details.

prepare_upload

Prepare a file upload for external signing (two-phase upload). Returns payment details with a payment_type discriminator: - "wave_batch": per-quote payments for payForQuotes() (< 64 chunks) - "merkle": depth, pool_commitments, timestamp for payForMerkleTree() (>= 64 chunks) For wave_batch, call finalize_upload with tx_hashes. For merkle, call finalize_merkle_upload with winner_pool_hash. Args: path: Absolute path to the local file to upload. visibility: ``"public"`` to bundle the DataMap chunk into the same external-signer payment batch (t…

ParameterTypeDescription
path *string
visibility

prepare_upload_public

Prepare a *public* file upload for external signing (two-phase upload). Convenience wrapper equivalent to ``prepare_upload(path, visibility="public")``. The DataMap chunk is bundled into the same external-signer payment batch, so the ``data_map_address`` returned by ``finalize_upload`` is the shareable retrieval handle. Args: path: Absolute path to the local file to upload. Returns: JSON with upload_id, payment_type, and type-specific payment fields.

ParameterTypeDescription
path *string

prepare_data_upload

Prepare a data upload for external signing (two-phase upload). Takes base64-encoded data and returns payment details with a payment_type discriminator ("wave_batch" or "merkle"). See prepare_upload for details. Args: data: Base64-encoded bytes to upload. Returns: JSON with upload_id, payment_type, and type-specific payment fields.

ParameterTypeDescription
data *string

finalize_upload

Finalize a two-phase upload after payment transactions are submitted. Args: upload_id: The upload ID returned by prepare_upload. tx_hashes: Map of quote_hash to tx_hash for each payment. Returns: JSON with ``address`` (hex), ``chunks_stored`` count, ``data_map`` (hex-encoded msgpack DataMap — always returned), and ``data_map_address`` (set when prepare used ``visibility="public"``, empty otherwise), and ``sha256`` (the uploaded content's SHA-256 as hex; requires antd 0.17.0 or later, null on older daemons). Errors:…

ParameterTypeDescription
tx_hashes *object
upload_id *string

finalize_merkle_upload

Finalize a merkle two-phase upload after the merkle payment transaction. Use this instead of finalize_upload when prepare_upload returned payment_type "merkle". The winner_pool_hash comes from the MerklePaymentMade event emitted by the on-chain payForMerkleTree call. Args: upload_id: The upload ID returned by prepare_upload. winner_pool_hash: The bytes32 winner pool hash from MerklePaymentMade event (hex with 0x prefix). Returns: JSON with ``address`` (hex), ``chunks_stored`` count, ``data_map`` (hex-encoded msgpack DataMap — always retu…

ParameterTypeDescription
upload_id *string
winner_pool_hash *string

build_manifest

Build a manifest (a ``.ant`` file) that bundles several already-uploaded files into one shareable thing. Free: nothing is uploaded and nothing is paid. A manifest lists files, each with an optional relative path, and says where to fetch each from the Autonomi network. The ``link`` (``ant://manifest/...``) is what you share: anyone with it can fetch the files. The ``.ant`` bytes are the same manifest as a file, for when the link does not fit. Upload the files first, then pass what the upload returned. Use ``store_data`` or ``upload_file`` (public) to get an ``addre…

ParameterTypeDescription
entries *array
embed_rootsboolean
name
torrent_info_hashes

decode_manifest

Read a manifest: list the files it holds. Free: nothing is uploaded or paid. A manifest (a ``.ant`` file or an ``ant://manifest/`` link) bundles files on the Autonomi network, each with an optional relative path. Give exactly one of ``manifest_base64`` (the ``.ant`` bytes, as ``build_manifest`` returns them) or ``link``. A link may be an ``ant://manifest/`` link, an ``ant://file/`` link, or a bare public address (these last two read as one entry with no path). To fetch an entry afterwards use ``retrieve_data`` or ``download_file`` with its ``content_address`` (…

ParameterTypeDescription
link
manifest_base64
resolveboolean

pointer_keys

List the pointers this antd daemon can write. Free. antd signs pointer writes with owner keys it loaded at startup (``antd --pointer-keys``). Every pointer write names the pointer by its address (``owner``), and only the addresses listed here can be written through this daemon. Returns: JSON with ``keys``: the writable pointer addresses (64-char hex), or error details.

pointer_get

Read a pointer's current state from the Autonomi network. Free. A pointer is a small, owner-signed, mutable reference: its address never changes, and its owner can move its target (a chunk, such as a public data or file address, or another pointer). Counters are decimal strings, not JSON numbers: a final pointer's counter is "18446744073709551615" (2^64-1), which JSON number parsing rounds. Compare counters as strings of digits or as big integers. Args: address: The pointer's address (64-char hex, ``0x`` optional). include_owner_key: If True, also…

ParameterTypeDescription
address *string
include_owner_keyboolean

pointer_resolve

Follow a chain of pointers to the target at its end. Free. Follows forwardings (pointers that point at pointers) and transfers alike. When ``kind`` is "chunk", ``target`` is an address that ``retrieve_data`` / ``download_file`` can fetch, if it was stored as public data or a public file. Args: address: The pointer's address (64-char hex, ``0x`` optional). Returns: JSON with ``target`` (hex), ``kind`` and ``kind_tag``, or error details (``NOT_FOUND`` when a pointer on the chain does not exist).

ParameterTypeDescription
address *string

pointer_finality

Ask a pointer's whole close group where it stands. Free. Check this before relying on a transfer: only ``status`` "final" (``is_final`` true) means one final state, held by a majority, with every peer answering and no rival seen. ``status`` is one of: - "open": no peer holds a final state; the owner can still move it. - "settling": one final state, not yet held by a majority. - "unconfirmed": one final state held by a majority, but not every peer answered. Ask again. - "final": beyond dispute. - "forked": the owner signed two or more different final…

ParameterTypeDescription
address *string

pointer_controller

Find whose pointer now decides what an address resolves to. Free. Follows every transfer from ``address`` to the pointer at the end of the hand-overs; that pointer's owner is the one who can move the target. Args: address: The pointer's address (64-char hex, ``0x`` optional). Returns: JSON with ``pointer`` (the deciding pointer's address), ``transfers`` (every pointer handed over to, in order) and ``frozen`` (true when ``pointer`` is final without having been handed over: nobody can move it), or error details.

ParameterTypeDescription
address *string

pointer_create

Create a pointer on the Autonomi network, pointing at ``target``. Pays from the daemon wallet, about the price of one chunk. Every call pays again and this tool never retries: do not repeat a failed call without checking the pointer first (``pointer_get``). Args: owner: The pointer's address (64-char hex). The daemon must hold its key (see ``pointer_keys``). target: The address to point at (hex), e.g. the ``address`` from a public ``store_data`` or ``upload_file``. kind: "chunk" (default) for an immutable chunk such as a public…

ParameterTypeDescription
owner *string
target *string
kindstring

pointer_update

Point an existing pointer at a new target (creates it if missing). Pays from the daemon wallet, about the price of one chunk. Every call pays again and this tool never retries: do not repeat a failed call without checking the pointer first (``pointer_get``). Args: owner: The pointer's address (64-char hex). The daemon must hold its key (see ``pointer_keys``). target: The new address to point at (hex). kind: "chunk" (default) for an immutable chunk such as a public data or file address, or "pointer" to forward to another pointer…

ParameterTypeDescription
owner *string
target *string
kindstring

pointer_transfer

IRREVERSIBLE: hand the pointer at ``owner`` over to ``recipient`` forever. A transfer makes the pointer at ``owner`` final for good. Nobody can ever update or transfer it again, including its owner. Readers of ``owner``'s address are sent on to the pointer at ``recipient``, which only the recipient's owner can move. There is no undo. Pays from the daemon wallet, about the price of one chunk. Every call pays again and this tool never retries. Only call this after the user has explicitly confirmed this exact transfer, both addresses included. Unless ``confirm_i…

ParameterTypeDescription
owner *string
recipient *string
confirm_irreversibleboolean

pointer_prepare

Prepare a pointer write for external signing (two-phase, like ``prepare_upload``). The daemon signs the write with the owner key it holds and quotes it. It pays nothing itself and needs no daemon wallet. Pay ``payments`` with ``payForQuotes()``, then call ``pointer_finalize`` with the tx hashes. Until the write is finalized or expires (one hour), other writes to the pointer fail with ``CONFLICT``. Args: owner: The pointer's address (64-char hex). The daemon must hold its key (see ``pointer_keys``). op: "create" or "update" (pass ``targe…

ParameterTypeDescription
op *string
owner *string
kind
recipient
target

pointer_finalize

Store a prepared pointer write after the external signer has paid. A finalized transfer is irreversible. This tool never retries. Args: upload_id: The upload ID returned by ``pointer_prepare``. tx_hashes: Map of quote_hash to tx_hash for each payment. Returns: JSON with ``address``, ``state_id``, ``counter`` (decimal string) and ``finality`` (for a transfer, shaped as ``pointer_finality`` returns it; null otherwise), or error details. Errors: ``CLOSE_GROUP_SHORTFALL`` with ``retryable`` true: retry the finalize, the pa…

ParameterTypeDescription
tx_hashes *object
upload_id *string