@priors/mcp 0.2.1 → 0.2.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/README.md CHANGED
@@ -29,7 +29,7 @@ repaying.
29
29
  | `borrow(amount_usd, days, dry_run?)` | borrow USDG from the line into the wallet; both amounts required; `dry_run` quotes the fee | yes |
30
30
  | `repay(loan_id? \| all)` | repay one of the agent's own loans, or all of them earliest due first; another agent's loan is refused | yes |
31
31
  | `score_of(agent_id)` | any agent's on-chain score (0 to 1000) and repayment record, plus its Priors Score v2 and trust rung when published | no |
32
- | `find_services(query?)` | services registered with the Priors facilitator that accept USDG (`GET /merchants`) | no |
32
+ | `find_services(query?)` | services registered with the Priors facilitator that accept USDG (`GET /merchants`), each marked as approved by Priors or self-registered and not reviewed | no |
33
33
 
34
34
  Tools that move money state the amounts in their answer, are marked destructive for MCP clients, and their
35
35
  descriptions tell the assistant to confirm with you first. Merchant text (response bodies, listings, redirect targets)
@@ -44,7 +44,7 @@ dedicated agent wallet holding only what the agent may spend.
44
44
  | variable | default | |
45
45
  |---|---|---|
46
46
  | `PRIORS_KEY` | none | the agent wallet's private key; without it only the read-only tools work |
47
- | `PRIORS_AGENT_ID` | looked up from the identity registry | the Priors agent id the wallet acts for |
47
+ | `PRIORS_AGENT_ID` | looked up from the identity registry | the Priors agent id the wallet acts for (the lookup finds only identities the wallet received since the v2 deploy; set it for an older one, or when the wallet holds several) |
48
48
  | `PRIORS_RPC` | `https://rpc.mainnet.chain.robinhood.com` | JSON-RPC endpoint (a private URL is redacted from every answer) |
49
49
  | `PRIORS_FACILITATOR` | `https://facilitator.priors.trade` | where `find_services` lists merchants |
50
50
  | `PRIORS_MAX_PRICE_USD` | `1.00` | ceiling on what `pay_url` may be told to pay per call |
