@zeph-to/mcp-server 0.2.0 → 0.3.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/dist/api-client.js +1 -1
- package/dist/index.js +12 -1
- package/dist/tools/broadcast.d.ts.map +1 -1
- package/dist/tools/broadcast.js +5 -0
- package/dist/tools/clipboard.d.ts.map +1 -1
- package/dist/tools/clipboard.js +5 -0
- package/dist/tools/dismiss.d.ts.map +1 -1
- package/dist/tools/dismiss.js +12 -0
- package/dist/tools/file.d.ts.map +1 -1
- package/dist/tools/file.js +5 -0
- package/dist/tools/input.d.ts.map +1 -1
- package/dist/tools/input.js +5 -0
- package/dist/tools/list.d.ts.map +1 -1
- package/dist/tools/list.js +5 -0
- package/dist/tools/notify.d.ts.map +1 -1
- package/dist/tools/notify.js +5 -0
- package/dist/tools/prompt.d.ts.map +1 -1
- package/dist/tools/prompt.js +5 -0
- package/package.json +2 -2
package/dist/api-client.js
CHANGED
|
@@ -43,7 +43,7 @@ class ZephApiClient {
|
|
|
43
43
|
return this.request('GET', `/pushes${qs ? `?${qs}` : ''}`);
|
|
44
44
|
}
|
|
45
45
|
async dismissPush(pushId) {
|
|
46
|
-
return this.request('POST', `/pushes/${pushId}/dismiss`);
|
|
46
|
+
return this.request('POST', `/pushes/${encodeURIComponent(pushId)}/dismiss`);
|
|
47
47
|
}
|
|
48
48
|
async dismissAllPushes() {
|
|
49
49
|
return this.request('POST', '/pushes/dismiss-all');
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
4
6
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
7
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
8
|
const config_js_1 = require("./config.js");
|
|
@@ -15,12 +17,21 @@ const broadcast_js_1 = require("./tools/broadcast.js");
|
|
|
15
17
|
const file_js_1 = require("./tools/file.js");
|
|
16
18
|
const devices_js_1 = require("./resources/devices.js");
|
|
17
19
|
const channels_js_1 = require("./resources/channels.js");
|
|
20
|
+
const getVersion = () => {
|
|
21
|
+
try {
|
|
22
|
+
const pkg = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'package.json'), 'utf-8'));
|
|
23
|
+
return pkg.version;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return '0.0.0';
|
|
27
|
+
}
|
|
28
|
+
};
|
|
18
29
|
const createServer = () => {
|
|
19
30
|
const config = (0, config_js_1.loadConfig)();
|
|
20
31
|
const client = new api_client_js_1.ZephApiClient(config);
|
|
21
32
|
const server = new mcp_js_1.McpServer({
|
|
22
33
|
name: 'zeph',
|
|
23
|
-
version:
|
|
34
|
+
version: getVersion(),
|
|
24
35
|
}, {
|
|
25
36
|
instructions: [
|
|
26
37
|
'Zeph MCP Server — Send notifications, files, clipboard text, broadcast to channels, manage push history, and interact with users across their devices.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast.d.ts","sourceRoot":"","sources":["../../src/tools/broadcast.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"broadcast.d.ts","sourceRoot":"","sources":["../../src/tools/broadcast.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,SAsC7E,CAAC"}
|
package/dist/tools/broadcast.js
CHANGED
|
@@ -6,6 +6,11 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerBroadcastTool = (server, client) => {
|
|
7
7
|
server.registerTool('zeph_broadcast', {
|
|
8
8
|
description: 'Send a push notification to all subscribers of a channel. Use zeph://channels resource to find available channels.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: {
|
|
10
15
|
channelId: zod_1.z.string().describe('Channel ID to broadcast to (e.g., "ch_...")'),
|
|
11
16
|
title: zod_1.z.string().describe('Notification title'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/tools/clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/tools/clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA8BtG,CAAC"}
|
package/dist/tools/clipboard.js
CHANGED
|
@@ -6,6 +6,11 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerClipboardTool = (server, client, config) => {
|
|
7
7
|
server.registerTool('zeph_clipboard', {
|
|
8
8
|
description: 'Copy text to the user\'s device clipboard. The text will appear in their clipboard history and can be pasted immediately.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: {
|
|
10
15
|
text: zod_1.z.string().describe('Text to copy to clipboard'),
|
|
11
16
|
targetDeviceId: zod_1.z.string().optional().describe('Target device ID. Omit to use configured default or send to all devices.'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dismiss.d.ts","sourceRoot":"","sources":["../../src/tools/dismiss.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"dismiss.d.ts","sourceRoot":"","sources":["../../src/tools/dismiss.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,SAyB3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,SAuB9E,CAAC"}
|
package/dist/tools/dismiss.js
CHANGED
|
@@ -6,6 +6,12 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerDismissTool = (server, client) => {
|
|
7
7
|
server.registerTool('zeph_dismiss', {
|
|
8
8
|
description: 'Dismiss (mark as read) a specific push notification by ID. Use after processing a notification to clear it from the user\'s feed.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
idempotentHint: true,
|
|
13
|
+
openWorldHint: true,
|
|
14
|
+
},
|
|
9
15
|
inputSchema: {
|
|
10
16
|
pushId: zod_1.z.string().describe('Push ID to dismiss (e.g., "push_01HX...")'),
|
|
11
17
|
},
|
|
@@ -23,6 +29,12 @@ exports.registerDismissTool = registerDismissTool;
|
|
|
23
29
|
const registerDismissAllTool = (server, client) => {
|
|
24
30
|
server.registerTool('zeph_dismiss_all', {
|
|
25
31
|
description: 'Dismiss all push notifications at once. Clears the entire notification feed.',
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: false,
|
|
34
|
+
destructiveHint: false,
|
|
35
|
+
idempotentHint: true,
|
|
36
|
+
openWorldHint: true,
|
|
37
|
+
},
|
|
26
38
|
inputSchema: {},
|
|
27
39
|
}, async () => {
|
|
28
40
|
try {
|
package/dist/tools/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/tools/file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/tools/file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA8CjG,CAAC"}
|
package/dist/tools/file.js
CHANGED
|
@@ -6,6 +6,11 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerFileTool = (server, client, config) => {
|
|
7
7
|
server.registerTool('zeph_file', {
|
|
8
8
|
description: 'Send a text file to the user\'s device. The content is uploaded and delivered as a file push. Use for logs, reports, code snippets, or any text content.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: {
|
|
10
15
|
fileName: zod_1.z.string().describe('File name with extension (e.g., "report.txt", "output.json")'),
|
|
11
16
|
content: zod_1.z.string().describe('Text content of the file'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/tools/input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/tools/input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SAuDlG,CAAC"}
|
package/dist/tools/input.js
CHANGED
|
@@ -7,6 +7,11 @@ const poll_js_1 = require("../poll.js");
|
|
|
7
7
|
const registerInputTool = (server, client, config) => {
|
|
8
8
|
server.registerTool('zeph_input', {
|
|
9
9
|
description: 'Request text input from the user via push notification. The tool blocks until the user responds or the timeout is reached. Requires ZEPH_HOOK_ID environment variable.',
|
|
10
|
+
annotations: {
|
|
11
|
+
readOnlyHint: false,
|
|
12
|
+
destructiveHint: false,
|
|
13
|
+
openWorldHint: true,
|
|
14
|
+
},
|
|
10
15
|
inputSchema: {
|
|
11
16
|
title: zod_1.z.string().describe('Input request title'),
|
|
12
17
|
body: zod_1.z.string().optional().describe('Instructions or context'),
|
package/dist/tools/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,SAwCxE,CAAC"}
|
package/dist/tools/list.js
CHANGED
|
@@ -6,6 +6,11 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerListTool = (server, client) => {
|
|
7
7
|
server.registerTool('zeph_list', {
|
|
8
8
|
description: 'List recent push notifications. Use this to check notification history, avoid duplicates, or reference previous messages.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: true,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: {
|
|
10
15
|
limit: zod_1.z
|
|
11
16
|
.number()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/tools/notify.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/tools/notify.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SAsCnG,CAAC"}
|
package/dist/tools/notify.js
CHANGED
|
@@ -6,6 +6,11 @@ const error_format_js_1 = require("../error-format.js");
|
|
|
6
6
|
const registerNotifyTool = (server, client, config) => {
|
|
7
7
|
server.registerTool('zeph_notify', {
|
|
8
8
|
description: 'Send a one-way push notification to the user\'s devices. Use this to inform the user about task completion, errors, or status updates.',
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: false,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
9
14
|
inputSchema: {
|
|
10
15
|
title: zod_1.z.string().describe('Notification title'),
|
|
11
16
|
body: zod_1.z.string().optional().describe('Notification body text'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/tools/prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/tools/prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SAsEnG,CAAC"}
|
package/dist/tools/prompt.js
CHANGED
|
@@ -7,6 +7,11 @@ const poll_js_1 = require("../poll.js");
|
|
|
7
7
|
const registerPromptTool = (server, client, config) => {
|
|
8
8
|
server.registerTool('zeph_prompt', {
|
|
9
9
|
description: 'Ask the user to choose from predefined options via push notification. The tool blocks until the user responds or the timeout is reached. Requires ZEPH_HOOK_ID environment variable.',
|
|
10
|
+
annotations: {
|
|
11
|
+
readOnlyHint: false,
|
|
12
|
+
destructiveHint: false,
|
|
13
|
+
openWorldHint: true,
|
|
14
|
+
},
|
|
10
15
|
inputSchema: {
|
|
11
16
|
title: zod_1.z.string().describe('Question or request title'),
|
|
12
17
|
body: zod_1.z.string().optional().describe('Detailed description'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeph-to/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Zeph MCP server — AI agent notifications, prompts, and input via MCP protocol",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"directory": "libs/mcp-server"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/tak-bro/encl/tree/main/libs/mcp-server",
|
|
31
|
-
"keywords": ["zeph", "mcp", "ai", "notification", "prompt", "model-context-protocol"],
|
|
31
|
+
"keywords": ["zeph", "mcp", "ai", "notification", "prompt", "model-context-protocol", "claude", "ai-agent", "devtools", "cursor", "gemini"],
|
|
32
32
|
"license": "MIT"
|
|
33
33
|
}
|