@closedloop-ai/mcp-client 1.1.0 → 1.1.2
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 +51 -4
- package/index.js +18 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# ClosedLoop MCP Server
|
|
2
2
|
|
|
3
|
-
A lightweight Model Context Protocol (MCP) server that provides AI clients with access to ClosedLoop customer feedback data.
|
|
3
|
+
A lightweight Model Context Protocol (MCP) server that provides AI clients with access to ClosedLoop customer feedback data and advanced search capabilities.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **MCP Protocol Support**: Full MCP protocol implementation for AI client integration
|
|
8
8
|
- **API Key Authentication**: Secure team-based API key authentication
|
|
9
9
|
- **Team Isolation**: All data access is scoped to the team that owns the API key
|
|
10
|
-
- **
|
|
10
|
+
- **Advanced Search**: Full-text search with relevance ranking across 8+ insight fields
|
|
11
|
+
- **Three Core Tools**:
|
|
11
12
|
- `list_insights`: Get customer insights with date range and pagination
|
|
12
13
|
- `get_insight_detail`: Get detailed information about specific insights
|
|
14
|
+
- `search_insights`: **NEW** Advanced full-text search with filtering and relevance ranking
|
|
13
15
|
|
|
14
16
|
## Installation
|
|
15
17
|
|
|
@@ -60,14 +62,59 @@ Get detailed information about a specific insight item.
|
|
|
60
62
|
**Parameters:**
|
|
61
63
|
- `insight_id` (required): UUID of the insight item
|
|
62
64
|
|
|
65
|
+
### search_insights ⭐ NEW
|
|
66
|
+
Advanced full-text search across customer insights with relevance ranking and comprehensive filtering.
|
|
67
|
+
|
|
68
|
+
**Key Features:**
|
|
69
|
+
- **Full-text search** across 8+ insight fields
|
|
70
|
+
- **Relevance ranking** - most relevant results appear first
|
|
71
|
+
- **Phrase search** and fuzzy matching
|
|
72
|
+
- **Field-specific search** - search specific fields or all fields
|
|
73
|
+
- **Advanced filtering** - category, severity, date range, source
|
|
74
|
+
- **Language agnostic** - works with any language
|
|
75
|
+
|
|
76
|
+
**Parameters:**
|
|
77
|
+
- `query` (required): Search query text
|
|
78
|
+
- `fields` (optional): Specific fields to search in
|
|
79
|
+
- `category` (optional): Filter by insight category
|
|
80
|
+
- `severity` (optional): Filter by severity level
|
|
81
|
+
- `date_from` (optional): Start date filter
|
|
82
|
+
- `date_to` (optional): End date filter
|
|
83
|
+
- `source` (optional): Filter by data source
|
|
84
|
+
- `page` (optional): Page number (default: 1)
|
|
85
|
+
- `limit` (optional): Items per page (default: 20, max: 100)
|
|
86
|
+
|
|
87
|
+
**Searchable Fields:**
|
|
88
|
+
- `signal_title` - Insight title
|
|
89
|
+
- `content` - Raw feedback content
|
|
90
|
+
- `pain_point` - Customer pain points
|
|
91
|
+
- `workaround` - Customer workarounds
|
|
92
|
+
- `use_case` - Use case descriptions
|
|
93
|
+
- `feature_area` - Feature categorization
|
|
94
|
+
- `competitor_gap` - Competitive analysis
|
|
95
|
+
- `willingness_to_pay` - Payment willingness info
|
|
96
|
+
|
|
63
97
|
## Example Usage
|
|
64
98
|
|
|
65
99
|
Once configured, you can ask Claude questions like:
|
|
66
100
|
|
|
101
|
+
### Basic Insights
|
|
67
102
|
- "Show me all negative insights from last week"
|
|
68
103
|
- "What are the top customer insights this month?"
|
|
69
|
-
|
|
70
|
-
|
|
104
|
+
|
|
105
|
+
### Advanced Search
|
|
106
|
+
- "Search for mobile app performance issues"
|
|
107
|
+
- "Find insights about slow loading times in the Performance Issue category"
|
|
108
|
+
- "Search for pricing concerns in pain points and willingness to pay fields"
|
|
109
|
+
- "Find all high severity bugs from this month"
|
|
110
|
+
- "Search for integration problems with Typeform"
|
|
111
|
+
|
|
112
|
+
### Search Examples
|
|
113
|
+
- **Phrase search**: "Find insights about 'mobile app startup'"
|
|
114
|
+
- **Field-specific**: "Search pain points for 'frustrating experience'"
|
|
115
|
+
- **Category filter**: "Find all Feature Request insights about 'real-time collaboration'"
|
|
116
|
+
- **Severity filter**: "Search for critical issues with 'security'"
|
|
117
|
+
- **Date range**: "Find performance issues from January 2024"
|
|
71
118
|
|
|
72
119
|
## License
|
|
73
120
|
|
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ if (!CLOSEDLOOP_API_KEY) {
|
|
|
18
18
|
const server = new Server(
|
|
19
19
|
{
|
|
20
20
|
name: 'closedloop-mcp-server',
|
|
21
|
-
version: '1.1.
|
|
21
|
+
version: '1.1.2',
|
|
22
22
|
description: 'Provides access to ClosedLoop AI product feedback data and insights with advanced search capabilities.',
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -178,7 +178,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
178
178
|
if (!args.query) {
|
|
179
179
|
throw new Error('query is required');
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
// Use MCP protocol for search_insights
|
|
182
|
+
response = await axios.post(CLOSEDLOOP_SERVER_URL, {
|
|
183
|
+
jsonrpc: '2.0',
|
|
184
|
+
id: 1,
|
|
185
|
+
method: 'tools/call',
|
|
186
|
+
params: {
|
|
187
|
+
name: 'search_insights',
|
|
188
|
+
arguments: args
|
|
189
|
+
}
|
|
190
|
+
}, {
|
|
182
191
|
headers
|
|
183
192
|
});
|
|
184
193
|
break;
|
|
@@ -187,11 +196,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
187
196
|
throw new Error(`Unknown tool: ${name}`);
|
|
188
197
|
}
|
|
189
198
|
|
|
199
|
+
// Handle MCP protocol response for search_insights
|
|
200
|
+
let responseData = response.data;
|
|
201
|
+
if (name === 'search_insights' && responseData.result) {
|
|
202
|
+
responseData = responseData.result;
|
|
203
|
+
}
|
|
204
|
+
|
|
190
205
|
return {
|
|
191
206
|
content: [
|
|
192
207
|
{
|
|
193
208
|
type: 'text',
|
|
194
|
-
text: JSON.stringify(
|
|
209
|
+
text: JSON.stringify(responseData, null, 2)
|
|
195
210
|
}
|
|
196
211
|
]
|
|
197
212
|
};
|