@paystage/mcp 0.0.0-stage → 0.1.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,51 @@
1
- # Temporary Holding Version
1
+ # @paystage/mcp
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
+ PayStage umbrella MCP server: payment preflight + outstanding-auth watch.
4
+
5
+ One stdio MCP server that registers every PayStage tool. Future tools are added
6
+ in a single place (`registerAllTools` in `src/server.ts`).
7
+
8
+ ## Quick start
9
+
10
+ ```bash
11
+ npx -y @paystage/mcp
12
+ ```
13
+
14
+ ## Tools
15
+
16
+ | Tool | Description |
17
+ | --- | --- |
18
+ | `evaluate_mcp_payment` | Evaluate an x402 `PaymentRequired` payload against a PayStage spending policy before paying. |
19
+ | `list_outstanding_auths` | List outstanding token authorizations (EIP-3009 / allowances) for a wallet. |
20
+ | `evaluate_outstanding_auths` | List outstanding token authorizations and evaluate them against a policy. |
21
+
22
+ ## Environment variables
23
+
24
+ | Variable | Required | Description |
25
+ | --- | --- | --- |
26
+ | `PAYSTAGE_POLICY_PATH` | No | Path to a PayStage policy JSON file. Defaults to `./policy.json`. |
27
+ | `PAYSTAGE_RPC_URL` | No | RPC URL used for on-chain reads. Defaults to a public Base RPC. |
28
+
29
+ ## Claude Desktop / Cursor config
30
+
31
+ Add to your MCP client config (e.g. `claude_desktop_config.json` or Cursor's
32
+ `mcp.json`):
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "paystage": {
38
+ "command": "npx",
39
+ "args": ["-y", "@paystage/mcp"],
40
+ "env": {
41
+ "PAYSTAGE_POLICY_PATH": "/absolute/path/to/policy.json",
42
+ "PAYSTAGE_RPC_URL": "https://mainnet.base.org"
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## License
50
+
51
+ MIT
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { startServer } from "./server.js";
3
+ startServer().catch((error) => {
4
+ const message = error instanceof Error ? error.message : String(error);
5
+ process.stderr.write(`paystage-mcp fatal: ${message}\n`);
6
+ process.exit(1);
7
+ });
8
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC5B,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,OAAO,IAAI,CAAC,CAAC;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { createServer, startServer, getToolNames, TOOL_NAMES } from "./server.js";
2
+ export type { ToolName } from "./server.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAClF,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { createServer, startServer, getToolNames, TOOL_NAMES } from "./server.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare const TOOL_NAMES: readonly ["evaluate_mcp_payment", "list_outstanding_auths", "evaluate_outstanding_auths"];
3
+ export type ToolName = (typeof TOOL_NAMES)[number];
4
+ export declare function createServer(): McpServer;
5
+ export declare function getToolNames(): string[];
6
+ export declare function startServer(): Promise<void>;
7
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBpE,eAAO,MAAM,UAAU,2FAIb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AA4JnD,wBAAgB,YAAY,IAAI,SAAS,CAOxC;AAED,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAIjD"}
package/dist/server.js ADDED
@@ -0,0 +1,138 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { z } from "zod";
4
+ import { loadPolicy, parsePolicy } from "@paystage/policy";
5
+ import { evaluatePayment, normalizePaymentRequired, } from "@paystage/preflight";
6
+ import { listOutstandingAuths, evaluateOutstandingAuths, createRpcClient, resolveRpcUrl, } from "@paystage/auth-watch";
7
+ export const TOOL_NAMES = [
8
+ "evaluate_mcp_payment",
9
+ "list_outstanding_auths",
10
+ "evaluate_outstanding_auths",
11
+ ];
12
+ const DEFAULT_NETWORK = "base";
13
+ async function resolvePolicy(input) {
14
+ if (input.policy !== undefined) {
15
+ return parsePolicy(input.policy);
16
+ }
17
+ const path = input.policy_path ?? process.env.PAYSTAGE_POLICY_PATH ?? "./policy.json";
18
+ return await loadPolicy(path);
19
+ }
20
+ function tokensForNetwork(policy, network) {
21
+ const tokens = policy.tokens;
22
+ return tokens?.[network] ?? [];
23
+ }
24
+ function spendersForPolicy(policy) {
25
+ const spenders = policy.spenders;
26
+ return spenders ?? [];
27
+ }
28
+ const authWatchShape = {
29
+ wallet: z.string(),
30
+ network: z.string().optional(),
31
+ tokens: z.array(z.string()).optional(),
32
+ spenders: z.array(z.string()).optional(),
33
+ policy_path: z.string().optional(),
34
+ policy: z.unknown().optional(),
35
+ eip3009_nonces: z.array(z.string()).optional(),
36
+ rpc_url: z.string().optional(),
37
+ };
38
+ function registerAllTools(server) {
39
+ server.registerTool("evaluate_mcp_payment", {
40
+ description: "Evaluate an x402 PaymentRequired payload against a PayStage spending policy before paying",
41
+ inputSchema: {
42
+ payment_required: z.unknown(),
43
+ policy_path: z.string().optional(),
44
+ policy: z.unknown().optional(),
45
+ },
46
+ }, async (input) => {
47
+ try {
48
+ const policy = await resolvePolicy(input);
49
+ const pr = normalizePaymentRequired(input.payment_required);
50
+ const result = evaluatePayment(pr, policy);
51
+ return {
52
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
53
+ };
54
+ }
55
+ catch (error) {
56
+ const message = error instanceof Error ? error.message : String(error);
57
+ return {
58
+ isError: true,
59
+ content: [{ type: "text", text: `Error: ${message}` }],
60
+ };
61
+ }
62
+ });
63
+ server.tool("list_outstanding_auths", "List outstanding token authorizations for a wallet", authWatchShape, async (args) => {
64
+ const policy = await resolvePolicy(args);
65
+ const network = args.network ?? DEFAULT_NETWORK;
66
+ const tokens = args.tokens ?? tokensForNetwork(policy, network);
67
+ const spenders = args.spenders ?? spendersForPolicy(policy);
68
+ const rpcUrl = args.rpc_url ?? resolveRpcUrl(network);
69
+ const rpc = createRpcClient(rpcUrl);
70
+ const items = await listOutstandingAuths({
71
+ wallet: args.wallet,
72
+ network,
73
+ tokens,
74
+ spenders,
75
+ rpc,
76
+ eip3009Nonces: args.eip3009_nonces,
77
+ });
78
+ const serialized = items.map((i) => ({
79
+ ...i,
80
+ amount: i.amount.toString(),
81
+ }));
82
+ return {
83
+ content: [
84
+ {
85
+ type: "text",
86
+ text: JSON.stringify({ items: serialized }, null, 2),
87
+ },
88
+ ],
89
+ };
90
+ });
91
+ server.tool("evaluate_outstanding_auths", "List and evaluate outstanding token authorizations against a policy", authWatchShape, async (args) => {
92
+ const policy = await resolvePolicy(args);
93
+ const network = args.network ?? DEFAULT_NETWORK;
94
+ const tokens = args.tokens ?? tokensForNetwork(policy, network);
95
+ const spenders = args.spenders ?? spendersForPolicy(policy);
96
+ const rpcUrl = args.rpc_url ?? resolveRpcUrl(network);
97
+ const rpc = createRpcClient(rpcUrl);
98
+ const items = await listOutstandingAuths({
99
+ wallet: args.wallet,
100
+ network,
101
+ tokens,
102
+ spenders,
103
+ rpc,
104
+ eip3009Nonces: args.eip3009_nonces,
105
+ });
106
+ const results = evaluateOutstandingAuths(items, policy);
107
+ const serialized = results.map((r) => ({
108
+ item: { ...r.item, amount: r.item.amount.toString() },
109
+ flags: r.flags,
110
+ summary: r.summary,
111
+ }));
112
+ return {
113
+ content: [
114
+ {
115
+ type: "text",
116
+ text: JSON.stringify({ results: serialized }, null, 2),
117
+ },
118
+ ],
119
+ };
120
+ });
121
+ }
122
+ export function createServer() {
123
+ const server = new McpServer({
124
+ name: "paystage",
125
+ version: "0.1.0",
126
+ });
127
+ registerAllTools(server);
128
+ return server;
129
+ }
130
+ export function getToolNames() {
131
+ return [...TOOL_NAMES];
132
+ }
133
+ export async function startServer() {
134
+ const server = createServer();
135
+ const transport = new StdioServerTransport();
136
+ await server.connect(transport);
137
+ }
138
+ //# sourceMappingURL=server.js.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AAE,EAAE;YACrD,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,OAAO,EAAE,CAAC,CAAC,OAAO;SACnB,CAAC,CAAC,CAAC;QACJ,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvD;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IACH,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@paystage/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "PayStage umbrella MCP server: payment preflight + outstanding-auth watch",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "paystage-mcp": "./dist/cli.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "server.json"
13
+ ],
14
+ "mcpName": "xyz.paystage/mcp",
15
+ "engines": {
16
+ "node": ">=20"
17
+ },
18
+ "keywords": [
19
+ "mcp",
20
+ "x402",
21
+ "agent-payments",
22
+ "usdc",
23
+ "base",
24
+ "paystage"
25
+ ],
26
+ "homepage": "https://paystage.xyz",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/base-buzz/paystage.git",
30
+ "directory": "packages/mcp"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/base-buzz/paystage/issues"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "dependencies": {
39
+ "@modelcontextprotocol/sdk": "^1.12.0",
40
+ "@paystage/policy": "0.1.0",
41
+ "@paystage/preflight": "0.1.0",
42
+ "@paystage/auth-watch": "0.1.0",
43
+ "zod": "^3.23.8"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.14.0",
47
+ "typescript": "^5.5.4",
48
+ "vitest": "^2.0.5"
49
+ },
50
+ "scripts": {
51
+ "build": "tsc",
52
+ "test": "vitest run",
53
+ "typecheck": "tsc --noEmit",
54
+ "prepublishOnly": "npm run build"
55
+ }
56
+ }
package/server.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "xyz.paystage/mcp",
4
+ "title": "PayStage",
5
+ "description": "PayStage umbrella MCP server: payment preflight + outstanding-auth watch",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://paystage.xyz",
8
+ "repository": {
9
+ "url": "https://github.com/base-buzz/paystage",
10
+ "source": "github",
11
+ "subfolder": "packages/mcp"
12
+ },
13
+ "packages": [
14
+ {
15
+ "registryType": "npm",
16
+ "identifier": "@paystage/mcp",
17
+ "version": "0.1.0",
18
+ "transport": {
19
+ "type": "stdio"
20
+ },
21
+ "environmentVariables": [
22
+ {
23
+ "name": "PAYSTAGE_POLICY_PATH",
24
+ "description": "Path to a PayStage policy JSON file (defaults to ./policy.json)",
25
+ "isRequired": false
26
+ },
27
+ {
28
+ "name": "PAYSTAGE_RPC_URL",
29
+ "description": "RPC URL used for on-chain reads (defaults to a public Base RPC)",
30
+ "isRequired": false
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }