zernio-mcp 1.0.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 ADDED
@@ -0,0 +1,144 @@
1
+ # zernio-mcp
2
+
3
+ A Model Context Protocol (MCP) server that gives Claude Desktop full access to your Zernio social media inbox, analytics, comments, DMs, and reviews — across Facebook, Instagram, TikTok, YouTube, Google Business, and more.
4
+
5
+ ## What You Can Do
6
+
7
+ Ask Claude things like:
8
+
9
+ - "Show me the latest comments on my Instagram posts"
10
+ - "Reply to the comment from @user123 saying thanks for your feedback!"
11
+ - "List my unread DMs on Facebook"
12
+ - "What are my follower stats this month on Instagram?"
13
+ - "Show me all 1-star Google reviews in the last 30 days"
14
+ - "Reply to that review with an apology and our contact info"
15
+ - "What's the best time to post on TikTok?"
16
+ - "How many impressions did my last 5 posts get?"
17
+
18
+ ## Available Tools (27 total)
19
+
20
+ ### Accounts (2 tools)
21
+ | Tool | Description |
22
+ |------|-------------|
23
+ | `zernio_list_accounts` | List all connected social accounts with platform, username, and IDs |
24
+ | `zernio_get_follower_stats` | Get follower count and stats for an account |
25
+
26
+ ### Comments (7 tools)
27
+ | Tool | Description |
28
+ |------|-------------|
29
+ | `zernio_list_commented_posts` | List posts with comments across all platforms |
30
+ | `zernio_get_post_comments` | Get the full comment thread on a specific post |
31
+ | `zernio_reply_to_comment` | Reply to a comment publicly |
32
+ | `zernio_private_reply_to_comment` | Send a private DM reply to a commenter |
33
+ | `zernio_like_comment` | Like a comment |
34
+ | `zernio_hide_comment` | Hide a comment from public view |
35
+ | `zernio_delete_comment` | Permanently delete a comment |
36
+
37
+ ### Messages / DMs (5 tools)
38
+ | Tool | Description |
39
+ |------|-------------|
40
+ | `zernio_list_conversations` | List all DM conversations |
41
+ | `zernio_get_conversation` | Get details of a specific conversation |
42
+ | `zernio_list_messages` | Read the messages in a conversation thread |
43
+ | `zernio_send_message` | Send a DM or reply in a conversation |
44
+ | `zernio_update_conversation_status` | Mark conversations read, unread, or archived |
45
+
46
+ ### Reviews (3 tools)
47
+ | Tool | Description |
48
+ |------|-------------|
49
+ | `zernio_list_reviews` | List customer reviews (Google Business, etc.) |
50
+ | `zernio_reply_to_review` | Reply to a customer review |
51
+ | `zernio_delete_review_reply` | Delete your existing reply to a review |
52
+
53
+ ### Analytics (10 tools)
54
+ | Tool | Description |
55
+ |------|-------------|
56
+ | `zernio_get_post_analytics` | Impressions, reach, likes, comments, shares for posts |
57
+ | `zernio_get_follower_analytics` | Follower growth over time |
58
+ | `zernio_get_best_times_to_post` | Optimal posting times based on your audience |
59
+ | `zernio_get_daily_metrics` | Day-by-day account metrics |
60
+ | `zernio_get_content_decay` | How post performance fades over time |
61
+ | `zernio_get_instagram_insights` | Instagram reach, impressions, profile visits |
62
+ | `zernio_get_instagram_demographics` | Instagram audience age, gender, location |
63
+ | `zernio_get_google_business_performance` | GBP views, direction requests, calls |
64
+ | `zernio_get_google_business_keywords` | Keywords people use to find your GBP |
65
+ | `zernio_get_youtube_analytics` | YouTube daily views, watch time, subscribers |
66
+
67
+ ---
68
+
69
+ ## Setup
70
+
71
+ ### 1. Prerequisites
72
+
73
+ - [Node.js](https://nodejs.org/) v18 or later
74
+ - A [Zernio](https://zernio.com) account with connected social media accounts
75
+ - [Claude Desktop](https://claude.ai/download)
76
+
77
+ ### 2. Get Your Zernio API Key
78
+
79
+ Go to [zernio.com/dashboard/api-keys](https://zernio.com/dashboard/api-keys) and create an API key.
80
+
81
+ ### 3. Install the MCP Server
82
+
83
+ ```bash
84
+ git clone https://github.com/YOUR_USERNAME/zernio-mcp.git
85
+ cd zernio-mcp
86
+ npm install
87
+ npm run build
88
+ ```
89
+
90
+ ### 4. Configure Claude Desktop
91
+
92
+ Open your Claude Desktop config file:
93
+
94
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
95
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
96
+
97
+ Add the Zernio MCP server:
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "zernio": {
103
+ "command": "node",
104
+ "args": ["/absolute/path/to/zernio-mcp/dist/index.js"],
105
+ "env": {
106
+ "ZERNIO_API_KEY": "your_api_key_here"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ Replace `/absolute/path/to/zernio-mcp` with the actual path where you cloned the repo, and `your_api_key_here` with your Zernio API key.
114
+
115
+ ### 5. Restart Claude Desktop
116
+
117
+ Close and reopen Claude Desktop. The Zernio tools will be available immediately.
118
+
119
+ ---
120
+
121
+ ## Notes on Inbox Features
122
+
123
+ Comments, messages, and reviews endpoints require the **Inbox add-on** in your Zernio plan. Check your plan at [zernio.com/dashboard](https://zernio.com/dashboard).
124
+
125
+ Analytics endpoints require the **Analytics add-on** (`hasAnalyticsAccess: true` on your accounts).
126
+
127
+ ---
128
+
129
+ ## Development
130
+
131
+ ```bash
132
+ # Run in development mode (no build step)
133
+ ZERNIO_API_KEY=your_key npm run dev
134
+
135
+ # Build for production
136
+ npm run build
137
+
138
+ # Run built server
139
+ ZERNIO_API_KEY=your_key npm start
140
+ ```
141
+
142
+ ## License
143
+
144
+ MIT
package/dist/client.js ADDED
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zernioRequest = zernioRequest;
4
+ const BASE_URL = "https://zernio.com/api";
5
+ function getApiKey() {
6
+ const key = process.env.ZERNIO_API_KEY;
7
+ if (!key)
8
+ throw new Error("ZERNIO_API_KEY environment variable is not set");
9
+ return key;
10
+ }
11
+ async function zernioRequest(method, path, body, params) {
12
+ const url = new URL(`${BASE_URL}${path}`);
13
+ if (params) {
14
+ for (const [key, value] of Object.entries(params)) {
15
+ if (value !== undefined && value !== null && value !== "") {
16
+ url.searchParams.set(key, String(value));
17
+ }
18
+ }
19
+ }
20
+ const headers = {
21
+ Authorization: `Bearer ${getApiKey()}`,
22
+ "Content-Type": "application/json",
23
+ };
24
+ const options = {
25
+ method,
26
+ headers,
27
+ body: body ? JSON.stringify(body) : undefined,
28
+ };
29
+ const res = await fetch(url.toString(), options);
30
+ if (!res.ok) {
31
+ const text = await res.text().catch(() => "");
32
+ throw new Error(`Zernio API error ${res.status}: ${text}`);
33
+ }
34
+ return res.json();
35
+ }
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
5
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
6
+ const accounts_js_1 = require("./tools/accounts.js");
7
+ const comments_js_1 = require("./tools/comments.js");
8
+ const messages_js_1 = require("./tools/messages.js");
9
+ const reviews_js_1 = require("./tools/reviews.js");
10
+ const analytics_js_1 = require("./tools/analytics.js");
11
+ const server = new mcp_js_1.McpServer({
12
+ name: "zernio-mcp",
13
+ version: "1.0.0",
14
+ });
15
+ const allTools = [
16
+ ...accounts_js_1.accountTools,
17
+ ...comments_js_1.commentTools,
18
+ ...messages_js_1.messageTools,
19
+ ...reviews_js_1.reviewTools,
20
+ ...analytics_js_1.analyticsTools,
21
+ ];
22
+ for (const tool of allTools) {
23
+ server.tool(tool.name, tool.description, tool.inputSchema.shape,
24
+ async (args) => {
25
+ try {
26
+ const result = await tool.handler(args);
27
+ return {
28
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
29
+ };
30
+ }
31
+ catch (err) {
32
+ const message = err instanceof Error ? err.message : String(err);
33
+ return {
34
+ content: [{ type: "text", text: `Error: ${message}` }],
35
+ isError: true,
36
+ };
37
+ }
38
+ });
39
+ }
40
+ async function main() {
41
+ const transport = new stdio_js_1.StdioServerTransport();
42
+ await server.connect(transport);
43
+ console.error("Zernio MCP server running");
44
+ }
45
+ main().catch((err) => {
46
+ console.error("Fatal error:", err);
47
+ process.exit(1);
48
+ });
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ exports.accountTools = [
7
+ {
8
+ name: "zernio_list_accounts",
9
+ description: "List all connected social media accounts in Zernio with their platform, username, follower count, and account ID.",
10
+ inputSchema: zod_1.z.object({
11
+ platform: zod_1.z
12
+ .string()
13
+ .optional()
14
+ .describe("Filter by platform: facebook, instagram, tiktok, twitter, youtube, googlebusiness, linkedin, etc."),
15
+ }),
16
+ handler: async (args) => {
17
+ const data = await (0, client_js_1.zernioRequest)("GET", "/v1/accounts", undefined, { platform: args.platform });
18
+ return data;
19
+ },
20
+ },
21
+ {
22
+ name: "zernio_get_follower_stats",
23
+ description: "Get follower count and basic stats for a specific connected account.",
24
+ inputSchema: zod_1.z.object({
25
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
26
+ }),
27
+ handler: async (args) => {
28
+ return (0, client_js_1.zernioRequest)("GET", `/v1/accounts/follower-stats`, undefined, {
29
+ accountIds: args.accountId,
30
+ });
31
+ },
32
+ },
33
+ ];
34
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyticsTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ exports.analyticsTools = [
7
+ {
8
+ name: "zernio_get_post_analytics",
9
+ description: "Get performance metrics for a specific post — impressions, reach, likes, comments, shares, saves, and clicks.",
10
+ inputSchema: zod_1.z.object({
11
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
12
+ postId: zod_1.z.string().optional().describe("Specific post ID to get analytics for"),
13
+ platform: zod_1.z.string().optional().describe("Filter by platform"),
14
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format, e.g. 2024-01-01)"),
15
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
16
+ }),
17
+ handler: async (args) => {
18
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics", undefined, {
19
+ accountId: args.accountId,
20
+ postId: args.postId,
21
+ platform: args.platform,
22
+ dateFrom: args.dateFrom,
23
+ dateTo: args.dateTo,
24
+ });
25
+ },
26
+ },
27
+ {
28
+ name: "zernio_get_follower_analytics",
29
+ description: "Get follower growth stats for a connected account — total followers, gained/lost over time, and growth rate.",
30
+ inputSchema: zod_1.z.object({
31
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
32
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
33
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
34
+ }),
35
+ handler: async (args) => {
36
+ return (0, client_js_1.zernioRequest)("GET", "/v1/accounts/follower-stats", undefined, {
37
+ accountIds: args.accountId,
38
+ dateFrom: args.dateFrom,
39
+ dateTo: args.dateTo,
40
+ });
41
+ },
42
+ },
43
+ {
44
+ name: "zernio_get_best_times_to_post",
45
+ description: "Get the optimal days and times to post on a specific platform based on your audience's engagement patterns.",
46
+ inputSchema: zod_1.z.object({
47
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
48
+ platform: zod_1.z
49
+ .string()
50
+ .optional()
51
+ .describe("Platform to get best times for: facebook, instagram, tiktok, etc."),
52
+ }),
53
+ handler: async (args) => {
54
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/best-time", undefined, {
55
+ accountId: args.accountId,
56
+ platform: args.platform,
57
+ });
58
+ },
59
+ },
60
+ {
61
+ name: "zernio_get_daily_metrics",
62
+ description: "Get day-by-day account metrics — impressions, reach, engagement rate, new followers, and profile visits.",
63
+ inputSchema: zod_1.z.object({
64
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
65
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
66
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
67
+ platform: zod_1.z.string().optional().describe("Filter by platform"),
68
+ }),
69
+ handler: async (args) => {
70
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/daily-metrics", undefined, {
71
+ accountId: args.accountId,
72
+ dateFrom: args.dateFrom,
73
+ dateTo: args.dateTo,
74
+ platform: args.platform,
75
+ });
76
+ },
77
+ },
78
+ {
79
+ name: "zernio_get_content_decay",
80
+ description: "Track how post performance decays over time — see how reach and engagement drop off after publishing.",
81
+ inputSchema: zod_1.z.object({
82
+ accountId: zod_1.z.string().describe("The Zernio account ID"),
83
+ postId: zod_1.z.string().optional().describe("Specific post ID to analyze"),
84
+ }),
85
+ handler: async (args) => {
86
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/content-decay", undefined, {
87
+ accountId: args.accountId,
88
+ postId: args.postId,
89
+ });
90
+ },
91
+ },
92
+ {
93
+ name: "zernio_get_instagram_insights",
94
+ description: "Get Instagram-specific account insights including reach, impressions, profile visits, website clicks, and follower demographics.",
95
+ inputSchema: zod_1.z.object({
96
+ accountId: zod_1.z.string().describe("The Zernio Instagram account ID"),
97
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
98
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
99
+ }),
100
+ handler: async (args) => {
101
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/instagram/account-insights", undefined, {
102
+ accountId: args.accountId,
103
+ dateFrom: args.dateFrom,
104
+ dateTo: args.dateTo,
105
+ });
106
+ },
107
+ },
108
+ {
109
+ name: "zernio_get_instagram_demographics",
110
+ description: "Get Instagram audience demographics — age groups, gender split, and top locations of your followers.",
111
+ inputSchema: zod_1.z.object({
112
+ accountId: zod_1.z.string().describe("The Zernio Instagram account ID"),
113
+ }),
114
+ handler: async (args) => {
115
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/instagram/demographics", undefined, {
116
+ accountId: args.accountId,
117
+ });
118
+ },
119
+ },
120
+ {
121
+ name: "zernio_get_google_business_performance",
122
+ description: "Get Google Business Profile performance metrics — searches, views, direction requests, calls, and website clicks.",
123
+ inputSchema: zod_1.z.object({
124
+ accountId: zod_1.z.string().describe("The Zernio Google Business account ID"),
125
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
126
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
127
+ }),
128
+ handler: async (args) => {
129
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/googlebusiness/performance", undefined, {
130
+ accountId: args.accountId,
131
+ dateFrom: args.dateFrom,
132
+ dateTo: args.dateTo,
133
+ });
134
+ },
135
+ },
136
+ {
137
+ name: "zernio_get_google_business_keywords",
138
+ description: "Get the search keywords people use to find your Google Business Profile.",
139
+ inputSchema: zod_1.z.object({
140
+ accountId: zod_1.z.string().describe("The Zernio Google Business account ID"),
141
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
142
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
143
+ }),
144
+ handler: async (args) => {
145
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/googlebusiness/search-keywords", undefined, {
146
+ accountId: args.accountId,
147
+ dateFrom: args.dateFrom,
148
+ dateTo: args.dateTo,
149
+ });
150
+ },
151
+ },
152
+ {
153
+ name: "zernio_get_youtube_analytics",
154
+ description: "Get YouTube daily view counts, watch time, and subscriber changes.",
155
+ inputSchema: zod_1.z.object({
156
+ accountId: zod_1.z.string().describe("The Zernio YouTube account ID"),
157
+ videoId: zod_1.z.string().describe("The YouTube video ID to get daily views for"),
158
+ dateFrom: zod_1.z.string().optional().describe("Start date (ISO format)"),
159
+ dateTo: zod_1.z.string().optional().describe("End date (ISO format)"),
160
+ }),
161
+ handler: async (args) => {
162
+ return (0, client_js_1.zernioRequest)("GET", "/v1/analytics/youtube/daily-views", undefined, {
163
+ accountId: args.accountId,
164
+ videoId: args.videoId,
165
+ dateFrom: args.dateFrom,
166
+ dateTo: args.dateTo,
167
+ });
168
+ },
169
+ },
170
+ ];
171
+ //# sourceMappingURL=analytics.js.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commentTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ exports.commentTools = [
7
+ { name: "zernio_list_commented_posts", description: "List posts that have comments across all connected social accounts. Returns posts with comment counts, sorted by most recent or most commented. Use this to see what content is getting engagement.", inputSchema: zod_1.z.object({ platform: zod_1.z.string().optional().describe("Filter by platform: facebook, instagram, twitter, youtube, tiktok, linkedin, threads, bluesky, reddit"), accountId: zod_1.z.string().optional().describe("Filter by specific account ID"), minComments: zod_1.z.number().optional().describe("Only return posts with at least this many comments"), since: zod_1.z.string().optional().describe("ISO date string — only return posts with comments since this date"), sortBy: zod_1.z.enum(["recent", "mostCommented"]).optional().describe("Sort order: recent (default) or mostCommented"), limit: zod_1.z.number().optional().describe("Max number of posts to return (default 20)") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", "/v1/inbox/comments", undefined, { platform: args.platform, accountId: args.accountId, minComments: args.minComments, since: args.since, sortBy: args.sortBy, limit: args.limit }); } },
8
+ { name: "zernio_get_post_comments", description: "Get all comments on a specific post. Returns the full comment thread including replies, author names, timestamps, and comment IDs needed to reply or moderate.", inputSchema: zod_1.z.object({ postId: zod_1.z.string().describe("The platform post ID"), accountId: zod_1.z.string().describe("The Zernio account ID that owns the post") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", `/v1/inbox/comments/${args.postId}`, undefined, { accountId: args.accountId }); } },
9
+ { name: "zernio_reply_to_comment", description: "Reply to a comment on a social media post. Works across Facebook, Instagram, YouTube, TikTok, LinkedIn, Twitter, and more.", inputSchema: zod_1.z.object({ commentId: zod_1.z.string().describe("The comment ID to reply to"), message: zod_1.z.string().describe("The reply text"), accountId: zod_1.z.string().describe("The Zernio account ID to reply from") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", `/v1/inbox/comments/${args.commentId}/reply`, { message: args.message, accountId: args.accountId }); } },
10
+ { name: "zernio_private_reply_to_comment", description: "Send a private/direct message reply to someone who commented on a post.", inputSchema: zod_1.z.object({ commentId: zod_1.z.string().describe("The comment ID to privately reply to"), message: zod_1.z.string().describe("The private message text"), accountId: zod_1.z.string().describe("The Zernio account ID to send from") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", `/v1/inbox/comments/${args.commentId}/private-reply`, { message: args.message, accountId: args.accountId }); } },
11
+ { name: "zernio_like_comment", description: "Like or react to a comment on a post.", inputSchema: zod_1.z.object({ commentId: zod_1.z.string().describe("The comment ID to like"), accountId: zod_1.z.string().describe("The Zernio account ID") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", `/v1/inbox/comments/${args.commentId}/like`, { accountId: args.accountId }); } },
12
+ { name: "zernio_hide_comment", description: "Hide a comment from public view. The comment is not deleted but hidden from other users.", inputSchema: zod_1.z.object({ commentId: zod_1.z.string().describe("The comment ID to hide"), accountId: zod_1.z.string().describe("The Zernio account ID") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", `/v1/inbox/comments/${args.commentId}/hide`, { accountId: args.accountId }); } },
13
+ { name: "zernio_delete_comment", description: "Permanently delete a comment from a post. Use with caution — this cannot be undone.", inputSchema: zod_1.z.object({ commentId: zod_1.z.string().describe("The comment ID to delete"), accountId: zod_1.z.string().describe("The Zernio account ID") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("DELETE", `/v1/inbox/comments/${args.commentId}`, { accountId: args.accountId }); } },
14
+ ];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ exports.messageTools = [
7
+ { name: "zernio_list_conversations", description: "List all DM conversations across connected social media accounts (Facebook, Instagram, etc.). Returns sender info, last message preview, and conversation IDs needed to read or reply.", inputSchema: zod_1.z.object({ accountId: zod_1.z.string().optional().describe("Filter by specific account ID"), platform: zod_1.z.string().optional().describe("Filter by platform: facebook, instagram, twitter, etc."), limit: zod_1.z.number().optional().describe("Max conversations to return (default 20)") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", "/v1/inbox/conversations", undefined, { accountId: args.accountId, platform: args.platform, limit: args.limit }); } },
8
+ { name: "zernio_get_conversation", description: "Get details and metadata for a specific conversation.", inputSchema: zod_1.z.object({ conversationId: zod_1.z.string().describe("The conversation ID") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", `/v1/inbox/conversations/${args.conversationId}`); } },
9
+ { name: "zernio_list_messages", description: "Read the messages in a specific conversation thread.", inputSchema: zod_1.z.object({ conversationId: zod_1.z.string().describe("The conversation ID"), limit: zod_1.z.number().optional().describe("Max messages to return (default 50)") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", `/v1/inbox/conversations/${args.conversationId}/messages`, undefined, { limit: args.limit }); } },
10
+ { name: "zernio_send_message", description: "Send a DM or reply to a conversation on Facebook Messenger, Instagram DMs, and other supported platforms.", inputSchema: zod_1.z.object({ conversationId: zod_1.z.string().optional().describe("Existing conversation ID to reply to"), accountId: zod_1.z.string().describe("The Zernio account ID to send from"), message: zod_1.z.string().describe("The message text to send"), recipientId: zod_1.z.string().optional().describe("Recipient user ID for starting a new conversation") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", "/v1/inbox/messages", { conversationId: args.conversationId, accountId: args.accountId, message: args.message, recipientId: args.recipientId }); } },
11
+ { name: "zernio_update_conversation_status", description: "Update a conversation's status — mark as read, archive, or unarchive it.", inputSchema: zod_1.z.object({ conversationId: zod_1.z.string().describe("The conversation ID"), status: zod_1.z.enum(["read", "unread", "archived", "unarchived"]).describe("New status for the conversation") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("PUT", `/v1/inbox/conversations/${args.conversationId}`, { status: args.status }); } },
12
+ ];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reviewTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ exports.reviewTools = [
7
+ { name: "zernio_list_reviews", description: "List customer reviews from connected accounts (e.g. Google Business Profile). Returns reviewer name, rating, review text, date, and review ID needed to reply.", inputSchema: zod_1.z.object({ accountId: zod_1.z.string().optional().describe("Filter by specific account ID"), platform: zod_1.z.string().optional().describe("Filter by platform: googlebusiness, facebook, etc."), minRating: zod_1.z.number().min(1).max(5).optional().describe("Only return reviews with this star rating or higher"), since: zod_1.z.string().optional().describe("ISO date — only return reviews submitted after this date"), sortBy: zod_1.z.enum(["recent", "rating"]).optional().describe("Sort by most recent (default) or by rating"), limit: zod_1.z.number().optional().describe("Max reviews to return (default 20)") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("GET", "/v1/inbox/reviews", undefined, { accountId: args.accountId, platform: args.platform, minRating: args.minRating, since: args.since, sortBy: args.sortBy, limit: args.limit }); } },
8
+ { name: "zernio_reply_to_review", description: "Reply to a customer review (e.g. on Google Business Profile). The reply will be publicly visible.", inputSchema: zod_1.z.object({ reviewId: zod_1.z.string().describe("The review ID to reply to"), accountId: zod_1.z.string().describe("The Zernio account ID to reply from"), message: zod_1.z.string().describe("Your reply text") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("POST", `/v1/inbox/reviews/${args.reviewId}/reply`, { accountId: args.accountId, message: args.message }); } },
9
+ { name: "zernio_delete_review_reply", description: "Delete your existing reply to a review.", inputSchema: zod_1.z.object({ reviewId: zod_1.z.string().describe("The review ID whose reply should be deleted"), accountId: zod_1.z.string().describe("The Zernio account ID") }), handler: async (args) => { return (0, client_js_1.zernioRequest)("DELETE", `/v1/inbox/reviews/${args.reviewId}/reply`, { accountId: args.accountId }); } },
10
+ ];
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "zernio-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Zernio — social media inbox, analytics, comments, messages and reviews",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "zernio-mcp": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist/**/*",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "start": "node dist/index.js",
16
+ "dev": "ts-node src/index.ts",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "keywords": ["mcp", "zernio", "social-media", "claude", "model-context-protocol", "inbox", "analytics"],
20
+ "author": "Eyalm321",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/Eyalm321/zernio-mcp.git"
24
+ },
25
+ "homepage": "https://github.com/Eyalm321/zernio-mcp#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/Eyalm321/zernio-mcp/issues"
28
+ },
29
+ "license": "MIT",
30
+ "dependencies": {
31
+ "@modelcontextprotocol/sdk": "^1.29.0",
32
+ "zod": "^4.3.6"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^25.5.2",
36
+ "ts-node": "^10.9.2",
37
+ "typescript": "^6.0.2"
38
+ }
39
+ }