@agentwonderland/mcp 0.1.18 → 0.1.20

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.
@@ -10,11 +10,14 @@ export async function initiateCardSetup() {
10
10
  // Short redirect URL keeps the QR code small and scannable
11
11
  const apiUrl = getApiUrl();
12
12
  const shortUrl = `${apiUrl}/card/link/${token}`;
13
- const qr = await QRCode.toString(shortUrl, {
13
+ const rawQr = await QRCode.toString(shortUrl, {
14
14
  type: "utf8",
15
15
  errorCorrectionLevel: "L",
16
16
  margin: 2,
17
17
  });
18
+ // Pad every line with consistent leading spaces so the QR aligns
19
+ // properly in terminal renderers that add prefixes to the first line
20
+ const qr = rawQr.split("\n").map((line) => " " + line).join("\n");
18
21
  return { qr, url: shortUrl, token };
19
22
  }
20
23
  /**
@@ -24,7 +27,7 @@ export async function initiateCardSetup() {
24
27
  */
25
28
  export function formatCardSetupBlocks(qr, url) {
26
29
  return [
27
- qr.trim(),
30
+ "\n" + qr.trim(),
28
31
  [
29
32
  `IMPORTANT: You MUST present this link to the user so they can connect a payment card:`,
30
33
  "",
@@ -66,7 +66,7 @@ export function registerWalletTools(server) {
66
66
  pendingCardSetup = { token };
67
67
  return {
68
68
  content: [
69
- { type: "text", text: qr.trim() },
69
+ { type: "text", text: "\n" + qr.trim() },
70
70
  { type: "text", text: [
71
71
  `IMPORTANT: You MUST present this link to the user so they can connect a payment card:`,
72
72
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentwonderland/mcp",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "description": "MCP server for the Agent Wonderland AI agent marketplace",
6
6
  "bin": {
@@ -17,12 +17,16 @@ export async function initiateCardSetup(): Promise<{
17
17
  const apiUrl = getApiUrl();
18
18
  const shortUrl = `${apiUrl}/card/link/${token}`;
19
19
 
20
- const qr = await QRCode.toString(shortUrl, {
20
+ const rawQr = await QRCode.toString(shortUrl, {
21
21
  type: "utf8",
22
22
  errorCorrectionLevel: "L",
23
23
  margin: 2,
24
24
  });
25
25
 
26
+ // Pad every line with consistent leading spaces so the QR aligns
27
+ // properly in terminal renderers that add prefixes to the first line
28
+ const qr = rawQr.split("\n").map((line) => " " + line).join("\n");
29
+
26
30
  return { qr, url: shortUrl, token };
27
31
  }
28
32
 
@@ -33,7 +37,7 @@ export async function initiateCardSetup(): Promise<{
33
37
  */
34
38
  export function formatCardSetupBlocks(qr: string, url: string): string[] {
35
39
  return [
36
- qr.trim(),
40
+ "\n" + qr.trim(),
37
41
  [
38
42
  `IMPORTANT: You MUST present this link to the user so they can connect a payment card:`,
39
43
  "",
@@ -101,7 +101,7 @@ export function registerWalletTools(server: McpServer): void {
101
101
 
102
102
  return {
103
103
  content: [
104
- { type: "text" as const, text: qr.trim() },
104
+ { type: "text" as const, text: "\n" + qr.trim() },
105
105
  { type: "text" as const, text: [
106
106
  `IMPORTANT: You MUST present this link to the user so they can connect a payment card:`,
107
107
  "",