@paystage/auth-watch 0.0.0-stage → 0.2.0

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
@@ -1,3 +1,59 @@
1
- # Temporary Holding Version
1
+ # @paystage/auth-watch
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Scan and evaluate outstanding token authorizations (ERC-20 allowances, Permit2
4
+ allowances, and EIP-3009 nonces) for a wallet against a Paystage policy.
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ pnpm add @paystage/auth-watch
10
+ ```
11
+
12
+ ## Library usage
13
+
14
+ ```ts
15
+ import {
16
+ createRpcClient,
17
+ resolveRpcUrl,
18
+ listOutstandingAuths,
19
+ evaluateOutstandingAuths,
20
+ } from "@paystage/auth-watch";
21
+ import { loadPolicy } from "@paystage/policy";
22
+
23
+ const network = "eip155:8453";
24
+ const rpc = createRpcClient(resolveRpcUrl(network));
25
+ const policy = await loadPolicy("./paystage.policy.json");
26
+
27
+ const items = await listOutstandingAuths({
28
+ wallet: "0x...",
29
+ network,
30
+ tokens: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],
31
+ spenders: policy.allowed_spenders ?? policy.allowed_pay_to,
32
+ rpc,
33
+ });
34
+
35
+ const results = evaluateOutstandingAuths(items, policy);
36
+ ```
37
+
38
+ ## MCP server
39
+
40
+ ```sh
41
+ node dist/cli.js
42
+ ```
43
+
44
+ Tools:
45
+
46
+ - `list_outstanding_auths` — list outstanding authorizations.
47
+ - `evaluate_outstanding_auths` — list and evaluate against a policy.
48
+
49
+ Both accept `wallet`, optional `network`, `tokens`, `spenders`,
50
+ `policy_path` or inline `policy`, `eip3009_nonces`, and `rpc_url`.
51
+
52
+ ## Environment
53
+
54
+ - `PAYSTAGE_RPC_URL` — overrides the default RPC URL for the network.
55
+
56
+ ## Networks
57
+
58
+ - `eip155:8453` — Base mainnet (`https://mainnet.base.org`)
59
+ - `eip155:84532` — Base Sepolia (`https://sepolia.base.org`)
package/dist/abis.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export declare const SELECTORS: {
2
+ readonly erc20Allowance: "0xdd62ed3e";
3
+ readonly permit2Allowance: "0x927da105";
4
+ readonly usdcAuthorizationState: "0xe94a0102";
5
+ };
6
+ export declare function padAddress(addr: string): string;
7
+ export declare function padUint256(value: bigint | number | string): string;
8
+ export declare function padBytes32(hex: string): string;
9
+ export declare function encodeAllowance(owner: string, spender: string): string;
10
+ export declare function encodePermit2Allowance(owner: string, token: string, spender: string): string;
11
+ export declare function encodeAuthorizationState(owner: string, nonce: string): string;
12
+ export declare function decodeUint256(hex: string): bigint;
13
+ export interface Permit2Allowance {
14
+ amount: bigint;
15
+ expiration: number;
16
+ nonce: number;
17
+ }
18
+ export declare function decodePermit2Allowance(hex: string): Permit2Allowance;
19
+ export declare function decodeBool(hex: string): boolean;
package/dist/abis.js ADDED
@@ -0,0 +1,64 @@
1
+ // Pure hex helpers. No ethers dependency.
2
+ export const SELECTORS = {
3
+ erc20Allowance: "0xdd62ed3e",
4
+ permit2Allowance: "0x927da105",
5
+ usdcAuthorizationState: "0xe94a0102",
6
+ };
7
+ function strip0x(hex) {
8
+ return hex.startsWith("0x") || hex.startsWith("0X") ? hex.slice(2) : hex;
9
+ }
10
+ export function padAddress(addr) {
11
+ const clean = strip0x(addr).toLowerCase();
12
+ if (!/^[0-9a-f]{40}$/.test(clean)) {
13
+ throw new Error(`Invalid address: ${addr}`);
14
+ }
15
+ return clean.padStart(64, "0");
16
+ }
17
+ export function padUint256(value) {
18
+ const v = typeof value === "bigint" ? value : BigInt(value);
19
+ if (v < 0n)
20
+ throw new Error("uint256 cannot be negative");
21
+ return v.toString(16).padStart(64, "0");
22
+ }
23
+ export function padBytes32(hex) {
24
+ const clean = strip0x(hex).toLowerCase();
25
+ if (!/^[0-9a-f]{1,64}$/.test(clean)) {
26
+ throw new Error(`Invalid bytes32: ${hex}`);
27
+ }
28
+ return clean.padStart(64, "0");
29
+ }
30
+ export function encodeAllowance(owner, spender) {
31
+ return SELECTORS.erc20Allowance + padAddress(owner) + padAddress(spender);
32
+ }
33
+ export function encodePermit2Allowance(owner, token, spender) {
34
+ return (SELECTORS.permit2Allowance +
35
+ padAddress(owner) +
36
+ padAddress(token) +
37
+ padAddress(spender));
38
+ }
39
+ export function encodeAuthorizationState(owner, nonce) {
40
+ return SELECTORS.usdcAuthorizationState + padAddress(owner) + padBytes32(nonce);
41
+ }
42
+ export function decodeUint256(hex) {
43
+ const clean = strip0x(hex);
44
+ if (clean.length === 0)
45
+ return 0n;
46
+ return BigInt("0x" + clean);
47
+ }
48
+ export function decodePermit2Allowance(hex) {
49
+ const clean = strip0x(hex);
50
+ if (clean.length < 64 * 3) {
51
+ // Some nodes return empty for reverts; treat as zero.
52
+ return { amount: 0n, expiration: 0, nonce: 0 };
53
+ }
54
+ const amount = BigInt("0x" + clean.slice(0, 64));
55
+ const expiration = Number(BigInt("0x" + clean.slice(64, 128)));
56
+ const nonce = Number(BigInt("0x" + clean.slice(128, 192)));
57
+ return { amount, expiration, nonce };
58
+ }
59
+ export function decodeBool(hex) {
60
+ const clean = strip0x(hex);
61
+ if (clean.length === 0)
62
+ return false;
63
+ return BigInt("0x" + clean) !== 0n;
64
+ }
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { createServer } from "./server.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
4
+ async function main() {
5
+ const server = createServer();
6
+ const transport = new StdioServerTransport();
7
+ await server.connect(transport);
8
+ }
9
+ main().catch((err) => {
10
+ console.error(err);
11
+ process.exit(1);
12
+ });
@@ -0,0 +1,4 @@
1
+ export declare const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
2
+ export declare const USDC_SEPOLIA = "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
3
+ export declare const PERMIT2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
4
+ export declare const DEFAULT_RPC: Record<string, string>;
@@ -0,0 +1,7 @@
1
+ export const USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
2
+ export const USDC_SEPOLIA = "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
3
+ export const PERMIT2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
4
+ export const DEFAULT_RPC = {
5
+ "eip155:8453": "https://mainnet.base.org",
6
+ "eip155:84532": "https://sepolia.base.org"
7
+ };
@@ -0,0 +1,3 @@
1
+ import type { Policy } from "@paystage/policy";
2
+ import type { AuthItem, EvaluateAuthResult } from "./types.js";
3
+ export declare function evaluateOutstandingAuths(items: AuthItem[], policy: Policy, nowSeconds?: number): EvaluateAuthResult[];
@@ -0,0 +1,43 @@
1
+ const UNLIMITED_THRESHOLD = 2n ** 255n;
2
+ function normalize(addr) {
3
+ return addr.toLowerCase();
4
+ }
5
+ function isUnlimited(item) {
6
+ return item.amount >= UNLIMITED_THRESHOLD;
7
+ }
8
+ function isUnknownSpender(item, policy) {
9
+ const allowed = policy.allowed_spenders ?? policy.allowed_pay_to;
10
+ const spender = normalize(item.spender);
11
+ return !allowed.some((a) => normalize(a) === spender);
12
+ }
13
+ function isStale(item, nowSeconds) {
14
+ if (item.expirationSeconds === undefined)
15
+ return false;
16
+ if (item.expirationSeconds === 0)
17
+ return false;
18
+ return nowSeconds > item.expirationSeconds;
19
+ }
20
+ export function evaluateOutstandingAuths(items, policy, nowSeconds = Math.floor(Date.now() / 1000)) {
21
+ return items.map((item) => {
22
+ const flags = [];
23
+ if (isUnlimited(item)) {
24
+ flags.push("unlimited");
25
+ }
26
+ if (isUnknownSpender(item, policy)) {
27
+ flags.push("unknown_spender");
28
+ }
29
+ if (isStale(item, nowSeconds)) {
30
+ flags.push("stale");
31
+ }
32
+ let summary = "ok";
33
+ if (flags.length > 0) {
34
+ summary = "review";
35
+ }
36
+ const hasUnlimited = flags.includes("unlimited");
37
+ const hasUnknown = flags.includes("unknown_spender");
38
+ if (hasUnlimited || (hasUnknown && policy.unknown_payee === "deny")) {
39
+ summary = "revoke_recommended";
40
+ }
41
+ return { item, flags, summary };
42
+ });
43
+ }
@@ -0,0 +1,9 @@
1
+ export { evaluateOutstandingAuths } from "./evaluate.js";
2
+ export { listOutstandingAuths } from "./scan.js";
3
+ export type { ScanInput } from "./scan.js";
4
+ export { createServer } from "./server.js";
5
+ export { createRpcClient, resolveRpcUrl } from "./rpc.js";
6
+ export type { JsonRpcClient } from "./rpc.js";
7
+ export * from "./types.js";
8
+ export * from "./constants.js";
9
+ export * from "./abis.js";
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export { evaluateOutstandingAuths } from "./evaluate.js";
2
+ export { listOutstandingAuths } from "./scan.js";
3
+ export { createServer } from "./server.js";
4
+ export { createRpcClient, resolveRpcUrl } from "./rpc.js";
5
+ export * from "./types.js";
6
+ export * from "./constants.js";
7
+ export * from "./abis.js";
package/dist/rpc.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export interface JsonRpcClient {
2
+ request(method: string, params: unknown[]): Promise<unknown>;
3
+ }
4
+ export declare function createRpcClient(url: string): JsonRpcClient;
5
+ export declare function resolveRpcUrl(network: string, env?: NodeJS.ProcessEnv): string;
package/dist/rpc.js ADDED
@@ -0,0 +1,40 @@
1
+ export function createRpcClient(url) {
2
+ let id = 0;
3
+ return {
4
+ async request(method, params) {
5
+ const body = {
6
+ jsonrpc: "2.0",
7
+ id: ++id,
8
+ method,
9
+ params,
10
+ };
11
+ const res = await fetch(url, {
12
+ method: "POST",
13
+ headers: { "content-type": "application/json" },
14
+ body: JSON.stringify(body),
15
+ });
16
+ if (!res.ok) {
17
+ throw new Error(`RPC HTTP ${res.status} ${res.statusText} for ${method}`);
18
+ }
19
+ const json = (await res.json());
20
+ if (json.error) {
21
+ throw new Error(`RPC error ${json.error.code}: ${json.error.message}`);
22
+ }
23
+ return json.result;
24
+ },
25
+ };
26
+ }
27
+ export function resolveRpcUrl(network, env = process.env) {
28
+ const override = env.PAYSTAGE_RPC_URL;
29
+ if (override && override.trim().length > 0) {
30
+ return override.trim();
31
+ }
32
+ switch (network) {
33
+ case "eip155:8453":
34
+ return "https://mainnet.base.org";
35
+ case "eip155:84532":
36
+ return "https://sepolia.base.org";
37
+ default:
38
+ throw new Error(`No default RPC URL for network ${network}`);
39
+ }
40
+ }
package/dist/scan.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import type { AuthItem } from "./types.js";
2
+ import type { JsonRpcClient } from "./rpc.js";
3
+ export interface ScanInput {
4
+ wallet: string;
5
+ network: string;
6
+ tokens: string[];
7
+ spenders: string[];
8
+ rpc: JsonRpcClient;
9
+ includePermit2?: boolean;
10
+ eip3009Nonces?: string[];
11
+ }
12
+ export declare function listOutstandingAuths(input: ScanInput): Promise<AuthItem[]>;
package/dist/scan.js ADDED
@@ -0,0 +1,79 @@
1
+ import { encodeAllowance, encodePermit2Allowance, encodeAuthorizationState, decodeUint256, decodePermit2Allowance, decodeBool, } from "./abis.js";
2
+ import { PERMIT2, USDC_BASE, USDC_SEPOLIA } from "./constants.js";
3
+ function usdcForNetwork(network) {
4
+ if (network === "eip155:8453")
5
+ return USDC_BASE;
6
+ if (network === "eip155:84532")
7
+ return USDC_SEPOLIA;
8
+ return undefined;
9
+ }
10
+ async function ethCall(rpc, to, data) {
11
+ const result = await rpc.request("eth_call", [{ to, data }, "latest"]);
12
+ if (typeof result !== "string") {
13
+ throw new Error(`eth_call returned non-string for ${to}`);
14
+ }
15
+ return result;
16
+ }
17
+ export async function listOutstandingAuths(input) {
18
+ const { wallet, network, tokens, spenders, rpc, includePermit2 = true, eip3009Nonces, } = input;
19
+ const items = [];
20
+ for (const token of tokens) {
21
+ for (const spender of spenders) {
22
+ const data = encodeAllowance(wallet, spender);
23
+ const raw = await ethCall(rpc, token, data);
24
+ const amount = decodeUint256(raw);
25
+ if (amount > 0n) {
26
+ items.push({
27
+ kind: "erc20_allowance",
28
+ token,
29
+ owner: wallet,
30
+ spender,
31
+ amount,
32
+ network,
33
+ });
34
+ }
35
+ }
36
+ }
37
+ if (includePermit2) {
38
+ for (const token of tokens) {
39
+ for (const spender of spenders) {
40
+ const data = encodePermit2Allowance(wallet, token, spender);
41
+ const raw = await ethCall(rpc, PERMIT2, data);
42
+ const decoded = decodePermit2Allowance(raw);
43
+ if (decoded.amount > 0n) {
44
+ items.push({
45
+ kind: "permit2",
46
+ token,
47
+ owner: wallet,
48
+ spender,
49
+ amount: decoded.amount,
50
+ network,
51
+ expirationSeconds: decoded.expiration,
52
+ nonce: String(decoded.nonce),
53
+ });
54
+ }
55
+ }
56
+ }
57
+ }
58
+ if (eip3009Nonces && eip3009Nonces.length > 0) {
59
+ const usdc = usdcForNetwork(network);
60
+ if (usdc) {
61
+ for (const nonce of eip3009Nonces) {
62
+ const data = encodeAuthorizationState(wallet, nonce);
63
+ const raw = await ethCall(rpc, usdc, data);
64
+ const invalidated = decodeBool(raw);
65
+ items.push({
66
+ kind: "eip3009",
67
+ token: usdc,
68
+ owner: wallet,
69
+ spender: usdc,
70
+ amount: 0n,
71
+ network,
72
+ nonce,
73
+ raw: { invalidated },
74
+ });
75
+ }
76
+ }
77
+ }
78
+ return items;
79
+ }
@@ -0,0 +1,2 @@
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
+ export declare function createServer(): McpServer;
package/dist/server.js ADDED
@@ -0,0 +1,124 @@
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
+ import { z } from "zod";
3
+ import { loadPolicy, parsePolicy } from "@paystage/policy";
4
+ import { evaluateOutstandingAuths } from "./evaluate.js";
5
+ import { listOutstandingAuths } from "./scan.js";
6
+ import { createRpcClient, resolveRpcUrl } from "./rpc.js";
7
+ import { USDC_BASE, USDC_SEPOLIA } from "./constants.js";
8
+ const DEFAULT_NETWORK = "eip155:8453";
9
+ function tokensForNetwork(policy, network) {
10
+ const assets = policy.allowed_assets ?? [];
11
+ const out = [];
12
+ for (const asset of assets) {
13
+ if (typeof asset === "string") {
14
+ out.push(asset);
15
+ }
16
+ else if (asset && typeof asset === "object") {
17
+ const a = asset;
18
+ if (a.address && (!a.network || a.network === network)) {
19
+ out.push(a.address);
20
+ }
21
+ }
22
+ }
23
+ if (out.length === 0) {
24
+ if (network === "eip155:8453")
25
+ out.push(USDC_BASE);
26
+ else if (network === "eip155:84532")
27
+ out.push(USDC_SEPOLIA);
28
+ }
29
+ return out;
30
+ }
31
+ function spendersForPolicy(policy) {
32
+ const list = policy.allowed_spenders ?? policy.allowed_pay_to ?? [];
33
+ return list.slice();
34
+ }
35
+ async function resolvePolicy(args) {
36
+ if (args.policy !== undefined) {
37
+ return parsePolicy(args.policy);
38
+ }
39
+ if (args.policy_path) {
40
+ return loadPolicy(args.policy_path);
41
+ }
42
+ throw new Error("Either policy_path or policy must be provided");
43
+ }
44
+ const commonShape = {
45
+ wallet: z.string(),
46
+ network: z.string().optional(),
47
+ tokens: z.array(z.string()).optional(),
48
+ spenders: z.array(z.string()).optional(),
49
+ policy_path: z.string().optional(),
50
+ policy: z.unknown().optional(),
51
+ eip3009_nonces: z.array(z.string()).optional(),
52
+ rpc_url: z.string().optional(),
53
+ };
54
+ export function createServer() {
55
+ const server = new McpServer({
56
+ name: "paystage-auth-watch",
57
+ version: "0.2.0",
58
+ });
59
+ server.registerTool("list_outstanding_auths", {
60
+ description: "List outstanding token authorizations for a wallet",
61
+ inputSchema: z.object(commonShape),
62
+ }, async (args) => {
63
+ const policy = await resolvePolicy(args);
64
+ const network = args.network ?? DEFAULT_NETWORK;
65
+ const tokens = args.tokens ?? tokensForNetwork(policy, network);
66
+ const spenders = args.spenders ?? spendersForPolicy(policy);
67
+ const rpcUrl = args.rpc_url ?? resolveRpcUrl(network);
68
+ const rpc = createRpcClient(rpcUrl);
69
+ const items = await listOutstandingAuths({
70
+ wallet: args.wallet,
71
+ network,
72
+ tokens,
73
+ spenders,
74
+ rpc,
75
+ eip3009Nonces: args.eip3009_nonces,
76
+ });
77
+ const serialized = items.map((i) => ({
78
+ ...i,
79
+ amount: i.amount.toString(),
80
+ }));
81
+ return {
82
+ content: [
83
+ {
84
+ type: "text",
85
+ text: JSON.stringify({ items: serialized }, null, 2),
86
+ },
87
+ ],
88
+ };
89
+ });
90
+ server.registerTool("evaluate_outstanding_auths", {
91
+ description: "List and evaluate outstanding token authorizations against a policy",
92
+ inputSchema: z.object(commonShape),
93
+ }, async (args) => {
94
+ const policy = await resolvePolicy(args);
95
+ const network = args.network ?? DEFAULT_NETWORK;
96
+ const tokens = args.tokens ?? tokensForNetwork(policy, network);
97
+ const spenders = args.spenders ?? spendersForPolicy(policy);
98
+ const rpcUrl = args.rpc_url ?? resolveRpcUrl(network);
99
+ const rpc = createRpcClient(rpcUrl);
100
+ const items = await listOutstandingAuths({
101
+ wallet: args.wallet,
102
+ network,
103
+ tokens,
104
+ spenders,
105
+ rpc,
106
+ eip3009Nonces: args.eip3009_nonces,
107
+ });
108
+ const results = evaluateOutstandingAuths(items, policy);
109
+ const serialized = results.map((r) => ({
110
+ item: { ...r.item, amount: r.item.amount.toString() },
111
+ flags: r.flags,
112
+ summary: r.summary,
113
+ }));
114
+ return {
115
+ content: [
116
+ {
117
+ type: "text",
118
+ text: JSON.stringify({ results: serialized }, null, 2),
119
+ },
120
+ ],
121
+ };
122
+ });
123
+ return server;
124
+ }
@@ -0,0 +1,24 @@
1
+ export type AuthKind = "erc20_allowance" | "permit2" | "eip3009";
2
+ export interface AuthItem {
3
+ kind: AuthKind;
4
+ token: string;
5
+ owner: string;
6
+ spender: string;
7
+ amount: bigint;
8
+ network: string;
9
+ expirationSeconds?: number;
10
+ nonce?: string;
11
+ raw?: unknown;
12
+ }
13
+ export type AuthFlag = "unlimited" | "unknown_spender" | "stale" | "expired";
14
+ export interface EvaluateAuthResult {
15
+ item: AuthItem;
16
+ flags: AuthFlag[];
17
+ summary: "ok" | "review" | "revoke_recommended";
18
+ }
19
+ export interface ScanInput {
20
+ owner: string;
21
+ network: string;
22
+ tokens?: string[];
23
+ spenders?: string[];
24
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,64 @@
1
1
  {
2
2
  "name": "@paystage/auth-watch",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "List and evaluate outstanding ERC-20 / Permit2 / EIP-3009 authorizations for an agent wallet (read-only)",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "bin": {
16
+ "paystage-auth-watch": "./dist/cli.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "server.json",
21
+ "!dist/**/*.map"
22
+ ],
23
+ "mcpName": "xyz.paystage/auth-watch",
24
+ "engines": {
25
+ "node": ">=20"
26
+ },
27
+ "keywords": [
28
+ "mcp",
29
+ "x402",
30
+ "agent-payments",
31
+ "usdc",
32
+ "base",
33
+ "auth-watch",
34
+ "permit2"
35
+ ],
36
+ "homepage": "https://paystage.xyz",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/base-buzz/paystage.git",
40
+ "directory": "packages/auth-watch"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/base-buzz/paystage/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "scripts": {
49
+ "build": "tsc",
50
+ "test": "vitest run",
51
+ "typecheck": "tsc --noEmit",
52
+ "prepublishOnly": "npm run build"
53
+ },
54
+ "dependencies": {
55
+ "@modelcontextprotocol/server": "^2.4.0",
56
+ "@paystage/policy": "0.2.0",
57
+ "zod": "^4.6.7"
58
+ },
59
+ "devDependencies": {
60
+ "@types/node": "^20.14.0",
61
+ "typescript": "^5.5.4",
62
+ "vitest": "^4.1.12"
63
+ }
64
+ }
package/server.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "xyz.paystage/auth-watch",
4
+ "title": "PayStage Auth Watch",
5
+ "description": "Read-only MCP tools to list and flag outstanding ERC-20, Permit2, and EIP-3009 auths",
6
+ "version": "0.2.0",
7
+ "websiteUrl": "https://paystage.xyz",
8
+ "repository": {
9
+ "url": "https://github.com/base-buzz/paystage",
10
+ "source": "github",
11
+ "subfolder": "packages/auth-watch"
12
+ },
13
+ "packages": [
14
+ {
15
+ "registryType": "npm",
16
+ "registryBaseUrl": "https://registry.npmjs.org",
17
+ "identifier": "@paystage/auth-watch",
18
+ "version": "0.2.0",
19
+ "transport": {
20
+ "type": "stdio"
21
+ },
22
+ "environmentVariables": [
23
+ {
24
+ "name": "PAYSTAGE_POLICY_PATH",
25
+ "description": "Path to policy.json spending rules",
26
+ "isRequired": false
27
+ },
28
+ {
29
+ "name": "PAYSTAGE_RPC_URL",
30
+ "description": "Base RPC URL override",
31
+ "isRequired": false
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }