You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,8 @@ The HTTP server uses the following default configuration:
270
270
271
271
When binding to a non-local interface, explicitly configure the public hostnames accepted by `MCP_ALLOWED_HOSTS` and `MCP_ALLOWED_ORIGINS`. Values may be hostnames or origin URLs; validation is port-agnostic.
272
272
273
+
Allowed browser origins receive CORS headers on responses, including OAuth challenges and discovery metadata. Preflight requests are validated before authentication; actual MCP requests still require the configured bearer scopes. CORS permits GET/POST, standard MCP headers, authorization, and annotated `Mcp-Param-*` headers. Cookies are not enabled.
274
+
273
275
#### HTTP OAuth
274
276
275
277
The HTTP process is an OAuth resource server; it does not issue access tokens. OAuth is optional only when `MCP_HOST` is local (`127.0.0.1`, `localhost`, or `::1`). If `MCP_OAUTH_ISSUER_URL` is set, OAuth is enabled even for a local bind. A non-local bind fails during startup unless OAuth is fully configured.
@@ -351,6 +353,8 @@ bun dev:http
351
353
352
354
Connect to this MCP server using any MCP-compatible client. For testing and debugging, you can use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).
353
355
356
+
Run `bun run inspect` for the Inspector UI, or `bun run inspect:check` for strict tool-schema checks. Both build the stdio server and use `mcp-inspector.json` with explicit modern protocol negotiation. Inspector requires Node >=22.19.0 and is pinned to the verified 2.5.0 release. To inspect HTTP, start `bun run start:http` separately and select `evm-http`; adjust the config URL if using a different port.
357
+
354
358
### Connecting from Cursor
355
359
356
360
To connect to the MCP server from Cursor:
@@ -576,6 +580,8 @@ The following wallet-backed tools enforce confirmation through MCP multi-round-t
576
580
577
581
The first invocation describes the exact operation and requests a boolean `confirm` input. No wallet action occurs until the client returns an accepted response with `confirm: true`; declining or cancelling terminates the operation. Clients should display this protocol-level request instead of adding a separate conversational confirmation.
578
582
583
+
Amounts must be non-negative decimal strings exactly representable in the asset's base units; excess nonzero decimal places are rejected before confirmation. Token precision is read before each confirmation round, and the confirmation binds both decimals and the exact base-unit amount. A precision change requires fresh confirmation. Execution uses the confirmed base units without another decimals lookup.
584
+
579
585
Confirmation continuation state is HMAC integrity-protected and binds the complete tool arguments. It expires after five minutes, is process-local and single-use, and is also bound to the authenticated bearer token for HTTP requests. An expired, replayed, cross-process, or differently authenticated continuation requires a new confirmation.
580
586
581
587
For example, the initial transfer call uses ordinary `tools/call` parameters:
@@ -1377,9 +1384,11 @@ export function registerEVMTools(server: McpServer) {
1377
1384
to,
1378
1385
resolvedRecipient,
1379
1386
amount,
1387
+
rawAmount: tokenAmount.raw.toString(),
1388
+
decimals: tokenAmount.decimals,
1380
1389
network
1381
1390
},
1382
-
`Transfer ${amount} of token ${tokenAddress} (${resolvedTokenAddress}) to ${to} (${resolvedRecipient}) on ${network}?`
1391
+
`Transfer ${amount} of token ${tokenAddress} (${resolvedTokenAddress}) to ${to} (${resolvedRecipient}) on ${network} (${tokenAmount.raw} base units at ${tokenAmount.decimals} decimals)?`
1383
1392
);
1384
1393
if(confirmation){
1385
1394
returnconfirmation;
@@ -1390,7 +1399,7 @@ export function registerEVMTools(server: McpServer) {
1390
1399
constresult=awaitservices.transferERC20(
1391
1400
resolvedTokenAddress,
1392
1401
resolvedRecipient,
1393
-
amount,
1402
+
tokenAmount,
1394
1403
privateKey,
1395
1404
network
1396
1405
);
@@ -1439,6 +1448,7 @@ export function registerEVMTools(server: McpServer) {
@@ -1448,9 +1458,11 @@ export function registerEVMTools(server: McpServer) {
1448
1458
spenderAddress,
1449
1459
resolvedSpenderAddress,
1450
1460
amount,
1461
+
rawAmount: tokenAmount.raw.toString(),
1462
+
decimals: tokenAmount.decimals,
1451
1463
network
1452
1464
},
1453
-
`Approve ${spenderAddress} (${resolvedSpenderAddress}) to spend ${amount} of token ${tokenAddress} (${resolvedTokenAddress}) on ${network}?`
1465
+
`Approve ${spenderAddress} (${resolvedSpenderAddress}) to spend ${amount} of token ${tokenAddress} (${resolvedTokenAddress}) on ${network} (${tokenAmount.raw} base units at ${tokenAmount.decimals} decimals)?`
1454
1466
);
1455
1467
if(confirmation){
1456
1468
returnconfirmation;
@@ -1461,7 +1473,7 @@ export function registerEVMTools(server: McpServer) {
0 commit comments