@zeam-labs/x402-mcp-bridge 2.0.0 → 2.0.2
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/index.mjs +8 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -35,8 +35,8 @@ if (has('--help') || has('-h')) {
|
|
|
35
35
|
'',
|
|
36
36
|
' With your key exported as X402_PRIVATE_KEY:',
|
|
37
37
|
'',
|
|
38
|
-
' npx -y
|
|
39
|
-
' npx -y
|
|
38
|
+
' npx -y @zeam-labs/x402-mcp-bridge --call rpc \'{"chain":"base","method":"eth_blockNumber","params":[]}\'',
|
|
39
|
+
' npx -y @zeam-labs/x402-mcp-bridge --tools',
|
|
40
40
|
'',
|
|
41
41
|
'With no arguments it runs as an MCP stdio server, which is what an MCP client wants.',
|
|
42
42
|
'',
|
|
@@ -394,6 +394,12 @@ const callOnLine = async (name, args) => {
|
|
|
394
394
|
'Raise it, set X402_MAX_SPEND=0 to remove it, or restart the bridge.' }) }] }
|
|
395
395
|
}
|
|
396
396
|
line.lastUse = Date.now()
|
|
397
|
+
// TICK IS THE PAYMENT. The catalog publishes it, so a client can call it, and
|
|
398
|
+
// it went down the line path like any other tool -- sent with a credential and
|
|
399
|
+
// no payment, which is the one thing it cannot be. The server answered 402,
|
|
400
|
+
// and the retry dropped a working line. It also has to share the queue with
|
|
401
|
+
// our own ticker, or the two race and the channel refuses the loser as busy.
|
|
402
|
+
if (name === 'tick') return payFirst('tick', line.credential ? { line: line.credential } : args)
|
|
397
403
|
if (LINE_MODE === 'off') return payFirst(name, args)
|
|
398
404
|
|
|
399
405
|
if (LINE_MODE === 'auto') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeam-labs/x402-mcp-bridge",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Put a wallet in front of any x402-paid MCP server, and hold a metered line on the ones that sell time. Stock MCP clients cannot construct x402 payments; this one does, and proxies your existing client through it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|