@priors/mcp 0.1.7 → 0.1.8

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
@@ -63,7 +63,7 @@ Settings → Developer → Edit Config (`claude_desktop_config.json`), then rest
63
63
  "mcpServers": {
64
64
  "priors": {
65
65
  "command": "npx",
66
- "args": ["-y", "@priors/mcp@0.1.7"],
66
+ "args": ["-y", "@priors/mcp@0.1.8"],
67
67
  "env": {
68
68
  "PRIORS_KEY": "0xYOUR_AGENT_WALLET_KEY",
69
69
  "PRIORS_AGENT_ID": "1234"
@@ -85,7 +85,7 @@ A project `.mcp.json` that reads the key from your shell's environment, so the f
85
85
  "mcpServers": {
86
86
  "priors": {
87
87
  "command": "npx",
88
- "args": ["-y", "@priors/mcp@0.1.7"],
88
+ "args": ["-y", "@priors/mcp@0.1.8"],
89
89
  "env": {
90
90
  "PRIORS_KEY": "${PRIORS_KEY}",
91
91
  "PRIORS_AGENT_ID": "${PRIORS_AGENT_ID:-}"
@@ -95,7 +95,7 @@ A project `.mcp.json` that reads the key from your shell's environment, so the f
95
95
  }
96
96
  ```
97
97
 
98
- or, for your user only: `claude mcp add priors --scope user -e PRIORS_KEY="$PRIORS_KEY" -- npx -y @priors/mcp@0.1.7`
98
+ or, for your user only: `claude mcp add priors --scope user -e PRIORS_KEY="$PRIORS_KEY" -- npx -y @priors/mcp@0.1.8`
99
99
  (the key is expanded by your shell from the environment; do not paste it on the command line).
100
100
 
101
101
  ## Try it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@priors/mcp",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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",
package/src/server.mjs CHANGED
@@ -388,8 +388,8 @@ export async function createPriorsMcpServer({ env = process.env, fetchImpl = glo
388
388
  u.searchParams.set("agent", String(id));
389
389
  const r = await fetchImpl(u.href, { headers: { accept: "application/json" }, signal: AbortSignal.timeout(5_000) });
390
390
  if (!r.ok) return null;
391
- const t = await r.text();
392
- if (t.length > 65_536) return null;
391
+ const { text: t, cut } = await X.readCapped(r, 65_536); // streamed: a huge body is cancelled, not buffered
392
+ if (cut) return null;
393
393
  const s = JSON.parse(t)?.score;
394
394
  const num = (x) => (x !== null && x !== "" && Number.isFinite(Number(x)) ? Number(x) : null);
395
395
  if (!s || Number(s.agentId) !== Number(id) || num(s.score) === null || num(s.rung) === null) return null;