Python client for the Nukez MCP server — connect, list tools, and call Nukez agent-native storage and verification tools over streamable HTTP JSON-RPC.
Project description
nukez-mcp
Python client for the Nukez MCP server — agent-native persistent storage with cryptographic verification on Solana.
The Nukez MCP is a streamable HTTP JSON-RPC server that wraps the Nukez gateway. It is keyless: the server never holds a wallet or signing key. Clients execute payments externally, sign Ed25519 operation envelopes locally, and pass those envelopes through MCP tool arguments.
This package provides a simple class around an HTTP library with a method for connecting to the server, listing its tools, and calling them.
Install
pip install nukez-mcp
Quickstart
from nukez_mcp import NukezMCP
with NukezMCP() as mcp:
info = mcp.connect()
print(info["serverInfo"]) # server name and version
tools = mcp.list_tools()
print(f"{len(tools)} tools registered")
status = mcp.call_tool("nukez_status")
print(status["capabilities"]["payment_rails"])
The default endpoint is the production server:
https://mcp.nukez.xyz/mcp
Pass a different endpoint= to the constructor to target another
deployment.
The tool surface
The production server registers 15 tools:
| Group | Tools |
|---|---|
| Payment & setup | nukez_quote, nukez_pay, nukez_provision, nukez_setup |
| Files | nukez_create_file, nukez_store, nukez_confirm, nukez_upload_chunk, nukez_retrieve, nukez_delete |
| Proof & freshness | nukez_status, nukez_verify, nukez_recompute_verify |
| Memory | nukez_remember, nukez_recall |
The canonical flow is nukez_quote → external chain transfer → nukez_pay
→ nukez_provision, after which post-provisioning operations require
client-signed envelopes.
Signed envelopes and payments
Envelope signing and payment execution are deliberately not part of this package: they involve your local keypair and are documented, with runnable helpers, in the canonical guides:
- https://nukez.xyz/docs/mcp — production model and connection details
- https://nukez.xyz/docs/mcp/examples — envelope signing (
pynacl+base58) and Solana transfer helpers (solders) - https://nukez.xyz/docs/mcp/tools — full tool reference
A signed envelope is passed straight through a tool's envelope argument:
env = {...} # built and signed locally — see docs/mcp/examples
files = mcp.call_tool("nukez_retrieve", {
"receipt_id": receipt_id,
"envelope": env,
})
Worked example: two-phase on-chain attestation
Anchoring an attestation is a two-phase flow — the server is keyless, so the
first call returns an envelope spec (note the query field, which the signed
envelope JSON must carry verbatim), and the second call anchors on-chain:
v1 = mcp.call_tool("nukez_verify", {"receipt_id": receipt_id, "push": True})
spec = v1["envelopes_needed"][0]
attest_env = build_envelope( # your local signer — see docs/mcp/examples
receipt_id, spec["method"], spec["path"],
ops=spec["ops"], body=spec["body"], query=spec["query"],
)
v2 = mcp.call_tool("nukez_verify", {
"receipt_id": receipt_id, "push": True, "envelope": attest_env,
})
assert v2["attestation"]["push_ok"] # anchored: tx_signature is on Solana
Reference demonstration: Trust Verification
The canonical end-to-end usage example is the Trust Verification demo — a live, agent-driven walkthrough that connects to the production Nukez MCP server, provisions storage with a real BETA-token x402 payment, stores and encrypts artifacts through signed MCP operations, survives a tamper attempt, and verifies everything on Solana mainnet across 10 preset cues:
- Agent surface online → connect to the Nukez protocol via MCP
- Grant local wallet access (a discrete consent moment — the server never holds keys)
- Procure user-owned storage on Solana mainnet (BETA-paid x402 quote)
- Draft a real output artifact
- Store artifacts through signed Nukez MCP operations
- Attack: an adversary attempts to tamper with the record
- Verify: the tamper is detected against the on-chain attestation
Every request in that demo travels the same JSON-RPC surface this package
wraps: initialize → tools/call with envelope passthrough, exactly as in
the Quickstart above. The demo's signing/payment helpers are packaged from
the runnable examples at https://nukez.xyz/docs/mcp/examples.
Errors
JSON-RPC errors and tool-level failures raise nukez_mcp.NukezMCPError,
carrying code and data when the server provides them.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nukez_mcp-0.1.0.tar.gz.
File metadata
- Download URL: nukez_mcp-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2012cdc4836dca14437b3bb4e08a7f356931f3da9d2e1246c025535f403f8e90
|
|
| MD5 |
bc63fb8eceb10941dcbeda5b9b2dd233
|
|
| BLAKE2b-256 |
831e193a15d8bbeac8272f9c0f540424e229aee78c950cf90658648950c8b1bc
|
Provenance
The following attestation bundles were made for nukez_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on Nukez-xyz/nukez-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nukez_mcp-0.1.0.tar.gz -
Subject digest:
2012cdc4836dca14437b3bb4e08a7f356931f3da9d2e1246c025535f403f8e90 - Sigstore transparency entry: 2281651455
- Sigstore integration time:
-
Permalink:
Nukez-xyz/nukez-mcp@b29b1d8bed207787c10c89f3a4d46c1728ec66b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nukez-xyz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b29b1d8bed207787c10c89f3a4d46c1728ec66b9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nukez_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nukez_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c484ba8b01095e869cf09aa301aa431fe7b3183108d84c1542e622bf603d5397
|
|
| MD5 |
19df5ba0a417815ee7ca0f8b3211e782
|
|
| BLAKE2b-256 |
165d001a935ea0322fb9ec4f0f4bb4d44f635ca5470295f4987b31fae3384d3d
|
Provenance
The following attestation bundles were made for nukez_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Nukez-xyz/nukez-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nukez_mcp-0.1.0-py3-none-any.whl -
Subject digest:
c484ba8b01095e869cf09aa301aa431fe7b3183108d84c1542e622bf603d5397 - Sigstore transparency entry: 2281651523
- Sigstore integration time:
-
Permalink:
Nukez-xyz/nukez-mcp@b29b1d8bed207787c10c89f3a4d46c1728ec66b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nukez-xyz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b29b1d8bed207787c10c89f3a4d46c1728ec66b9 -
Trigger Event:
release
-
Statement type: