@loopops/mcp-server 3.10.0 → 3.13.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/index.js +0 -0
- package/dist/tools/crm.js +19 -43
- package/dist/tools/people-master.js +27 -0
- package/dist/tools/reporting.js +8 -25
- package/package.json +7 -8
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/tools/crm.js
CHANGED
|
@@ -1,49 +1,25 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { trpcMutation } from "../api-client.js";
|
|
3
3
|
import { safeTool } from "./_helpers.js";
|
|
4
|
-
import { leadStatusSchema,
|
|
4
|
+
import { leadStatusSchema, salesforceLeadIdSchema, salesforceOpportunityIdSchema, targetAccountTierSchema, } from "./_schemas.js";
|
|
5
5
|
export function registerCrmTools(server, allowed) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.describe("Time window for lead creation date. E.g., '7d' = last 7 days, '30d' = default, '90d' = last quarter."),
|
|
24
|
-
}, safeTool(async ({ status, range }) => trpcQuery("mcp.myLeads", { status, range })));
|
|
25
|
-
}
|
|
26
|
-
if (allowed.has("pipeline_health")) {
|
|
27
|
-
server.tool("pipeline_health", "Pipeline health summary: deals by stage, win rate, average deal size, pipeline velocity.", {
|
|
28
|
-
range: rangeSchema
|
|
29
|
-
.optional()
|
|
30
|
-
.describe("Time window for closed-deal analysis. Longer ranges (30d, 90d, 180d, 1y) give more stable metrics. Default: 90d."),
|
|
31
|
-
}, safeTool(async ({ range }) => trpcQuery("mcp.pipelineHealth", { range })));
|
|
32
|
-
}
|
|
33
|
-
if (allowed.has("rep_performance")) {
|
|
34
|
-
server.tool("rep_performance", "Compare rep performance: open pipeline, activities, lead count, win rate.", {
|
|
35
|
-
range: rangeSchema
|
|
36
|
-
.optional()
|
|
37
|
-
.describe("Time window for closed deals and activity. Default: 30d."),
|
|
38
|
-
}, safeTool(async ({ range }) => trpcQuery("mcp.repPerformance", { range })));
|
|
39
|
-
}
|
|
40
|
-
if (allowed.has("forecast")) {
|
|
41
|
-
server.tool("forecast", "Pipeline forecast: weighted pipeline by close date, comparison to target.", {
|
|
42
|
-
quarter: quarterSchema
|
|
43
|
-
.optional()
|
|
44
|
-
.describe("Quarter to forecast. Default: current quarter."),
|
|
45
|
-
}, safeTool(async ({ quarter }) => trpcQuery("mcp.forecast", { quarter })));
|
|
46
|
-
}
|
|
6
|
+
// my_pipeline retired 2026-05-06 — replaced by ClickHouse parameterized
|
|
7
|
+
// view analytics.my_pipeline. Row policies on salesforce.opportunity
|
|
8
|
+
// enforce per-user scoping (rep: own; manager: team; leadership/ops/eng:
|
|
9
|
+
// all). Query via the Cloud Remote MCP server (mcp.clickhouse.cloud/mcp).
|
|
10
|
+
// See docs/CH-ANALYTICS-VIEWS.md.
|
|
11
|
+
// my_leads retired 2026-05-06 — replaced by ClickHouse view
|
|
12
|
+
// analytics.my_leads. Row policies on salesforce.lead enforce per-user
|
|
13
|
+
// scoping. Filter by created_date in the caller. See docs/CH-ANALYTICS-VIEWS.md.
|
|
14
|
+
// pipeline_health retired 2026-05-06 — replaced by ClickHouse views
|
|
15
|
+
// analytics.pipeline_by_stage + analytics.win_rate(range_days). Query via
|
|
16
|
+
// the Cloud Remote MCP server (mcp.clickhouse.cloud/mcp). Row policies on
|
|
17
|
+
// salesforce.opportunity enforce per-user scoping. See docs/CH-ANALYTICS-VIEWS.md.
|
|
18
|
+
// rep_performance retired 2026-05-06 — replaced by ClickHouse view
|
|
19
|
+
// analytics.rep_performance(range_days). See docs/CH-ANALYTICS-VIEWS.md.
|
|
20
|
+
// forecast retired 2026-05-06 — replaced by ClickHouse view
|
|
21
|
+
// analytics.forecast(quarter_start, quarter_end). Caller computes the
|
|
22
|
+
// quarter window. See docs/CH-ANALYTICS-VIEWS.md.
|
|
47
23
|
if (allowed.has("update_opportunity")) {
|
|
48
24
|
server.tool("update_opportunity", "Update an opportunity's close date, next step, or description. You can identify the deal by Salesforce Opportunity ID or exact opportunity name. Reps can only update their own deals. Requires a reason for the change.", {
|
|
49
25
|
opportunityId: salesforceOpportunityIdSchema
|
|
@@ -142,6 +142,33 @@ export function registerPeopleMasterTools(server, allowed) {
|
|
|
142
142
|
return trpcMutation("mcp.importPeopleCsv", { csv, ...rest });
|
|
143
143
|
}));
|
|
144
144
|
}
|
|
145
|
+
if (allowed.has("notify_activity_capture")) {
|
|
146
|
+
server.tool("notify_activity_capture", [
|
|
147
|
+
"Send the one-time privacy notification email to cro_org members whose meeting",
|
|
148
|
+
"metadata is being captured. Defaults to dryRun: true so the operator previews the",
|
|
149
|
+
"recipient list before committing. Idempotent — re-running drains only un-notified",
|
|
150
|
+
"persons. Required step before flipping the activity-capture cron from disabled to",
|
|
151
|
+
"enabled in config/govern/schedules.yaml.",
|
|
152
|
+
].join(" "), {
|
|
153
|
+
walkId: z
|
|
154
|
+
.string()
|
|
155
|
+
.optional()
|
|
156
|
+
.describe("Walk id from config/people_master/hierarchy_walks.yaml. Default: 'cro_org'."),
|
|
157
|
+
dryRun: z
|
|
158
|
+
.boolean()
|
|
159
|
+
.optional()
|
|
160
|
+
.describe("When true (default), returns the would-be recipients without sending. Pass false to actually send."),
|
|
161
|
+
personIds: z
|
|
162
|
+
.array(z.string().uuid())
|
|
163
|
+
.optional()
|
|
164
|
+
.describe("Restrict to a specific subset of person ids (e.g. for a test send before broadcast). Empty = full walk."),
|
|
165
|
+
privacyDocUrl: z
|
|
166
|
+
.string()
|
|
167
|
+
.url()
|
|
168
|
+
.optional()
|
|
169
|
+
.describe("Optional 'Learn more' URL surfaced as a button in the email body. Omit to hide."),
|
|
170
|
+
}, safeTool(async (input) => trpcMutation("mcp.notifyActivityCapture", input)));
|
|
171
|
+
}
|
|
145
172
|
if (allowed.has("sync_people_master_resolution_rules")) {
|
|
146
173
|
server.tool("sync_people_master_resolution_rules", [
|
|
147
174
|
"Apply the committed config/people_master/resolution_rules.yaml to the DB.",
|
package/dist/tools/reporting.js
CHANGED
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
import { trpcQuery } from "../api-client.js";
|
|
2
2
|
import { safeTool } from "./_helpers.js";
|
|
3
|
-
import {
|
|
3
|
+
import { rangeSchema, salesforceLeadIdSchema, } from "./_schemas.js";
|
|
4
4
|
export function registerReportingTools(server, allowed) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.describe("Time window. Short ranges (1h, 6h, 24h) are most useful. Default: 24h."),
|
|
13
|
-
}, safeTool(async ({ loop, range }) => trpcQuery("mcp.loopHealth", { loop, range })));
|
|
14
|
-
}
|
|
15
|
-
if (allowed.has("scoring_distribution")) {
|
|
16
|
-
server.tool("scoring_distribution", "Analyze lead scoring distribution: score histogram, grade breakdown, average score by factor.", {
|
|
17
|
-
range: rangeSchema
|
|
18
|
-
.optional()
|
|
19
|
-
.describe("Time window. Default: 7d."),
|
|
20
|
-
}, safeTool(async ({ range }) => trpcQuery("mcp.scoringDistribution", { range })));
|
|
21
|
-
}
|
|
22
|
-
if (allowed.has("routing_report")) {
|
|
23
|
-
server.tool("routing_report", "Analyze routing decisions: rule match rates, queue distribution, agent fallback percentage.", {
|
|
24
|
-
range: rangeSchema
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("Time window. Default: 7d."),
|
|
27
|
-
}, safeTool(async ({ range }) => trpcQuery("mcp.routingReport", { range })));
|
|
28
|
-
}
|
|
5
|
+
// loop_health retired 2026-05-06 — replaced by ClickHouse parameterized
|
|
6
|
+
// view analytics.loop_health(range_days). Query via the Cloud Remote MCP
|
|
7
|
+
// server (mcp.clickhouse.cloud/mcp). See docs/CH-ANALYTICS-VIEWS.md.
|
|
8
|
+
// scoring_distribution retired 2026-05-06 — replaced by ClickHouse view
|
|
9
|
+
// analytics.scoring_distribution(range_days). See docs/CH-ANALYTICS-VIEWS.md.
|
|
10
|
+
// routing_report retired 2026-05-06 — replaced by ClickHouse view
|
|
11
|
+
// analytics.routing_report(range_days). See docs/CH-ANALYTICS-VIEWS.md.
|
|
29
12
|
if (allowed.has("enrichment_coverage")) {
|
|
30
13
|
server.tool("enrichment_coverage", "Analyze lead enrichment coverage: enrichment rate, top industries, headcount distribution.", {
|
|
31
14
|
range: rangeSchema
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopops/mcp-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Loop Operations MCP Server — AI skills for RevOps",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,6 @@
|
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc",
|
|
25
|
-
"dev": "tsx src/index.ts",
|
|
26
|
-
"start": "node dist/index.js",
|
|
27
|
-
"prepublishOnly": "pnpm build"
|
|
28
|
-
},
|
|
29
23
|
"dependencies": {
|
|
30
24
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
31
25
|
"zod": "^3.24.4"
|
|
@@ -34,5 +28,10 @@
|
|
|
34
28
|
"@types/node": "^22.15.21",
|
|
35
29
|
"tsx": "^4.19.4",
|
|
36
30
|
"typescript": "^5.8.3"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc",
|
|
34
|
+
"dev": "tsx src/index.ts",
|
|
35
|
+
"start": "node dist/index.js"
|
|
37
36
|
}
|
|
38
|
-
}
|
|
37
|
+
}
|