@closedloop-ai/mcp-client 1.1.2 → 1.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/.github/workflows/publish.yml +38 -0
- package/README.md +173 -18
- package/index.js +31 -3
- package/package.json +8 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'index.js'
|
|
8
|
+
- 'package.json'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
id-token: write
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Setup Node.js
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: '22'
|
|
25
|
+
|
|
26
|
+
- name: Upgrade npm to latest
|
|
27
|
+
run: npm install -g npm@latest
|
|
28
|
+
|
|
29
|
+
- name: Check versions
|
|
30
|
+
run: |
|
|
31
|
+
node --version
|
|
32
|
+
npm --version
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: npm ci --ignore-scripts || npm install --ignore-scripts
|
|
36
|
+
|
|
37
|
+
- name: Publish with OIDC
|
|
38
|
+
run: npm publish --access public --provenance
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# ClosedLoop MCP
|
|
1
|
+
# ClosedLoop AI MCP Client
|
|
2
2
|
|
|
3
|
-
A lightweight Model Context Protocol (MCP)
|
|
3
|
+
A lightweight Model Context Protocol (MCP) client that provides AI assistants with access to ClosedLoop AI customer feedback data and advanced search capabilities.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ npm install -g @closedloop-ai/mcp-client
|
|
|
23
23
|
|
|
24
24
|
Set the following environment variables:
|
|
25
25
|
|
|
26
|
-
- `CLOSEDLOOP_API_KEY`: Your ClosedLoop API key (required)
|
|
26
|
+
- `CLOSEDLOOP_API_KEY`: Your ClosedLoop AI API key (required)
|
|
27
27
|
- `CLOSEDLOOP_SERVER_URL`: Server URL (default: https://mcp.closedloop.sh)
|
|
28
28
|
|
|
29
29
|
## Usage with Claude
|
|
@@ -51,18 +51,124 @@ Add this configuration to your Claude Desktop app:
|
|
|
51
51
|
Retrieve customer insights with optional filtering and pagination.
|
|
52
52
|
|
|
53
53
|
**Parameters:**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
| Parameter | Type | Required | Description |
|
|
55
|
+
|-----------|------|----------|-------------|
|
|
56
|
+
| `date_from` | string | No | Start date (YYYY-MM-DD) |
|
|
57
|
+
| `date_to` | string | No | End date (YYYY-MM-DD) |
|
|
58
|
+
| `page` | integer | No | Page number (default: 1) |
|
|
59
|
+
| `limit` | integer | No | Items per page (default: 20, max: 100) |
|
|
60
|
+
|
|
61
|
+
**Response Fields:**
|
|
62
|
+
| Field | Type | Description |
|
|
63
|
+
|-------|------|-------------|
|
|
64
|
+
| `id` | string | Unique insight identifier (UUID) |
|
|
65
|
+
| `signal_title` | string | Title/summary of the insight |
|
|
66
|
+
| `content` | string | Raw feedback content |
|
|
67
|
+
| `category` | string | Insight category (Bug, Feature Request, etc.) |
|
|
68
|
+
| `severity` | string | Severity level (critical, high, medium, low) |
|
|
69
|
+
| `status` | string | Processing status |
|
|
70
|
+
| `source_timestamp` | string | When feedback was received |
|
|
71
|
+
| `customer_name` | string | Customer who provided feedback |
|
|
72
|
+
| `reporter_name` | string | Person who reported the insight |
|
|
73
|
+
| `pain_point` | string | Identified customer pain point |
|
|
74
|
+
| `is_deal_blocker` | boolean | Whether this blocks deals |
|
|
75
|
+
| `relevance_score` | number | Business relevance score |
|
|
76
|
+
| `source_name` | string | Integration source name |
|
|
77
|
+
| `created_at` | string | When insight was created |
|
|
78
|
+
|
|
79
|
+
**Response Example:**
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"insights": [
|
|
83
|
+
{
|
|
84
|
+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
85
|
+
"signal_title": "Mobile app crashes on startup",
|
|
86
|
+
"content": "The app keeps crashing whenever I try to open it...",
|
|
87
|
+
"category": "Bug",
|
|
88
|
+
"severity": "high",
|
|
89
|
+
"status": "processed",
|
|
90
|
+
"source_timestamp": "2024-01-15T10:30:00Z",
|
|
91
|
+
"customer_name": "Acme Corp",
|
|
92
|
+
"reporter_name": "John Smith",
|
|
93
|
+
"pain_point": "Cannot access mobile features",
|
|
94
|
+
"is_deal_blocker": true,
|
|
95
|
+
"relevance_score": 0.85,
|
|
96
|
+
"source_name": "Intercom",
|
|
97
|
+
"created_at": "2024-01-15T10:35:00Z"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"pagination": {
|
|
101
|
+
"total_count": 142,
|
|
102
|
+
"page": 1,
|
|
103
|
+
"limit": 20,
|
|
104
|
+
"total_pages": 8
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
58
110
|
|
|
59
111
|
### get_insight_detail
|
|
60
112
|
Get detailed information about a specific insight item.
|
|
61
113
|
|
|
62
114
|
**Parameters:**
|
|
63
|
-
|
|
115
|
+
| Parameter | Type | Required | Description |
|
|
116
|
+
|-----------|------|----------|-------------|
|
|
117
|
+
| `insight_id` | string | Yes | UUID of the insight item |
|
|
64
118
|
|
|
65
|
-
|
|
119
|
+
**Response Fields:**
|
|
120
|
+
| Field | Type | Description |
|
|
121
|
+
|-------|------|-------------|
|
|
122
|
+
| `id` | string | Unique insight identifier (UUID) |
|
|
123
|
+
| `signal_title` | string | Title/summary of the insight |
|
|
124
|
+
| `content` | string | Raw feedback content |
|
|
125
|
+
| `category` | string | Insight category |
|
|
126
|
+
| `severity` | string | Severity level |
|
|
127
|
+
| `status` | string | Processing status |
|
|
128
|
+
| `summary` | string | AI-generated summary |
|
|
129
|
+
| `outcome_categories` | array | Business impact categories |
|
|
130
|
+
| `customer_name` | string | Customer who provided feedback |
|
|
131
|
+
| `customer_email` | string | Customer email address |
|
|
132
|
+
| `reporter_name` | string | Person who reported the insight |
|
|
133
|
+
| `source_name` | string | Integration source name |
|
|
134
|
+
| `pain_point` | string | Identified customer pain point |
|
|
135
|
+
| `workaround` | string | Customer's current workaround |
|
|
136
|
+
| `use_case` | string | Use case description |
|
|
137
|
+
| `feature_area` | string | Related feature area |
|
|
138
|
+
| `competitor_gap` | string | Competitive analysis notes |
|
|
139
|
+
| `willingness_to_pay` | string | Payment willingness info |
|
|
140
|
+
| `source_timestamp` | string | When feedback was received |
|
|
141
|
+
| `created_at` | string | When insight was created |
|
|
142
|
+
|
|
143
|
+
**Response Example:**
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
147
|
+
"signal_title": "Mobile app crashes on startup",
|
|
148
|
+
"content": "The app keeps crashing whenever I try to open it on my iPhone...",
|
|
149
|
+
"category": "Bug",
|
|
150
|
+
"severity": "high",
|
|
151
|
+
"status": "processed",
|
|
152
|
+
"summary": "Critical mobile stability issue affecting iOS users on app launch",
|
|
153
|
+
"outcome_categories": ["Product Quality", "User Experience", "Retention Risk"],
|
|
154
|
+
"customer_name": "Acme Corp",
|
|
155
|
+
"customer_email": "john@acme.com",
|
|
156
|
+
"reporter_name": "John Smith",
|
|
157
|
+
"source_name": "Intercom",
|
|
158
|
+
"pain_point": "Cannot access mobile features, forced to use desktop",
|
|
159
|
+
"workaround": "Using the web version on mobile browser",
|
|
160
|
+
"use_case": "Field sales team needs mobile access for client meetings",
|
|
161
|
+
"feature_area": "Mobile App",
|
|
162
|
+
"competitor_gap": "Competitor X has stable mobile app",
|
|
163
|
+
"willingness_to_pay": "Would pay extra for reliable mobile experience",
|
|
164
|
+
"source_timestamp": "2024-01-15T10:30:00Z",
|
|
165
|
+
"created_at": "2024-01-15T10:35:00Z"
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### search_insights
|
|
66
172
|
Advanced full-text search across customer insights with relevance ranking and comprehensive filtering.
|
|
67
173
|
|
|
68
174
|
**Key Features:**
|
|
@@ -74,15 +180,17 @@ Advanced full-text search across customer insights with relevance ranking and co
|
|
|
74
180
|
- **Language agnostic** - works with any language
|
|
75
181
|
|
|
76
182
|
**Parameters:**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
183
|
+
| Parameter | Type | Required | Description |
|
|
184
|
+
|-----------|------|----------|-------------|
|
|
185
|
+
| `query` | string | Yes | Search query text |
|
|
186
|
+
| `fields` | array | No | Specific fields to search in |
|
|
187
|
+
| `category` | string | No | Filter by insight category |
|
|
188
|
+
| `severity` | string | No | Filter by severity level |
|
|
189
|
+
| `date_from` | string | No | Start date filter (YYYY-MM-DD) |
|
|
190
|
+
| `date_to` | string | No | End date filter (YYYY-MM-DD) |
|
|
191
|
+
| `source` | string | No | Filter by data source |
|
|
192
|
+
| `page` | integer | No | Page number (default: 1) |
|
|
193
|
+
| `limit` | integer | No | Items per page (default: 20, max: 100) |
|
|
86
194
|
|
|
87
195
|
**Searchable Fields:**
|
|
88
196
|
- `signal_title` - Insight title
|
|
@@ -94,6 +202,53 @@ Advanced full-text search across customer insights with relevance ranking and co
|
|
|
94
202
|
- `competitor_gap` - Competitive analysis
|
|
95
203
|
- `willingness_to_pay` - Payment willingness info
|
|
96
204
|
|
|
205
|
+
**Response Fields:**
|
|
206
|
+
| Field | Type | Description |
|
|
207
|
+
|-------|------|-------------|
|
|
208
|
+
| `id` | string | Unique insight identifier (UUID) |
|
|
209
|
+
| `signal_title` | string | Title/summary of the insight |
|
|
210
|
+
| `content` | string | Raw feedback content |
|
|
211
|
+
| `category` | string | Insight category |
|
|
212
|
+
| `severity` | string | Severity level |
|
|
213
|
+
| `search_rank` | number | Search relevance score (higher = more relevant) |
|
|
214
|
+
| `summary` | string | AI-generated summary |
|
|
215
|
+
| `outcome_categories` | array | Business impact categories |
|
|
216
|
+
| `is_deal_blocker` | boolean | Whether this blocks deals |
|
|
217
|
+
| `relevance_score` | number | Business relevance score |
|
|
218
|
+
| `customer_name` | string | Customer who provided feedback |
|
|
219
|
+
| `source_name` | string | Integration source name |
|
|
220
|
+
| `source_timestamp` | string | When feedback was received |
|
|
221
|
+
|
|
222
|
+
**Response Example:**
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"insights": [
|
|
226
|
+
{
|
|
227
|
+
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
228
|
+
"signal_title": "Mobile app crashes on startup",
|
|
229
|
+
"content": "The app keeps crashing whenever I try to open it...",
|
|
230
|
+
"category": "Bug",
|
|
231
|
+
"severity": "high",
|
|
232
|
+
"search_rank": 0.92,
|
|
233
|
+
"summary": "Critical mobile stability issue affecting iOS users",
|
|
234
|
+
"outcome_categories": ["Product Quality", "User Experience"],
|
|
235
|
+
"is_deal_blocker": true,
|
|
236
|
+
"relevance_score": 0.85,
|
|
237
|
+
"customer_name": "Acme Corp",
|
|
238
|
+
"source_name": "Intercom",
|
|
239
|
+
"source_timestamp": "2024-01-15T10:30:00Z"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"pagination": {
|
|
243
|
+
"total_count": 23,
|
|
244
|
+
"page": 1,
|
|
245
|
+
"limit": 20,
|
|
246
|
+
"total_pages": 2
|
|
247
|
+
},
|
|
248
|
+
"query": "mobile crash"
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
97
252
|
## Example Usage
|
|
98
253
|
|
|
99
254
|
Once configured, you can ask Claude questions like:
|
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ const server = new Server(
|
|
|
32
32
|
const tools = [
|
|
33
33
|
{
|
|
34
34
|
name: 'list_insights',
|
|
35
|
-
description: 'Retrieve
|
|
35
|
+
description: 'Retrieve product insights with optional filtering, sorting, and pagination',
|
|
36
36
|
inputSchema: {
|
|
37
37
|
type: 'object',
|
|
38
38
|
properties: {
|
|
@@ -42,10 +42,38 @@ const tools = [
|
|
|
42
42
|
format: 'date'
|
|
43
43
|
},
|
|
44
44
|
date_to: {
|
|
45
|
-
type: 'string',
|
|
45
|
+
type: 'string',
|
|
46
46
|
description: 'End date for insights (YYYY-MM-DD)',
|
|
47
47
|
format: 'date'
|
|
48
48
|
},
|
|
49
|
+
severity: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: ['critical', 'high', 'medium', 'low', 'all'],
|
|
52
|
+
description: 'Filter by severity level (default: all)'
|
|
53
|
+
},
|
|
54
|
+
status: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
enum: ['open', 'closed', 'all'],
|
|
57
|
+
description: 'Filter by insight status (default: all)'
|
|
58
|
+
},
|
|
59
|
+
source_id: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Filter by integration source UUID'
|
|
62
|
+
},
|
|
63
|
+
tag: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Filter by tag (letters, numbers, underscores, hyphens only)'
|
|
66
|
+
},
|
|
67
|
+
sort_by: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
enum: ['timestamp', 'severity', 'status'],
|
|
70
|
+
description: 'Field to sort by (default: timestamp)'
|
|
71
|
+
},
|
|
72
|
+
sort_order: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
enum: ['asc', 'desc'],
|
|
75
|
+
description: 'Sort direction (default: desc)'
|
|
76
|
+
},
|
|
49
77
|
page: {
|
|
50
78
|
type: 'integer',
|
|
51
79
|
description: 'Page number (default: 1)',
|
|
@@ -228,4 +256,4 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
228
256
|
const transport = new StdioServerTransport();
|
|
229
257
|
server.connect(transport);
|
|
230
258
|
|
|
231
|
-
console.error('ClosedLoop MCP
|
|
259
|
+
console.error('ClosedLoop AI MCP Client started');
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@closedloop-ai/mcp-client",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "ClosedLoop MCP
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "ClosedLoop AI MCP Client for AI assistant integration with advanced search capabilities",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"closedloop-mcp": "./index.js"
|
|
8
8
|
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/closed-loop-ai/mcp-client.git"
|
|
12
|
+
},
|
|
9
13
|
"scripts": {
|
|
10
14
|
"start": "node index.js"
|
|
11
15
|
},
|
|
12
16
|
"dependencies": {
|
|
13
|
-
"@modelcontextprotocol/sdk": "^
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
14
18
|
"axios": "^1.6.0"
|
|
15
19
|
},
|
|
16
20
|
"engines": {
|
|
@@ -25,6 +29,6 @@
|
|
|
25
29
|
"search",
|
|
26
30
|
"full-text-search"
|
|
27
31
|
],
|
|
28
|
-
"author": "ClosedLoop",
|
|
32
|
+
"author": "ClosedLoop AI",
|
|
29
33
|
"license": "MIT"
|
|
30
34
|
}
|