@customer-support-success/pylon-mcp-server 1.5.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/.env.example +5 -0
- package/.eslintrc.cjs +29 -0
- package/.prettierrc.json +6 -0
- package/CHANGELOG.md +137 -0
- package/CLAUDE.md +187 -0
- package/GCP_SETUP.md +174 -0
- package/LICENSE +21 -0
- package/README.md +331 -0
- package/SECURITY_AUDIT_REPORT.md +270 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-final.json +2 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +116 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/pylon-client.ts.html +1093 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +463 -0
- package/dist/index.js.map +1 -0
- package/dist/pylon-client.d.ts +126 -0
- package/dist/pylon-client.d.ts.map +1 -0
- package/dist/pylon-client.js +177 -0
- package/dist/pylon-client.js.map +1 -0
- package/package.json +60 -0
- package/smithery.yaml +17 -0
- package/vitest.config.ts +13 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
export class PylonClient {
|
|
3
|
+
client;
|
|
4
|
+
constructor(config) {
|
|
5
|
+
const baseUrl = config.baseUrl || process.env.PYLON_BASE_URL || 'https://api.usepylon.com';
|
|
6
|
+
this.client = axios.create({
|
|
7
|
+
baseURL: baseUrl,
|
|
8
|
+
headers: {
|
|
9
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
10
|
+
'Content-Type': 'application/json',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
async getMe() {
|
|
15
|
+
const response = await this.client.get('/me');
|
|
16
|
+
return response.data;
|
|
17
|
+
}
|
|
18
|
+
async getContacts(params) {
|
|
19
|
+
const response = await this.client.get('/contacts', { params });
|
|
20
|
+
return response.data;
|
|
21
|
+
}
|
|
22
|
+
async createContact(contact) {
|
|
23
|
+
const response = await this.client.post('/contacts', contact);
|
|
24
|
+
return response.data;
|
|
25
|
+
}
|
|
26
|
+
async getIssues(params) {
|
|
27
|
+
const response = await this.client.get('/issues', { params });
|
|
28
|
+
return response.data;
|
|
29
|
+
}
|
|
30
|
+
async createIssue(issue) {
|
|
31
|
+
const response = await this.client.post('/issues', issue);
|
|
32
|
+
return response.data;
|
|
33
|
+
}
|
|
34
|
+
async getKnowledgeBases() {
|
|
35
|
+
const response = await this.client.get('/knowledge-bases');
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
async getKnowledgeBaseArticles(knowledgeBaseId) {
|
|
39
|
+
const response = await this.client.get(`/knowledge-bases/${knowledgeBaseId}/articles`);
|
|
40
|
+
return response.data;
|
|
41
|
+
}
|
|
42
|
+
async createKnowledgeBaseArticle(knowledgeBaseId, article) {
|
|
43
|
+
const response = await this.client.post(`/knowledge-bases/${knowledgeBaseId}/articles`, article);
|
|
44
|
+
return response.data;
|
|
45
|
+
}
|
|
46
|
+
// Teams API
|
|
47
|
+
async getTeams() {
|
|
48
|
+
const response = await this.client.get('/teams');
|
|
49
|
+
return response.data;
|
|
50
|
+
}
|
|
51
|
+
async getTeam(teamId) {
|
|
52
|
+
const response = await this.client.get(`/teams/${teamId}`);
|
|
53
|
+
return response.data;
|
|
54
|
+
}
|
|
55
|
+
async createTeam(team) {
|
|
56
|
+
const response = await this.client.post('/teams', team);
|
|
57
|
+
return response.data;
|
|
58
|
+
}
|
|
59
|
+
// Accounts API
|
|
60
|
+
async getAccounts() {
|
|
61
|
+
const response = await this.client.get('/accounts');
|
|
62
|
+
return response.data;
|
|
63
|
+
}
|
|
64
|
+
async getAccount(accountId) {
|
|
65
|
+
const response = await this.client.get(`/accounts/${accountId}`);
|
|
66
|
+
return response.data;
|
|
67
|
+
}
|
|
68
|
+
// Users API (search)
|
|
69
|
+
async searchUsers(query) {
|
|
70
|
+
const response = await this.client.post('/users/search', { query });
|
|
71
|
+
return response.data;
|
|
72
|
+
}
|
|
73
|
+
async getUsers() {
|
|
74
|
+
const response = await this.client.get('/users');
|
|
75
|
+
return response.data;
|
|
76
|
+
}
|
|
77
|
+
// Contacts API (search)
|
|
78
|
+
async searchContacts(query) {
|
|
79
|
+
const response = await this.client.post('/contacts/search', {
|
|
80
|
+
query,
|
|
81
|
+
});
|
|
82
|
+
return response.data;
|
|
83
|
+
}
|
|
84
|
+
// Issues API (search and additional operations)
|
|
85
|
+
async searchIssues(query, filters) {
|
|
86
|
+
const response = await this.client.post('/issues/search', {
|
|
87
|
+
query,
|
|
88
|
+
...filters,
|
|
89
|
+
});
|
|
90
|
+
return response.data;
|
|
91
|
+
}
|
|
92
|
+
async getIssue(issueId) {
|
|
93
|
+
const response = await this.client.get(`/issues/${issueId}`);
|
|
94
|
+
return response.data;
|
|
95
|
+
}
|
|
96
|
+
async updateIssue(issueId, updates) {
|
|
97
|
+
const response = await this.client.patch(`/issues/${issueId}`, updates);
|
|
98
|
+
return response.data;
|
|
99
|
+
}
|
|
100
|
+
async snoozeIssue(issueId, until) {
|
|
101
|
+
await this.client.post(`/issues/${issueId}/snooze`, { until });
|
|
102
|
+
}
|
|
103
|
+
// Messages API
|
|
104
|
+
async getIssueMessages(issueId) {
|
|
105
|
+
const response = await this.client.get(`/issues/${issueId}/messages`);
|
|
106
|
+
return response.data;
|
|
107
|
+
}
|
|
108
|
+
async createIssueMessage(issueId, content) {
|
|
109
|
+
const response = await this.client.post(`/issues/${issueId}/messages`, { content });
|
|
110
|
+
return response.data;
|
|
111
|
+
}
|
|
112
|
+
// Combined method to get issue with all messages
|
|
113
|
+
async getIssueWithMessages(issueId) {
|
|
114
|
+
const [issue, messages] = await Promise.all([
|
|
115
|
+
this.getIssue(issueId),
|
|
116
|
+
this.getIssueMessages(issueId),
|
|
117
|
+
]);
|
|
118
|
+
return { issue, messages };
|
|
119
|
+
}
|
|
120
|
+
// Tags API
|
|
121
|
+
async getTags() {
|
|
122
|
+
const response = await this.client.get('/tags');
|
|
123
|
+
return response.data;
|
|
124
|
+
}
|
|
125
|
+
async createTag(tag) {
|
|
126
|
+
const response = await this.client.post('/tags', tag);
|
|
127
|
+
return response.data;
|
|
128
|
+
}
|
|
129
|
+
// Ticket Forms API
|
|
130
|
+
async getTicketForms() {
|
|
131
|
+
const response = await this.client.get('/ticket-forms');
|
|
132
|
+
return response.data;
|
|
133
|
+
}
|
|
134
|
+
async createTicketForm(form) {
|
|
135
|
+
const response = await this.client.post('/ticket-forms', form);
|
|
136
|
+
return response.data;
|
|
137
|
+
}
|
|
138
|
+
// Webhooks API
|
|
139
|
+
async getWebhooks() {
|
|
140
|
+
const response = await this.client.get('/webhooks');
|
|
141
|
+
return response.data;
|
|
142
|
+
}
|
|
143
|
+
async createWebhook(webhook) {
|
|
144
|
+
const response = await this.client.post('/webhooks', webhook);
|
|
145
|
+
return response.data;
|
|
146
|
+
}
|
|
147
|
+
async deleteWebhook(webhookId) {
|
|
148
|
+
await this.client.delete(`/webhooks/${webhookId}`);
|
|
149
|
+
}
|
|
150
|
+
// Attachments API
|
|
151
|
+
async getAttachment(attachmentId) {
|
|
152
|
+
const response = await this.client.get(`/attachments/${attachmentId}`);
|
|
153
|
+
return response.data;
|
|
154
|
+
}
|
|
155
|
+
async createAttachment(file, description) {
|
|
156
|
+
const formData = new FormData();
|
|
157
|
+
formData.append('file', file);
|
|
158
|
+
if (description) {
|
|
159
|
+
formData.append('description', description);
|
|
160
|
+
}
|
|
161
|
+
const response = await this.client.post('/attachments', formData, {
|
|
162
|
+
headers: {
|
|
163
|
+
'Content-Type': 'multipart/form-data',
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
return response.data.data;
|
|
167
|
+
}
|
|
168
|
+
async createAttachmentFromUrl(fileUrl, description) {
|
|
169
|
+
const payload = { file_url: fileUrl };
|
|
170
|
+
if (description) {
|
|
171
|
+
payload.description = description;
|
|
172
|
+
}
|
|
173
|
+
const response = await this.client.post('/attachments', payload);
|
|
174
|
+
return response.data.data;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=pylon-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pylon-client.js","sourceRoot":"","sources":["../src/pylon-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AA6F5D,MAAM,OAAO,WAAW;IACd,MAAM,CAAgB;IAE9B,YAAY,MAAmB;QAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,0BAA0B,CAAC;QAE3F,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,CAAC,QAAQ,EAAE;gBAC1C,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,QAAQ,GAA6B,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAA4C;QAC5D,MAAM,QAAQ,GAAkC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAiC;QACnD,MAAM,QAAQ,GAAgC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC3F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC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B,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@customer-support-success/pylon-mcp-server",
|
|
3
|
+
"version": "1.5.2",
|
|
4
|
+
"description": "MCP server for Pylon API integration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"pylon-mcp-server": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/mgmonteleone/pylon-mcp.git"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"registry": "https://registry.npmjs.org/",
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc && chmod +x dist/index.js",
|
|
20
|
+
"dev": "tsx src/index.ts",
|
|
21
|
+
"start": "node dist/index.js",
|
|
22
|
+
"prepare": "npm run build",
|
|
23
|
+
"lint": "eslint . --ext .ts",
|
|
24
|
+
"format": "prettier --check .",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"coverage": "vitest run --coverage",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:ui": "vitest --ui",
|
|
29
|
+
"test:coverage": "vitest run --coverage"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"mcp",
|
|
33
|
+
"pylon",
|
|
34
|
+
"api",
|
|
35
|
+
"integration"
|
|
36
|
+
],
|
|
37
|
+
"author": "",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
41
|
+
"axios": "^1.6.0",
|
|
42
|
+
"zod": "^4.2.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^20.19.25",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
47
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
48
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
49
|
+
"@vitest/ui": "^4.0.15",
|
|
50
|
+
"eslint": "^8.57.1",
|
|
51
|
+
"eslint-config-prettier": "^10.1.8",
|
|
52
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
53
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
54
|
+
"nock": "^13.5.4",
|
|
55
|
+
"prettier": "^3.7.4",
|
|
56
|
+
"tsx": "^4.0.0",
|
|
57
|
+
"typescript": "^5.0.0",
|
|
58
|
+
"vitest": "^4.0.15"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/smithery.yaml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
|
|
2
|
+
|
|
3
|
+
startCommand:
|
|
4
|
+
type: stdio
|
|
5
|
+
configSchema:
|
|
6
|
+
# JSON Schema defining the configuration options for the MCP.
|
|
7
|
+
type: object
|
|
8
|
+
required:
|
|
9
|
+
- pylonApiToken
|
|
10
|
+
properties:
|
|
11
|
+
pylonApiToken:
|
|
12
|
+
type: string
|
|
13
|
+
description: The API key for the Pylon MCP server.
|
|
14
|
+
secret: true
|
|
15
|
+
required: true
|
|
16
|
+
commandFunction: |-
|
|
17
|
+
config => ({ command: 'node', args: ['dist/index.js'], env: { PYLON_API_TOKEN: config.pylonApiToken } })
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
globals: true,
|
|
6
|
+
environment: 'node',
|
|
7
|
+
coverage: {
|
|
8
|
+
provider: 'v8',
|
|
9
|
+
reporter: ['text', 'json', 'html', 'lcov'],
|
|
10
|
+
exclude: ['node_modules/', 'dist/', '**/*.test.ts', '**/*.spec.ts', 'vitest.config.ts'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|