forkfeed-mcp 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -0
  2. package/package.json +6 -4
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { z } from 'zod';
5
+ import QRCode from 'qrcode';
5
6
  import { GUIDE_CONTENT } from './guide-content.js';
6
7
  import { IMAGE_CATALOG } from './image-catalog.js';
7
8
  const APP_SERVER_URL = (process.env.APP_SERVER_URL || 'https://api.forkfeed.link').replace(/\/+$/, '');
@@ -85,6 +86,25 @@ server.tool('forkfeed_push', 'Push a generated manifest (forks, feeds, cards) to
85
86
  const forkSummary = data.forks
86
87
  ?.map((f) => ` - ${f.title} (${f.feeds} feeds)`)
87
88
  .join('\n');
89
+ // Generate QR code for the first fork's deep link
90
+ const forkId = manifest.forks?.[0]?.id;
91
+ let qrBlock = '';
92
+ if (forkId) {
93
+ const url = `https://forkfeed.link/fork/${forkId}`;
94
+ try {
95
+ const qr = await QRCode.toString(url, { type: 'utf8', errorCorrectionLevel: 'L' });
96
+ qrBlock = [
97
+ '',
98
+ 'Scan to open in forkfeed:',
99
+ '',
100
+ qr,
101
+ url,
102
+ ].join('\n');
103
+ }
104
+ catch {
105
+ qrBlock = `\nLink: ${url}`;
106
+ }
107
+ }
88
108
  return {
89
109
  content: [
90
110
  {
@@ -99,6 +119,7 @@ server.tool('forkfeed_push', 'Push a generated manifest (forks, feeds, cards) to
99
119
  '',
100
120
  'Your content is now live in the forkfeed app. It starts as private.',
101
121
  'To make it public, change visibility in the app (requires admin approval).',
122
+ qrBlock,
102
123
  ].join('\n'),
103
124
  },
104
125
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forkfeed-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for pushing GitHub commits to forkfeed",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,11 +15,13 @@
15
15
  "start": "node dist/index.js"
16
16
  },
17
17
  "dependencies": {
18
- "@modelcontextprotocol/sdk": "^1.12.1"
18
+ "@modelcontextprotocol/sdk": "^1.12.1",
19
+ "qrcode": "^1.5.4"
19
20
  },
20
21
  "devDependencies": {
21
- "typescript": "^5.7.0",
22
- "@types/node": "^22.0.0"
22
+ "@types/node": "^22.0.0",
23
+ "@types/qrcode": "^1.5.6",
24
+ "typescript": "^5.7.0"
23
25
  },
24
26
  "engines": {
25
27
  "node": ">=18"