@purplesquirrel/hedera-mcp 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +4 -2
- package/dist/index.js +1 -1
- package/dist/tools/contract.js +79 -13
- package/dist/tools/contract.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
- **ABI-aware contract calls.** `query_contract` and `execute_contract` now accept `{ abi, functionName, args }` — calldata is encoded (and read results decoded) automatically via viem, with integer args coerced to BigInt from the ABI. Raw `dataHex` / `functionParametersBase64` remain as fallbacks. Agents no longer need to hand-encode selectors.
|
|
6
|
+
- Verified live: `test-contract-abi.mjs` reads a deployed contract by ABI — `answer()` → 73 (uint), `title()` → "hedera-mcp" (string), `ping()` → 73 (pure) — with zero hand-encoded calldata.
|
|
7
|
+
|
|
3
8
|
## 0.4.0
|
|
4
9
|
|
|
5
10
|
- **MCP resources** (4): `hedera://network/exchange-rate`, `hedera://network/supply`, and templated `hedera://account/{id}` and `hedera://token/{id}` — addressable, keyless state agents can read by URI, alongside the 73 tools.
|
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ hedera_decode_transaction { transactionBase64: "<bytes>" }
|
|
|
101
101
|
|
|
102
102
|
**Consensus / HCS (6):** create_topic · submit_message · update_topic · delete_topic · get_topic_info · get_topic_messages
|
|
103
103
|
|
|
104
|
-
**Smart contract / EVM (6):** deploy_contract · execute_contract · update_contract · delete_contract · query_contract (
|
|
104
|
+
**Smart contract / EVM (6):** deploy_contract · execute_contract · update_contract · delete_contract · query_contract · get_contract_info — `execute_contract` & `query_contract` are **ABI-aware** (pass `{ abi, functionName, args }`; calldata encoded + results decoded automatically)
|
|
105
105
|
|
|
106
106
|
**File (4):** create_file · append_file · update_file · delete_file
|
|
107
107
|
|
|
@@ -121,14 +121,16 @@ Besides tools, the server exposes addressable, keyless MCP **resources** agents
|
|
|
121
121
|
|
|
122
122
|
- [`examples/TUTORIAL.md`](examples/TUTORIAL.md) — **Build on Hedera in 5 prompts** (the certified→shipping learning path)
|
|
123
123
|
- [`examples/agent-demo.md`](examples/agent-demo.md) — wire into Claude Desktop and build by asking; `node examples/agent-sim.mjs` prints a reproducible agent transcript
|
|
124
|
+
- [`examples/scenarios/`](examples/scenarios/) — unique use cases, each runnable + Mirror Node-verified: **HCS notary**, **AI agent audit trail**, **agent-to-agent payments**, **self-taxing token**
|
|
124
125
|
|
|
125
126
|
## Verification
|
|
126
127
|
|
|
127
128
|
- `npm run lint` / `npm run build` — clean against `@hashgraph/sdk` 2.81.0
|
|
128
|
-
- `node test-battle.mjs` —
|
|
129
|
+
- `node test-battle.mjs` — 72/73 in the auto-discovery suite (1 skip: `query_contract` needs a known ABI, verified separately) → **all 73 tools verified**
|
|
129
130
|
- `node test-live.mjs` — **10/10 write paths executed on testnet**, Mirror Node-verified
|
|
130
131
|
- `node test-battle-live.mjs` — **battle mode: 31/31 operations on testnet** across two accounts (full token lifecycle incl. freeze/KYC/pause/wipe, NFT, topic, file, scheduled transfer requiring a 2nd signer, PRNG), Mirror Node-verified
|
|
131
132
|
- `node test-contract.mjs` — real Solidity contract **compiled → deployed → executed → read** end-to-end (`store(42)` → `retrieve()` = 42), confirming the full EVM path and `query_contract`
|
|
133
|
+
- `node test-contract-abi.mjs` — **ABI-aware** `query_contract`: fed a raw ABI, it auto-encodes/decodes — `answer()` → 73 (uint), `title()` → "hedera-mcp" (string), `ping()` → 73 (pure)
|
|
132
134
|
|
|
133
135
|
## Development
|
|
134
136
|
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { registerResources } from "./resources.js";
|
|
|
31
31
|
const ctx = new HederaCtx();
|
|
32
32
|
const server = new McpServer({
|
|
33
33
|
name: "hedera-mcp",
|
|
34
|
-
version: "0.
|
|
34
|
+
version: "0.5.0",
|
|
35
35
|
});
|
|
36
36
|
let toolCount = 0;
|
|
37
37
|
const register = (name, description, shape, handler) => {
|
package/dist/tools/contract.js
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
/** Smart contract service (EVM). Writes are build-only; reads use Mirror Node eth_call.
|
|
1
|
+
/** Smart contract service (EVM). Writes are build-only; reads use Mirror Node eth_call.
|
|
2
|
+
*
|
|
3
|
+
* Contract calls are ABI-aware: pass { abi, functionName, args } and the tool encodes
|
|
4
|
+
* the calldata (and decodes read results) via viem — no hand-encoded hex required.
|
|
5
|
+
* Raw `dataHex` / `functionParametersBase64` remain supported as a fallback. */
|
|
2
6
|
import { z } from "zod";
|
|
7
|
+
import { decodeFunctionResult, encodeFunctionData } from "viem";
|
|
3
8
|
import { AccountId, ContractCreateTransaction, ContractDeleteTransaction, ContractExecuteTransaction, ContractId, ContractUpdateTransaction, FileId, Hbar, } from "@hashgraph/sdk";
|
|
4
9
|
import { json } from "../context.js";
|
|
10
|
+
// Coerce JSON args to the types viem expects, based on the function's ABI inputs
|
|
11
|
+
// (integers → BigInt, bool strings → boolean). Addresses/strings pass through.
|
|
12
|
+
function coerceArgs(abi, functionName, args = []) {
|
|
13
|
+
const fn = abi.find((x) => x?.type === "function" && x?.name === functionName);
|
|
14
|
+
const inputs = fn?.inputs ?? [];
|
|
15
|
+
return args.map((v, i) => {
|
|
16
|
+
const t = inputs[i]?.type ?? "";
|
|
17
|
+
if (/^u?int\d*$/.test(t) && !Array.isArray(v))
|
|
18
|
+
return BigInt(v);
|
|
19
|
+
if (t === "bool")
|
|
20
|
+
return typeof v === "boolean" ? v : v === "true";
|
|
21
|
+
return v;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// BigInt-safe JSON (decoded results often contain bigints).
|
|
25
|
+
function abiJson(v) {
|
|
26
|
+
return JSON.stringify(v, (_k, val) => (typeof val === "bigint" ? val.toString() : val), 2);
|
|
27
|
+
}
|
|
28
|
+
const ABI_FIELDS = {
|
|
29
|
+
abi: z.array(z.any()).optional().describe("Contract ABI (JSON array) — enables auto encode/decode"),
|
|
30
|
+
functionName: z.string().optional().describe("Function name to call (used with abi)"),
|
|
31
|
+
args: z.array(z.any()).optional().describe("Function arguments (used with abi)"),
|
|
32
|
+
};
|
|
5
33
|
export function registerContractTools(register, ctx) {
|
|
6
34
|
register("hedera_deploy_contract", "Build (unsigned) a contract deployment from bytecode already stored in a Hedera File (see hedera_create_file).", {
|
|
7
35
|
bytecodeFileId: z.string().describe("File id holding the compiled bytecode (hex)"),
|
|
@@ -23,22 +51,40 @@ export function registerContractTools(register, ctx) {
|
|
|
23
51
|
tx.setConstructorParameters(Buffer.from(a.constructorParamsBase64, "base64"));
|
|
24
52
|
return ctx.buildAndRender(tx, `Deploy contract from file ${a.bytecodeFileId} · gas ${a.gas}`, a.payerAccountId);
|
|
25
53
|
});
|
|
26
|
-
register("hedera_execute_contract", "Build (unsigned) a state-changing contract call.
|
|
54
|
+
register("hedera_execute_contract", "Build (unsigned) a state-changing contract call. Pass { abi, functionName, args } for automatic encoding, or raw functionParametersBase64.", {
|
|
27
55
|
contractId: z.string().describe("Contract id (0.0.x) or EVM address"),
|
|
28
56
|
gas: z.number().int().positive(),
|
|
57
|
+
...ABI_FIELDS,
|
|
29
58
|
functionParametersBase64: z
|
|
30
59
|
.string()
|
|
31
|
-
.
|
|
60
|
+
.optional()
|
|
61
|
+
.describe("Fallback: ABI-encoded calldata (selector + args) as base64"),
|
|
32
62
|
payableAmountHbar: z.number().optional().describe("HBAR to send with the call"),
|
|
33
63
|
payerAccountId: z.string().optional(),
|
|
34
64
|
}, async (a) => {
|
|
65
|
+
let params;
|
|
66
|
+
if (a.abi && a.functionName) {
|
|
67
|
+
const hex = encodeFunctionData({
|
|
68
|
+
abi: a.abi,
|
|
69
|
+
functionName: a.functionName,
|
|
70
|
+
args: coerceArgs(a.abi, a.functionName, a.args),
|
|
71
|
+
});
|
|
72
|
+
params = Buffer.from(hex.slice(2), "hex");
|
|
73
|
+
}
|
|
74
|
+
else if (a.functionParametersBase64) {
|
|
75
|
+
params = Buffer.from(a.functionParametersBase64, "base64");
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
throw new Error("Provide either { abi, functionName, args? } or functionParametersBase64.");
|
|
79
|
+
}
|
|
35
80
|
const tx = new ContractExecuteTransaction()
|
|
36
81
|
.setContractId(ContractId.fromString(a.contractId))
|
|
37
82
|
.setGas(a.gas)
|
|
38
|
-
.setFunctionParameters(
|
|
83
|
+
.setFunctionParameters(params);
|
|
39
84
|
if (a.payableAmountHbar != null)
|
|
40
85
|
tx.setPayableAmount(new Hbar(a.payableAmountHbar));
|
|
41
|
-
|
|
86
|
+
const label = a.functionName ? `${a.functionName}()` : "calldata";
|
|
87
|
+
return ctx.buildAndRender(tx, `Execute contract ${a.contractId} · ${label} · gas ${a.gas}`, a.payerAccountId);
|
|
42
88
|
});
|
|
43
89
|
register("hedera_update_contract", "Build (unsigned) an update to a contract's memo or admin key (requires admin key to sign).", {
|
|
44
90
|
contractId: z.string(),
|
|
@@ -60,19 +106,39 @@ export function registerContractTools(register, ctx) {
|
|
|
60
106
|
.setTransferAccountId(AccountId.fromString(a.transferAccountId));
|
|
61
107
|
return ctx.buildAndRender(tx, `Delete contract ${a.contractId}`, a.payerAccountId);
|
|
62
108
|
});
|
|
63
|
-
register("hedera_query_contract", "Read a contract view/pure function via
|
|
109
|
+
register("hedera_query_contract", "Read a contract view/pure function via Mirror Node eth_call (keyless, no gas). Pass { abi, functionName, args } for auto encode/decode, or raw dataHex.", {
|
|
64
110
|
contractIdOrAddress: z.string().describe("Contract id (0.0.x) or 0x EVM address"),
|
|
65
|
-
|
|
111
|
+
...ABI_FIELDS,
|
|
112
|
+
dataHex: z.string().optional().describe("Fallback: ABI-encoded calldata as 0x-prefixed hex"),
|
|
66
113
|
fromAddress: z.string().optional().describe("Optional 0x caller address"),
|
|
67
114
|
}, async (a) => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
data
|
|
71
|
-
|
|
72
|
-
|
|
115
|
+
let data;
|
|
116
|
+
if (a.abi && a.functionName) {
|
|
117
|
+
data = encodeFunctionData({
|
|
118
|
+
abi: a.abi,
|
|
119
|
+
functionName: a.functionName,
|
|
120
|
+
args: coerceArgs(a.abi, a.functionName, a.args),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else if (a.dataHex) {
|
|
124
|
+
data = a.dataHex.startsWith("0x") ? a.dataHex : `0x${a.dataHex}`;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
throw new Error("Provide either { abi, functionName, args? } or dataHex.");
|
|
128
|
+
}
|
|
129
|
+
const body = { to: a.contractIdOrAddress, data, estimate: false };
|
|
73
130
|
if (a.fromAddress)
|
|
74
131
|
body.from = a.fromAddress;
|
|
75
|
-
|
|
132
|
+
const res = await ctx.mirrorPost(`/api/v1/contracts/call`, body);
|
|
133
|
+
if (a.abi && a.functionName && res?.result) {
|
|
134
|
+
const decoded = decodeFunctionResult({
|
|
135
|
+
abi: a.abi,
|
|
136
|
+
functionName: a.functionName,
|
|
137
|
+
data: res.result,
|
|
138
|
+
});
|
|
139
|
+
return abiJson({ function: a.functionName, result: res.result, decoded });
|
|
140
|
+
}
|
|
141
|
+
return abiJson(res);
|
|
76
142
|
});
|
|
77
143
|
register("hedera_get_contract_info", "Read contract info (admin key, bytecode metadata, EVM address) from the Mirror Node.", { contractId: z.string() }, async (a) => json(await ctx.mirror(`/api/v1/contracts/${encodeURIComponent(a.contractId)}`)));
|
|
78
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/tools/contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/tools/contract.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EA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,oBAAoB,CAAC;gBACnC,GAAG,EAAE,CAAC,CAAC,GAAU;gBACjB,YAAY,EAAE,CAAC,CAAC,YAAY;gBAC5B,IAAI,EAAE,GAAG,CAAC,MAAuB;aAClC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC,CACF,CAAC;IAEF,QAAQ,CACN,0BAA0B,EAC1B,sFAAsF,EACtF,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,EAC1B,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,qBAAqB,kBAAkB,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAC7F,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purplesquirrel/hedera-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"mcpName": "io.github.ExpertVagabond/hedera-mcp",
|
|
5
5
|
"description": "Comprehensive MCP server for Hedera (Hashgraph) — full coverage of Account, Token (HTS), Consensus (HCS), Smart Contract (EVM), File, Schedule, and Network services. Reads via Mirror Node (keyless); writes are build-only (returns unsigned serialized transactions). Never holds keys.",
|
|
6
6
|
"type": "module",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@hashgraph/sdk": "^2.0.0",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
46
|
+
"viem": "^2.51.3",
|
|
46
47
|
"zod": "^3.23.8"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|