@muhaven/mcp 0.2.3 → 0.2.4
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 +32 -0
- package/dist/broker.cjs +1 -1
- package/dist/broker.js +1 -1
- package/dist/index.cjs +23 -2
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +23 -2
- package/manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.4] — 2026-05-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Paymaster RPC method + param shape**:
|
|
15
|
+
`pm_sponsorUserOperation` → `zd_sponsorUserOperation`. ZeroDev v3
|
|
16
|
+
endpoints route paymaster RPCs through Alchemy infrastructure, which
|
|
17
|
+
exposes only ERC-7677 (`pm_getPaymasterStubData` / `pm_getPaymasterData`)
|
|
18
|
+
and ZeroDev-prefixed (`zd_sponsorUserOperation`) — the legacy
|
|
19
|
+
`pm_sponsorUserOperation` returns `"Unsupported method"` from
|
|
20
|
+
Alchemy. The MCP server's `attemptPathD` failed at
|
|
21
|
+
`pathDFallbackReason: paymaster_rejected` on every Path D autonomous
|
|
22
|
+
buy. Fix: switch method name + change request shape from positional
|
|
23
|
+
`[userOp, entryPoint]` to wrapped
|
|
24
|
+
`[{chainId, userOp, entryPointAddress, shouldOverrideFee, shouldConsume}]`.
|
|
25
|
+
Matches `@zerodev/sdk@5.5.10`'s `paymaster/sponsorUserOperation.js`
|
|
26
|
+
byte-for-byte. Verified 2026-05-23 via direct curl reproduction
|
|
27
|
+
against the prod bundler URL (bare → "Unsupported method"; correct
|
|
28
|
+
shape → simulation result with AA23 from synthetic UserOp, proving
|
|
29
|
+
the method works).
|
|
30
|
+
|
|
31
|
+
`sponsorUserOp` now requires `expectedChainId` in `BundlerClientOptions`
|
|
32
|
+
(throws `BundlerClientError(config)` when missing) — the chainId is
|
|
33
|
+
part of the request envelope. Defaults conservative placeholder gas
|
|
34
|
+
limits on the userOp when the caller omits them (ZeroDev's Zod
|
|
35
|
+
validator requires the gas fields in the request even though
|
|
36
|
+
simulation recomputes them).
|
|
37
|
+
|
|
38
|
+
Added 3 regression tests pinning the new method name, the wrapped
|
|
39
|
+
envelope, the gas-default behaviour + a `config`-error case when
|
|
40
|
+
expectedChainId is missing.
|
|
41
|
+
|
|
10
42
|
## [0.2.3] — 2026-05-23
|
|
11
43
|
|
|
12
44
|
### Fixed
|
package/dist/broker.cjs
CHANGED
package/dist/broker.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1071,7 +1071,28 @@ var BundlerClient = class {
|
|
|
1071
1071
|
* `estimateUserOpGas` round-trip on the happy path).
|
|
1072
1072
|
*/
|
|
1073
1073
|
async sponsorUserOp(userOp, entryPoint) {
|
|
1074
|
-
|
|
1074
|
+
if (this.options.expectedChainId === void 0) {
|
|
1075
|
+
throw new BundlerClientError(
|
|
1076
|
+
"config",
|
|
1077
|
+
"sponsorUserOp requires expectedChainId in BundlerClientOptions \u2014 ZeroDev paymaster needs it in the request envelope"
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
const userOpWithGas = {
|
|
1081
|
+
...userOp,
|
|
1082
|
+
callGasLimit: userOp.callGasLimit ?? "0x100000",
|
|
1083
|
+
// 1_048_576
|
|
1084
|
+
verificationGasLimit: userOp.verificationGasLimit ?? "0x100000",
|
|
1085
|
+
preVerificationGas: userOp.preVerificationGas ?? "0x100000"
|
|
1086
|
+
};
|
|
1087
|
+
const result = await this.rpc("zd_sponsorUserOperation", [
|
|
1088
|
+
{
|
|
1089
|
+
chainId: this.options.expectedChainId,
|
|
1090
|
+
userOp: userOpWithGas,
|
|
1091
|
+
entryPointAddress: entryPoint,
|
|
1092
|
+
shouldOverrideFee: false,
|
|
1093
|
+
shouldConsume: true
|
|
1094
|
+
}
|
|
1095
|
+
]);
|
|
1075
1096
|
return parseSponsoredFields(result);
|
|
1076
1097
|
}
|
|
1077
1098
|
/**
|
|
@@ -3032,7 +3053,7 @@ var SERVER_NAME = "@muhaven/mcp";
|
|
|
3032
3053
|
var SERVER_VERSION = resolveServerVersion();
|
|
3033
3054
|
function resolveServerVersion() {
|
|
3034
3055
|
{
|
|
3035
|
-
return "0.2.
|
|
3056
|
+
return "0.2.4";
|
|
3036
3057
|
}
|
|
3037
3058
|
}
|
|
3038
3059
|
function toJsonInputSchema(schema) {
|
package/dist/index.d.cts
CHANGED
|
@@ -708,6 +708,17 @@ interface PartialUserOpForSponsorship {
|
|
|
708
708
|
readonly maxPriorityFeePerGas: `0x${string}`;
|
|
709
709
|
/** Worst-case placeholder so paymaster simulates realistic gas. */
|
|
710
710
|
readonly signature: `0x${string}`;
|
|
711
|
+
/**
|
|
712
|
+
* Optional pre-estimated gas fields. ZeroDev's `zd_sponsorUserOperation`
|
|
713
|
+
* does its own simulation + recomputes these in the response, so
|
|
714
|
+
* passing placeholders is OK — but the upstream Zod validator
|
|
715
|
+
* REQUIRES the fields to be present. `sponsorUserOp` defaults them
|
|
716
|
+
* to safe placeholders when omitted (the response carries the real
|
|
717
|
+
* values for the caller to use).
|
|
718
|
+
*/
|
|
719
|
+
readonly callGasLimit?: `0x${string}`;
|
|
720
|
+
readonly verificationGasLimit?: `0x${string}`;
|
|
721
|
+
readonly preVerificationGas?: `0x${string}`;
|
|
711
722
|
}
|
|
712
723
|
interface SponsoredUserOpFields {
|
|
713
724
|
readonly paymaster: `0x${string}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -708,6 +708,17 @@ interface PartialUserOpForSponsorship {
|
|
|
708
708
|
readonly maxPriorityFeePerGas: `0x${string}`;
|
|
709
709
|
/** Worst-case placeholder so paymaster simulates realistic gas. */
|
|
710
710
|
readonly signature: `0x${string}`;
|
|
711
|
+
/**
|
|
712
|
+
* Optional pre-estimated gas fields. ZeroDev's `zd_sponsorUserOperation`
|
|
713
|
+
* does its own simulation + recomputes these in the response, so
|
|
714
|
+
* passing placeholders is OK — but the upstream Zod validator
|
|
715
|
+
* REQUIRES the fields to be present. `sponsorUserOp` defaults them
|
|
716
|
+
* to safe placeholders when omitted (the response carries the real
|
|
717
|
+
* values for the caller to use).
|
|
718
|
+
*/
|
|
719
|
+
readonly callGasLimit?: `0x${string}`;
|
|
720
|
+
readonly verificationGasLimit?: `0x${string}`;
|
|
721
|
+
readonly preVerificationGas?: `0x${string}`;
|
|
711
722
|
}
|
|
712
723
|
interface SponsoredUserOpFields {
|
|
713
724
|
readonly paymaster: `0x${string}`;
|
package/dist/index.js
CHANGED
|
@@ -1067,7 +1067,28 @@ var BundlerClient = class {
|
|
|
1067
1067
|
* `estimateUserOpGas` round-trip on the happy path).
|
|
1068
1068
|
*/
|
|
1069
1069
|
async sponsorUserOp(userOp, entryPoint) {
|
|
1070
|
-
|
|
1070
|
+
if (this.options.expectedChainId === void 0) {
|
|
1071
|
+
throw new BundlerClientError(
|
|
1072
|
+
"config",
|
|
1073
|
+
"sponsorUserOp requires expectedChainId in BundlerClientOptions \u2014 ZeroDev paymaster needs it in the request envelope"
|
|
1074
|
+
);
|
|
1075
|
+
}
|
|
1076
|
+
const userOpWithGas = {
|
|
1077
|
+
...userOp,
|
|
1078
|
+
callGasLimit: userOp.callGasLimit ?? "0x100000",
|
|
1079
|
+
// 1_048_576
|
|
1080
|
+
verificationGasLimit: userOp.verificationGasLimit ?? "0x100000",
|
|
1081
|
+
preVerificationGas: userOp.preVerificationGas ?? "0x100000"
|
|
1082
|
+
};
|
|
1083
|
+
const result = await this.rpc("zd_sponsorUserOperation", [
|
|
1084
|
+
{
|
|
1085
|
+
chainId: this.options.expectedChainId,
|
|
1086
|
+
userOp: userOpWithGas,
|
|
1087
|
+
entryPointAddress: entryPoint,
|
|
1088
|
+
shouldOverrideFee: false,
|
|
1089
|
+
shouldConsume: true
|
|
1090
|
+
}
|
|
1091
|
+
]);
|
|
1071
1092
|
return parseSponsoredFields(result);
|
|
1072
1093
|
}
|
|
1073
1094
|
/**
|
|
@@ -3028,7 +3049,7 @@ var SERVER_NAME = "@muhaven/mcp";
|
|
|
3028
3049
|
var SERVER_VERSION = resolveServerVersion();
|
|
3029
3050
|
function resolveServerVersion() {
|
|
3030
3051
|
{
|
|
3031
|
-
return "0.2.
|
|
3052
|
+
return "0.2.4";
|
|
3032
3053
|
}
|
|
3033
3054
|
}
|
|
3034
3055
|
function toJsonInputSchema(schema) {
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.2",
|
|
4
4
|
"name": "muhaven-mcp",
|
|
5
5
|
"display_name": "MuHaven (RWA portfolio)",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.4",
|
|
7
7
|
"description": "Confidential RWA portfolio management on Fhenix CoFHE. Read your encrypted balances, propose yield claims and policy changes — all signing happens in a sibling broker daemon, the LLM never sees your private key.",
|
|
8
8
|
"long_description": "MuHaven MCP exposes 24 tools across read.* / position.* / policy.* / issuer.* / governance.* groups for managing real-world asset (RWA) tokens with FHE-encrypted balances. Authentication uses a one-time device-code ceremony (run `muhaven-broker login`); subsequent tool calls fetch the JWT from the broker over a Unix socket. Position / governance tools deep-link to the dashboard for passkey signing — they NEVER auto-submit to a bundler. The companion `muhaven-broker` daemon must be running before tools can be invoked. See README for setup.",
|
|
9
9
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muhaven/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "MuHaven MCP server — read/position/policy toolsets bridging Claude Desktop / Cursor / Claude Code to the MuHaven backend, with a sibling muhaven-broker daemon holding the session-key private half over a local IPC socket",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|