crossmint-wallets-mcp 0.1.0 → 0.1.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.
@@ -1,16 +1,3 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * Crossmint Wallets MCP server — stdio transport entry point.
4
- *
5
- * IMPORTANT: this process uses stdout as the JSON-RPC transport channel.
6
- * All human-readable logging MUST go to stderr via `console.error(...)`.
7
- * Never `console.log` or `process.stdout.write` from anywhere in this
8
- * server — the MCP client will treat it as malformed protocol traffic.
9
- *
10
- * Populated incrementally:
11
- * - Phase 2B (this file): minimal server that registers zero tools and
12
- * connects the stdio transport. Proves the pipeline works.
13
- * - Phase 2E: real tool registration via `registerTools` in ./tools.ts.
14
- */
15
2
  export {};
16
3
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":""}
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ // Redirect console.log to stderr BEFORE any imports.
3
+ // The Crossmint SDK (@crossmint/wallets-sdk) emits telemetry via console.log
4
+ // which corrupts the MCP stdio transport (stdout = JSON-RPC only).
5
+ console.log = (...args) => console.error(...args);
2
6
  /**
3
7
  * Crossmint Wallets MCP server — stdio transport entry point.
4
8
  *
@@ -6,11 +10,6 @@
6
10
  * All human-readable logging MUST go to stderr via `console.error(...)`.
7
11
  * Never `console.log` or `process.stdout.write` from anywhere in this
8
12
  * server — the MCP client will treat it as malformed protocol traffic.
9
- *
10
- * Populated incrementally:
11
- * - Phase 2B (this file): minimal server that registers zero tools and
12
- * connects the stdio transport. Proves the pipeline works.
13
- * - Phase 2E: real tool registration via `registerTools` in ./tools.ts.
14
13
  */
15
14
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
16
15
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAC5C,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KACxB,CAAC,CAAC;IAEH,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CACX,IAAI,WAAW,MAAM,cAAc,gCAAgC,CACpE,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,UAAU,EAAE,GAAG,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AAEA,qDAAqD;AACrD,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AAE7D;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAC5C,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KACxB,CAAC,CAAC;IAEH,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CACX,IAAI,WAAW,MAAM,cAAc,gCAAgC,CACpE,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,UAAU,EAAE,GAAG,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crossmint-wallets-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server exposing Crossmint smart wallet primitives as tools for Claude Desktop, Continue.dev, Cline, Codex CLI, and any MCP-native client.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "types": "dist/index.d.ts",
11
11
  "files": [
12
12
  "dist",
13
+ "scripts/postinstall.cjs",
13
14
  "README.md",
14
15
  "LICENSE"
15
16
  ],
@@ -53,6 +54,7 @@
53
54
  "node": ">=20.0.0"
54
55
  },
55
56
  "scripts": {
57
+ "postinstall": "node scripts/postinstall.cjs",
56
58
  "build": "tsc",
57
59
  "start": "node dist/mcp/server.js",
58
60
  "dev": "tsc --watch",
@@ -0,0 +1,23 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ // Fix for broken text-encoding-utf-8@1.0.2 package.
5
+ // Its package.json has "main": "lib/encoding.lib" but npm does not
6
+ // install the lib/ directory (pnpm resolves it differently and works).
7
+ // borsh@0.7.0 (via @solana/web3.js) requires it at runtime.
8
+ // Node.js 20+ has TextEncoder/TextDecoder as globals, so we shim it.
9
+
10
+ const dir = path.join(__dirname, "..", "node_modules", "text-encoding-utf-8", "lib");
11
+ const file = path.join(dir, "encoding.lib.js");
12
+
13
+ try {
14
+ if (!fs.existsSync(file)) {
15
+ fs.mkdirSync(dir, { recursive: true });
16
+ fs.writeFileSync(
17
+ file,
18
+ "module.exports = { TextEncoder: globalThis.TextEncoder, TextDecoder: globalThis.TextDecoder };\n"
19
+ );
20
+ }
21
+ } catch (_) {
22
+ // Silently continue — Node.js 20+ may not even hit this code path
23
+ }