@@ -68,7 +68,7 @@ Settings → Developer → Edit Config (`claude_desktop_config.json`), then rest
68
68
  "mcpServers": {
69
69
  "priors": {
70
70
  "command": "npx",
71
- "args": ["-y", "@priors/mcp@0.2.0"],
71
+ "args": ["-y", "@priors/mcp@0.2.2"],
72
72
  "env": {
73
73
  "PRIORS_KEY": "0xYOUR_AGENT_WALLET_KEY",
74
74
  "PRIORS_AGENT_ID": "1234"
@@ -90,7 +90,7 @@ A project `.mcp.json` that reads the key from your shell's environment, so the f
90
90
  "mcpServers": {
91
91
  "priors": {
92
92
  "command": "npx",
93
- "args": ["-y", "@priors/mcp@0.2.0"],
93
+ "args": ["-y", "@priors/mcp@0.2.2"],
94
94
  "env": {
95
95
  "PRIORS_KEY": "${PRIORS_KEY}",
96
96
  "PRIORS_AGENT_ID": "${PRIORS_AGENT_ID:-}"
@@ -100,7 +100,7 @@ A project `.mcp.json` that reads the key from your shell's environment, so the f
100
100
  }
101
101
  ```
102
102
 
103
- or, for your user only: `claude mcp add priors --scope user -e PRIORS_KEY="$PRIORS_KEY" -- npx -y @priors/mcp@0.2.0`
103
+ or, for your user only: `claude mcp add priors --scope user -e PRIORS_KEY="$PRIORS_KEY" -- npx -y @priors/mcp@0.2.2`
104
104
  (the key is expanded by your shell from the environment; do not paste it on the command line).
105
105
 
106
106
  ## Try it
@@ -9,7 +9,7 @@ if (argv.some((a) => /(^|[^0-9a-fA-F])(0x)?[0-9a-fA-F]{64}($|[^0-9a-fA-F])/.test
9
9
  process.exit(2);
10
10
  }
11
11
  if (argv.includes("--help") || argv.includes("-h")) {
12
- process.stderr.write("priors-mcp: MCP server (stdio) for Priors on Robinhood Chain.\nenv: PRIORS_KEY (wallet key, optional), PRIORS_RPC, PRIORS_AGENT_ID, PRIORS_FACILITATOR, PRIORS_MAX_PRICE_USD, PRIORS_MAX_BORROW_USD\nSee the README for the Claude Desktop / Claude Code config.\n");
12
+ process.stderr.write("priors-mcp: MCP server (stdio) for Priors on Robinhood Chain.\nenv: PRIORS_KEY (wallet key, optional), PRIORS_RPC, PRIORS_AGENT_ID, PRIORS_FACILITATOR, PRIORS_MAX_PRICE_USD, PRIORS_MAX_BORROW_USD, PRIORS_MAX_SPEND_USD, PRIORS_MAX_BORROW_TOTAL_USD, PRIORS_ALLOW_LOCAL, PRIORS_STOCK_VAULT, PRIORS_SCORE_V2\nSee the README for the Claude Desktop / Claude Code config.\n");
13
13
  process.exit(0);
14
14
  }
15
15
  if (argv.length > 0) {
@@ -1,32 +1,33 @@
1
1
  {
2
2
  "chainId": 4663,
3
+ "status": "live",
3
4
  "deployBlock": 71702460,
4
- "lens": "0x9d7035722bd42C551f82FEB9FDDd17453AEF3D9B",
5
5
  "pool": "0x281210097f0de7A8FB6F87310AF0f089c9C8DE21",
6
- "priors": "0xeDBf91223639800BCd5756815CAf908Df3b890bE",
7
- "registry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
8
- "safe": "0x20c6816B2419616238772591965E6E9AbE493fD5",
9
- "seatVault": "0x59D155C42A9263fA7596867b992bB3e84dF680a9",
6
+ "lens": "0x9d7035722bd42C551f82FEB9FDDd17453AEF3D9B",
10
7
  "timelock": "0x5d984C274035F81BB327d532897a902C5125F87c",
11
8
  "treasuryV4": "0x0c5091235A25bBFD3F5a009cBe04120D0CBAD573",
12
- "usdg": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
13
- "v1": "0x0259889e6EBab1a18CeE7e62Bc5B9648FB6C44e5",
14
9
  "treasuryV4AgentId": 6228,
10
+ "seatVault": "0x59D155C42A9263fA7596867b992bB3e84dF680a9",
15
11
  "seatVaultAgentId": 6234,
16
- "roots": [
17
- 490,
18
- 6191,
19
- 470,
20
- 471,
21
- 472,
22
- 473,
23
- 474
24
- ],
12
+ "usdg": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
13
+ "registry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
14
+ "priors": "0xeDBf91223639800BCd5756815CAf908Df3b890bE",
15
+ "safe": "0x20c6816B2419616238772591965E6E9AbE493fD5",
16
+ "v1": "0x0259889e6EBab1a18CeE7e62Bc5B9648FB6C44e5",
25
17
  "v1Pool": "0x0259889e6EBab1a18CeE7e62Bc5B9648FB6C44e5",
18
+ "inviteBond": "0x8BE478c754D9124D11e78dB20F5bf4dA45403275",
19
+ "inviteBondBlock": 72112874,
20
+ "seatVaultBlock": 72192188,
26
21
  "seatVaultV2": "0x6D934C07a33E7285cE691A9B258cdB53F18e6B5F",
27
22
  "seatVaultV2AgentId": 6229,
28
- "seatVaultBlock": 72192188,
23
+ "seatSizer": "0xd24B6484f4E68d72Fd2d3AF7bD036560B2ed5E61",
24
+ "seatSizerBlock": 72572884,
29
25
  "stockVault": "0xbEcd07EC689988e16b870C121756C4c2C8cb02B6",
30
26
  "stockVaultAgentId": 6424,
31
- "stockVaultBlock": 74826641
27
+ "stockVaultBlock": 74826641,
28
+ "seatVaultV4": "0xb1c3a04496238D62E3c93118C297163855e22192",
29
+ "seatVaultV4AgentId": 6466,
30
+ "seatVaultV4Block": 75614831,
31
+ "seatSizerV4": "0x97C4e594D458f8BBE961d5384Bbd8a9Cc2D18777",
32
+ "seatSizerV4Block": 75614955
32
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@priors/mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "MCP server for Priors on Robinhood Chain: pay x402 URLs in USDG, read balances, credit lines and scores, borrow and repay. Key from PRIORS_KEY only.",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@modelcontextprotocol/sdk": "^1.30.1",
45
- "@priors/x402": "0.2.1",
45
+ "@priors/x402": "0.2.2",
46
46
  "ethers": "^6.13.4",
47
47
  "undici": "6.29.0",
48
48
  "zod": "^4.6.5"
package/src/server.mjs CHANGED
@@ -17,7 +17,7 @@
17
17
  // PRIORS_MAX_BORROW_TOTAL_USD most borrowed in total per process (default 25)
18
18
  // PRIORS_ALLOW_LOCAL "1": pay_url may reach http://localhost and private addresses (testing only)
19
19
  // PRIORS_SCORE_V2 where score_of reads Priors Score v2 (default https://priors.trade/api/score-v2; "off": v1 only)
20
- // PRIORS_STOCK_VAULT the stock vault's address (default: deployments/4663.v2.json `stockVault`, once deployed)
20
+ // PRIORS_STOCK_VAULT the stock vault's address (default: deployments/4663.v2.json `stockVault`)
21
21
  import { readFileSync } from "node:fs";
22
22
  import { randomBytes } from "node:crypto";
23
23
  import { lookup as dnsLookup } from "node:dns/promises";
@@ -283,7 +283,7 @@ export async function createPriorsMcpServer({ env = process.env, fetchImpl = glo
283
283
  const mine = await credit.agentsOf(wallet.address);
284
284
  if (mine.length === 1) return (agentCache = mine[0]);
285
285
  if (mine.length > 1) throw new ToolError(`This wallet owns several agent identities (${mine.map((i) => "#" + i).join(", ")}). Set PRIORS_AGENT_ID or pass agent_id.`);
286
- throw new ToolError("This wallet owns no Priors agent identity minted since the v2 deploy. Set PRIORS_AGENT_ID if it owns an older one, or register first (the `priors join` CLI).");
286
+ throw new ToolError("This wallet owns no Priors agent identity minted since the v2 deploy. Set PRIORS_AGENT_ID if it owns an older one, or register first (`npx priors-v2 join`, from a clone of github.com/priors-agents/priors).");
287
287
  }
288
288
 
289
289
  function needWallet(action) {