@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/README.md ADDED
@@ -0,0 +1,331 @@
1
+ # Pylon MCP Server
2
+
3
+ An MCP (Model Context Protocol) server for integrating with the Pylon API.
4
+
5
+ ## Features
6
+
7
+ This MCP server provides tools to interact with Pylon's API:
8
+
9
+ - **User Management**: Get current user information
10
+ - **Contacts**: List, search, and create contacts
11
+ - **Issues**: List, filter, and create issues
12
+ - **Knowledge Base**: Access and create knowledge base articles
13
+
14
+ ## Setup
15
+
16
+ ### Environment Variables
17
+
18
+ Set the following environment variable:
19
+
20
+ - `PYLON_API_TOKEN`: Your Pylon API token (required)
21
+
22
+ ### Installation
23
+
24
+ #### Option 1: Using npx from GCP Artifact Registry (Recommended)
25
+
26
+ This package is published to GCP Artifact Registry. You can run it directly with npx:
27
+
28
+ ```bash
29
+ # Set up authentication (one-time setup)
30
+ gcloud auth application-default login
31
+
32
+ # Run with npx
33
+ npx --registry=https://us-central1-npm.pkg.dev/customer-support-success/npm-packages/ @customer-support-success/pylon-mcp-server
34
+ ```
35
+
36
+ Or install globally:
37
+
38
+ ```bash
39
+ npm install -g --registry=https://us-central1-npm.pkg.dev/customer-support-success/npm-packages/ @customer-support-success/pylon-mcp-server
40
+ ```
41
+
42
+ #### Option 2: Local Development
43
+
44
+ ```bash
45
+ npm install
46
+ npm run build
47
+ ```
48
+
49
+ #### Publishing Updates (for maintainers)
50
+
51
+ Preferred: tag and let CI publish
52
+
53
+ ```bash
54
+ # Update version in package.json, then tag
55
+ git tag vX.Y.Z && git push origin vX.Y.Z
56
+ ```
57
+
58
+ CI (`release.yml`) will build/test and publish to Artifact Registry using the GCP service account (`GCP_CREDENTIALS`) and a short-lived access token.
59
+
60
+ Manual (maintainers only):
61
+
62
+ ```bash
63
+ npm run build
64
+ export ARTIFACT_REGISTRY_TOKEN=$(gcloud auth application-default print-access-token)
65
+ npm publish --registry=https://us-central1-npm.pkg.dev/customer-support-success/npm-packages/
66
+ ```
67
+
68
+ ### Development
69
+
70
+ ```bash
71
+ npm run dev
72
+ ```
73
+
74
+ ### Testing
75
+
76
+ This project includes comprehensive unit tests for all functionality:
77
+
78
+ ```bash
79
+ # Run tests once
80
+ npm test
81
+
82
+ # Run tests in watch mode
83
+ npm run test:watch
84
+
85
+ # Run tests with UI
86
+ npm run test:ui
87
+
88
+ # Run tests with coverage report
89
+ npm run test:coverage
90
+ ```
91
+
92
+ **Test Coverage:**
93
+
94
+ - ✅ Attachment API (get, create from URL, file upload)
95
+ - ✅ User Management (get user, search users)
96
+ - ✅ Issue Management (get, create, update, filter)
97
+ - ✅ Contact Management (get, search, create)
98
+ - ✅ Message Management (get messages with attachments)
99
+ - ✅ Error Handling (404, network errors)
100
+
101
+ ## Available Tools
102
+
103
+ ### User Tools
104
+
105
+ - `pylon_get_me`: Get current user information
106
+
107
+ ### Contact Tools
108
+
109
+ - `pylon_get_contacts`: List contacts with optional search and limit
110
+ - `pylon_create_contact`: Create a new contact
111
+
112
+ ### Issue Tools
113
+
114
+ - `pylon_get_issues`: List issues with optional filtering by assignee, status, and limit
115
+ - `pylon_create_issue`: Create a new issue
116
+ - `pylon_get_issue`: Get details of a specific issue
117
+ - `pylon_get_issue_with_messages`: **NEW** - Get a complete issue with all messages in one call
118
+ - `pylon_get_issue_messages`: Get conversation history for an issue
119
+ - `pylon_create_issue_message`: Add a message/reply to an issue
120
+ - `pylon_update_issue`: Update issue status, priority, assignee, etc.
121
+ - `pylon_snooze_issue`: Temporarily hide an issue until a future date
122
+
123
+ ### Knowledge Base Tools
124
+
125
+ - `pylon_get_knowledge_bases`: List all knowledge bases
126
+ - `pylon_get_knowledge_base_articles`: Get articles from a specific knowledge base
127
+ - `pylon_create_knowledge_base_article`: Create a new article in a knowledge base
128
+
129
+ ### Attachment Tools
130
+
131
+ - `pylon_get_attachment`: Get details of a specific attachment
132
+ - `pylon_create_attachment_from_url`: Create an attachment from a URL
133
+
134
+ ## Usage Examples
135
+
136
+ ### Running with Augment Code
137
+
138
+ Augment Code supports MCP servers through its Easy MCP feature in VS Code and JetBrains IDEs.
139
+
140
+ #### Setup in Augment Code (VS Code or JetBrains)
141
+
142
+ 1. **Open Augment Settings**:
143
+ - In VS Code: Open the Augment Code extension settings
144
+ - In JetBrains: Navigate to Augment settings
145
+
146
+ 2. **Navigate to Easy MCP**:
147
+ - Find the "Easy MCP" pane in the settings
148
+ - Click the "+" button to add a new MCP server
149
+
150
+ 3. **Configure the Server**:
151
+
152
+ **Option A: Using npx from GCP Artifact Registry (Recommended)**
153
+
154
+ Add this configuration:
155
+
156
+ ```json
157
+ {
158
+ "pylon": {
159
+ "command": "npx",
160
+ "args": [
161
+ "--registry=https://us-central1-npm.pkg.dev/customer-support-success/npm-packages/",
162
+ "@customer-support-success/pylon-mcp-server"
163
+ ],
164
+ "env": {
165
+ "PYLON_API_TOKEN": "your_pylon_api_token_here"
166
+ }
167
+ }
168
+ }
169
+ ```
170
+
171
+ **Option B: Using local installation**
172
+
173
+ If you've cloned this repository locally:
174
+
175
+ ```json
176
+ {
177
+ "pylon": {
178
+ "command": "node",
179
+ "args": ["/absolute/path/to/pylon-mcp-server/dist/index.js"],
180
+ "env": {
181
+ "PYLON_API_TOKEN": "your_pylon_api_token_here"
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ 4. **Get Your Pylon API Token**:
188
+ - Log into your Pylon dashboard
189
+ - Navigate to Settings → API
190
+ - Generate or copy your API token
191
+ - Replace `your_pylon_api_token_here` with your actual token
192
+
193
+ 5. **Test the Integration**:
194
+
195
+ Once configured, you can ask Augment to use Pylon tools:
196
+
197
+ ```text
198
+ "Check my Pylon user info"
199
+ "Show me recent support issues"
200
+ "Search for a contact by email"
201
+ "Create a new support ticket"
202
+ ```
203
+
204
+ ### Running Locally with Claude Desktop
205
+
206
+ 1. **Setup Environment**:
207
+
208
+ ```bash
209
+ # Clone and install
210
+ git clone <your-repo-url>
211
+ cd pylon-mcp-server
212
+ npm install
213
+ npm run build
214
+
215
+ # Set up environment variables
216
+ cp .env.example .env
217
+ # Edit .env and add your PYLON_API_TOKEN
218
+ ```
219
+
220
+ 2. **Configure Claude Desktop**:
221
+
222
+ Add this to your Claude Desktop MCP settings (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
223
+
224
+ **Option A: Using npx from GCP Artifact Registry (Recommended)**
225
+
226
+ ```json
227
+ {
228
+ "mcpServers": {
229
+ "pylon": {
230
+ "command": "npx",
231
+ "args": [
232
+ "--registry=https://us-central1-npm.pkg.dev/customer-support-success/npm-packages/",
233
+ "@customer-support-success/pylon-mcp-server"
234
+ ],
235
+ "env": {
236
+ "PYLON_API_TOKEN": "your_pylon_api_token_here"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ ```
242
+
243
+ **Option B: Using local installation**
244
+
245
+ ```json
246
+ {
247
+ "mcpServers": {
248
+ "pylon": {
249
+ "command": "node",
250
+ "args": ["/path/to/pylon-mcp-server/dist/index.js"],
251
+ "env": {
252
+ "PYLON_API_TOKEN": "your_pylon_api_token_here"
253
+ }
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ 3. **Test the Connection**:
260
+
261
+ Restart Claude Desktop and try these commands in a conversation:
262
+
263
+ ```text
264
+ Use the pylon_get_me tool to check my Pylon user info
265
+
266
+ Use pylon_get_issues to show recent support tickets
267
+
268
+ Search for contacts with pylon_search_contacts using "customer@example.com"
269
+ ```
270
+
271
+ ### Running via Smithery
272
+
273
+ 1. **Deploy to Smithery**:
274
+ - Upload your project to Smithery
275
+ - Smithery will automatically use the `smithery.yaml` configuration
276
+ - Set the `PYLON_API_TOKEN` environment variable in Smithery's deployment settings
277
+
278
+ 2. **Configure in Claude Desktop**:
279
+
280
+ ```json
281
+ {
282
+ "mcpServers": {
283
+ "pylon": {
284
+ "command": "npx",
285
+ "args": ["-y", "@smithery/pylon-mcp-server"]
286
+ }
287
+ }
288
+ }
289
+ ```
290
+
291
+ ### Example Tool Usage
292
+
293
+ Once connected, you can use any of the 26+ available tools:
294
+
295
+ ```text
296
+ # User Management
297
+ "Get my user info" → uses pylon_get_me
298
+ "Search for users named John" → uses pylon_search_users
299
+
300
+ # Issue Management
301
+ "Show all open issues" → uses pylon_get_issues
302
+ "Create a new bug report" → uses pylon_create_issue
303
+ "Get issue #123 with all messages" → uses pylon_get_issue_with_messages
304
+ "Add a comment to issue #123" → uses pylon_create_issue_message
305
+ "Update issue status to resolved" → uses pylon_update_issue
306
+
307
+ # Attachments
308
+ "Get attachment details for att_123" → uses pylon_get_attachment (NEW!)
309
+ "Create attachment from URL" → uses pylon_create_attachment_from_url (NEW!)
310
+
311
+ # Knowledge Base
312
+ "List all knowledge bases" → uses pylon_get_knowledge_bases
313
+ "Create a new help article" → uses pylon_create_knowledge_base_article
314
+
315
+ # Team & Account Management
316
+ "Show all teams" → uses pylon_get_teams
317
+ "Get account details" → uses pylon_get_accounts
318
+ ```
319
+
320
+ ## Deployment to Smithery
321
+
322
+ This server is designed to be deployed to Smithery using the included `smithery.yaml` configuration. The deployment will automatically:
323
+
324
+ - Install dependencies with `npm install && npm run build`
325
+ - Configure the Node.js runtime with proper entrypoint
326
+ - Expose all 23 Pylon API tools
327
+ - Require the `PYLON_API_TOKEN` environment variable
328
+
329
+ ## API Reference
330
+
331
+ For more information about the Pylon API, visit the [API reference](https://docs.usepylon.com/pylon-docs/developer/api/api-reference).
@@ -0,0 +1,270 @@
1
+ # Security & Compliance Audit Report
2
+
3
+ ## Pylon MCP Server
4
+
5
+ **Date:** December 4, 2025
6
+ **Auditor:** Automated Security Analysis
7
+ **Scope:** Pre-publication security, PII, and SOC-2 compliance review
8
+ **Status:** ✅ **PASSED - SAFE FOR PUBLIC RELEASE**
9
+
10
+ ---
11
+
12
+ ## Executive Summary
13
+
14
+ The Pylon MCP Server codebase has been thoroughly analyzed for security vulnerabilities, personally identifiable information (PII), and SOC-2 compliance concerns. **The repository is safe to make public** with no critical issues found.
15
+
16
+ ### Key Findings:
17
+
18
+ - ✅ **No hardcoded secrets or API keys**
19
+ - ✅ **No PII in codebase or documentation**
20
+ - ✅ **Zero npm dependency vulnerabilities**
21
+ - ✅ **Proper secret management via environment variables**
22
+ - ✅ **Comprehensive .gitignore protection**
23
+ - ⚠️ **Minor:** .npmrc configuration warning (non-blocking)
24
+
25
+ ---
26
+
27
+ ## Detailed Analysis
28
+
29
+ ### 1. Secrets & Credentials Scan ✅ PASS
30
+
31
+ **Scope:** All source files, configuration files, and documentation
32
+
33
+ **Findings:**
34
+
35
+ - ✅ No hardcoded API keys, tokens, or passwords found
36
+ - ✅ All sensitive values use environment variables (`PYLON_API_TOKEN`)
37
+ - ✅ `.env.example` contains only placeholder values
38
+ - ✅ `.npmrc` uses environment variable substitution (`${ARTIFACT_REGISTRY_TOKEN}`) for local/manual publishing; CI uses short-lived access tokens from `GCP_CREDENTIALS`
39
+ - ✅ No secrets in git history
40
+
41
+ **Files Reviewed:**
42
+
43
+ - `src/index.ts` - Uses `process.env.PYLON_API_TOKEN`
44
+ - `src/pylon-client.ts` - Accepts token via constructor parameter
45
+ - `.env.example` - Contains only example placeholder
46
+ - `.npmrc` - Uses `${ARTIFACT_REGISTRY_TOKEN}` variable
47
+ - All configuration files
48
+
49
+ **Recommendation:** ✅ No action required
50
+
51
+ ---
52
+
53
+ ### 2. PII (Personally Identifiable Information) Scan ✅ PASS
54
+
55
+ **Scope:** Documentation, comments, example data, and code
56
+
57
+ **Findings:**
58
+
59
+ - ✅ No real email addresses (only examples: `customer@example.com`, `your-email@example.com`)
60
+ - ✅ No phone numbers
61
+ - ✅ No physical addresses
62
+ - ✅ No names of real individuals
63
+ - ✅ All examples use generic placeholders
64
+
65
+ **Files Reviewed:**
66
+
67
+ - `README.md` - Only example emails found
68
+ - `CLAUDE.md` - No PII
69
+ - `GCP_SETUP.md` - Only placeholder emails
70
+ - `src/` directory - No PII in code or comments
71
+
72
+ **Recommendation:** ✅ No action required
73
+
74
+ ---
75
+
76
+ ### 3. Dependency Vulnerability Scan ✅ PASS
77
+
78
+ **Initial State:**
79
+
80
+ - 9 vulnerabilities found (1 moderate, 4 high, 3 critical)
81
+ - Issues in: `@modelcontextprotocol/sdk`, `axios`, `body-parser`, `form-data`, `js-yaml`, `uglify-js`, `build`
82
+
83
+ **Actions Taken:**
84
+
85
+ - Ran `npm audit fix` - Updated vulnerable packages
86
+ - Removed accidental `build` dependency (source of most vulnerabilities)
87
+
88
+ **Final State:**
89
+
90
+ - ✅ **0 vulnerabilities**
91
+ - All dependencies updated to secure versions
92
+ - 109 packages audited
93
+
94
+ **Current Dependencies:**
95
+
96
+ ```json
97
+ {
98
+ "@modelcontextprotocol/sdk": "^1.0.0", // Updated to latest
99
+ "axios": "^1.6.0" // Updated to latest
100
+ }
101
+ ```
102
+
103
+ **Recommendation:** ✅ No action required. Continue monitoring with `npm audit` regularly.
104
+
105
+ ---
106
+
107
+ ### 4. Secret Management & Access Control ✅ PASS
108
+
109
+ **Environment Variables:**
110
+
111
+ - `PYLON_API_TOKEN` - Required for Pylon API access
112
+ - `GCP_CREDENTIALS` - JSON key for CI to mint access tokens for Artifact Registry
113
+ - `ARTIFACT_REGISTRY_TOKEN` - Local/manual publishing token (derived from `gcloud auth application-default print-access-token`)
114
+
115
+ **Protection Mechanisms:**
116
+
117
+ - ✅ `.gitignore` excludes all `.env*` files (except `.env.example`)
118
+ - ✅ `.npmignore` excludes sensitive development files
119
+ - ✅ No secrets in published npm package
120
+ - ✅ Clear documentation on required environment variables
121
+
122
+ **Recommendation:** ✅ No action required
123
+
124
+ ---
125
+
126
+ ### 5. SOC-2 Compliance Considerations ✅ PASS
127
+
128
+ **Data Handling:**
129
+
130
+ - ✅ No data storage - server acts as API proxy only
131
+ - ✅ No logging of sensitive information
132
+ - ✅ Authentication tokens passed via environment variables
133
+ - ✅ HTTPS-only communication with Pylon API (`https://api.usepylon.com`)
134
+
135
+ **Access Control:**
136
+
137
+ - ✅ API token required for all operations
138
+ - ✅ No default credentials
139
+ - ✅ Clear documentation on authentication requirements
140
+
141
+ **Audit Trail:**
142
+
143
+ - ✅ All API calls go through centralized `PylonClient` class
144
+ - ✅ Error handling doesn't expose sensitive data
145
+ - ✅ No client-side data caching
146
+
147
+ **Recommendation:** ✅ Compliant for public release
148
+
149
+ ---
150
+
151
+ ### 6. Code Quality & Security Best Practices ✅ PASS
152
+
153
+ **TypeScript Usage:**
154
+
155
+ - ✅ Strict type checking enabled
156
+ - ✅ Proper interface definitions
157
+ - ✅ No use of `any` type in critical paths
158
+
159
+ **Error Handling:**
160
+
161
+ - ✅ Try-catch blocks around all API calls
162
+ - ✅ Errors don't expose internal details
163
+ - ✅ Proper error messages for missing configuration
164
+
165
+ **Input Validation:**
166
+
167
+ - ✅ Required parameters validated before API calls
168
+ - ✅ Type safety through TypeScript interfaces
169
+ - ✅ MCP SDK handles input schema validation
170
+
171
+ **Recommendation:** ✅ No action required
172
+
173
+ ---
174
+
175
+ ## Minor Issues & Warnings
176
+
177
+ ### ⚠️ npm Configuration Warning (Non-blocking)
178
+
179
+ - npm may warn about `always-auth` in `.npmrc` in future npm versions; current behavior is unaffected. If npm deprecates it, remove the `always-auth` line.
180
+
181
+ ---
182
+
183
+ ## Files Safe for Public Release
184
+
185
+ ### ✅ Source Code
186
+
187
+ - `src/index.ts`
188
+ - `src/pylon-client.ts`
189
+
190
+ ### ✅ Configuration
191
+
192
+ - `package.json`
193
+ - `tsconfig.json`
194
+ - `.gitignore`
195
+ - `.npmignore`
196
+ - `.env.example`
197
+
198
+ ### ✅ Documentation
199
+
200
+ - `README.md`
201
+ - `CLAUDE.md`
202
+ - `GCP_SETUP.md`
203
+ - `LICENSE`
204
+
205
+ ### ✅ Build Artifacts
206
+
207
+ - `dist/` (generated, excluded from git)
208
+
209
+ ### ⚠️ Consider Excluding (Optional)
210
+
211
+ - `.npmrc` - Contains GCP-specific registry config (consider making it local-only)
212
+ - `publish.sh` - Publishing script (consider making it maintainer-only)
213
+ - `.idea/` - IDE settings (already in .gitignore)
214
+
215
+ ---
216
+
217
+ ## Recommendations for Public Repository
218
+
219
+ ### Before Making Public:
220
+
221
+ 1. ✅ **Remove GCP-specific files** (optional but recommended):
222
+
223
+ ```bash
224
+ git rm --cached .npmrc
225
+ git rm --cached publish.sh
226
+ ```
227
+
228
+ 2. ✅ **Add SECURITY.md** for responsible disclosure
229
+ 3. ✅ **Add CONTRIBUTING.md** for contribution guidelines
230
+ 4. ✅ **Consider adding GitHub Actions** for automated security scanning
231
+
232
+ ### After Making Public:
233
+
234
+ 1. Enable GitHub security features:
235
+ - Dependabot alerts
236
+ - Code scanning
237
+ - Secret scanning
238
+
239
+ 2. Set up automated npm audit in CI/CD
240
+
241
+ 3. Add security policy to README
242
+
243
+ ---
244
+
245
+ ## Conclusion
246
+
247
+ ✅ **APPROVED FOR PUBLIC RELEASE**
248
+
249
+ The Pylon MCP Server repository contains no sensitive information, PII, or security vulnerabilities. All secrets are properly managed through environment variables, and the codebase follows security best practices.
250
+
251
+ **Risk Level:** LOW
252
+ **Confidence:** HIGH
253
+ **Recommendation:** Safe to make repository public immediately
254
+
255
+ ---
256
+
257
+ ## Audit Checklist
258
+
259
+ - [x] Source code scanned for hardcoded secrets
260
+ - [x] Configuration files reviewed
261
+ - [x] Documentation checked for PII
262
+ - [x] Dependencies scanned for vulnerabilities
263
+ - [x] Git history checked for leaked secrets
264
+ - [x] Environment variable usage verified
265
+ - [x] .gitignore coverage confirmed
266
+ - [x] Error handling reviewed
267
+ - [x] API communication security verified
268
+ - [x] SOC-2 compliance considerations addressed
269
+
270
+ **Audit Completed:** December 4, 2025