@get-technology-inc/jamf-docs-mcp-server 0.0.1 → 1.1.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/LICENSE +21 -0
- package/README.md +111 -29
- package/dist/constants.d.ts +263 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +308 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/index.d.ts +13 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +45 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/schemas/index.d.ts +61 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +127 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/services/cache.d.ts +47 -0
- package/dist/services/cache.d.ts.map +1 -0
- package/dist/services/cache.js +165 -0
- package/dist/services/cache.js.map +1 -0
- package/dist/services/metadata.d.ts +78 -0
- package/dist/services/metadata.d.ts.map +1 -0
- package/dist/services/metadata.js +349 -0
- package/dist/services/metadata.js.map +1 -0
- package/dist/services/scraper.d.ts +62 -0
- package/dist/services/scraper.d.ts.map +1 -0
- package/dist/services/scraper.js +544 -0
- package/dist/services/scraper.js.map +1 -0
- package/dist/services/search-suggestions.d.ts +27 -0
- package/dist/services/search-suggestions.d.ts.map +1 -0
- package/dist/services/search-suggestions.js +193 -0
- package/dist/services/search-suggestions.js.map +1 -0
- package/dist/services/tokenizer.d.ts +93 -0
- package/dist/services/tokenizer.d.ts.map +1 -0
- package/dist/services/tokenizer.js +330 -0
- package/dist/services/tokenizer.js.map +1 -0
- package/dist/tools/get-article.d.ts +7 -0
- package/dist/tools/get-article.d.ts.map +1 -0
- package/dist/tools/get-article.js +244 -0
- package/dist/tools/get-article.js.map +1 -0
- package/dist/tools/get-toc.d.ts +7 -0
- package/dist/tools/get-toc.d.ts.map +1 -0
- package/dist/tools/get-toc.js +202 -0
- package/dist/tools/get-toc.js.map +1 -0
- package/dist/tools/list-products.d.ts +7 -0
- package/dist/tools/list-products.d.ts.map +1 -0
- package/dist/tools/list-products.js +150 -0
- package/dist/tools/list-products.js.map +1 -0
- package/dist/tools/search.d.ts +7 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +252 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/types.d.ts +188 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +28 -0
- package/dist/types.js.map +1 -0
- package/package.json +68 -6
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for Jamf Docs MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Note: Jamf documentation has moved from docs.jamf.com to learn.jamf.com
|
|
5
|
+
* The new URL structure is: learn.jamf.com/en-US/bundle/{product}-documentation/page/{page}.html
|
|
6
|
+
*/
|
|
7
|
+
// Environment variable helpers
|
|
8
|
+
function getEnvNumber(key, defaultValue) {
|
|
9
|
+
const value = process.env[key];
|
|
10
|
+
if (value === undefined) {
|
|
11
|
+
return defaultValue;
|
|
12
|
+
}
|
|
13
|
+
const parsed = parseInt(value, 10);
|
|
14
|
+
return isNaN(parsed) ? defaultValue : parsed;
|
|
15
|
+
}
|
|
16
|
+
function getEnvString(key, defaultValue) {
|
|
17
|
+
return process.env[key] ?? defaultValue;
|
|
18
|
+
}
|
|
19
|
+
// Base URLs
|
|
20
|
+
export const DOCS_BASE_URL = 'https://learn.jamf.com';
|
|
21
|
+
export const DOCS_API_URL = 'https://learn-be.jamf.com';
|
|
22
|
+
// Supported products - updated URL patterns for learn.jamf.com
|
|
23
|
+
export const JAMF_PRODUCTS = {
|
|
24
|
+
'jamf-pro': {
|
|
25
|
+
id: 'jamf-pro',
|
|
26
|
+
name: 'Jamf Pro',
|
|
27
|
+
description: 'Apple device management for enterprise',
|
|
28
|
+
urlPattern: 'en-US/bundle/jamf-pro-documentation/page',
|
|
29
|
+
bundleId: 'jamf-pro-documentation',
|
|
30
|
+
searchLabel: 'product-pro', // Label used in Zoomin search API
|
|
31
|
+
latestVersion: 'current',
|
|
32
|
+
versions: ['current'] // learn.jamf.com uses latest version only
|
|
33
|
+
},
|
|
34
|
+
'jamf-school': {
|
|
35
|
+
id: 'jamf-school',
|
|
36
|
+
name: 'Jamf School',
|
|
37
|
+
description: 'Apple device management for education',
|
|
38
|
+
urlPattern: 'en-US/bundle/jamf-school-documentation/page',
|
|
39
|
+
bundleId: 'jamf-school-documentation',
|
|
40
|
+
searchLabel: 'product-school',
|
|
41
|
+
latestVersion: 'current',
|
|
42
|
+
versions: ['current']
|
|
43
|
+
},
|
|
44
|
+
'jamf-connect': {
|
|
45
|
+
id: 'jamf-connect',
|
|
46
|
+
name: 'Jamf Connect',
|
|
47
|
+
description: 'Identity and access management',
|
|
48
|
+
urlPattern: 'en-US/bundle/jamf-connect-documentation/page',
|
|
49
|
+
bundleId: 'jamf-connect-documentation',
|
|
50
|
+
searchLabel: 'product-connect',
|
|
51
|
+
latestVersion: 'current',
|
|
52
|
+
versions: ['current']
|
|
53
|
+
},
|
|
54
|
+
'jamf-protect': {
|
|
55
|
+
id: 'jamf-protect',
|
|
56
|
+
name: 'Jamf Protect',
|
|
57
|
+
description: 'Endpoint security for Apple',
|
|
58
|
+
urlPattern: 'en-US/bundle/jamf-protect-documentation/page',
|
|
59
|
+
bundleId: 'jamf-protect-documentation',
|
|
60
|
+
searchLabel: 'product-protect',
|
|
61
|
+
latestVersion: 'current',
|
|
62
|
+
versions: ['current']
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
// Response format
|
|
66
|
+
export var ResponseFormat;
|
|
67
|
+
(function (ResponseFormat) {
|
|
68
|
+
ResponseFormat["MARKDOWN"] = "markdown";
|
|
69
|
+
ResponseFormat["JSON"] = "json";
|
|
70
|
+
})(ResponseFormat || (ResponseFormat = {}));
|
|
71
|
+
// Output mode (detail level)
|
|
72
|
+
export var OutputMode;
|
|
73
|
+
(function (OutputMode) {
|
|
74
|
+
OutputMode["FULL"] = "full";
|
|
75
|
+
OutputMode["COMPACT"] = "compact";
|
|
76
|
+
})(OutputMode || (OutputMode = {}));
|
|
77
|
+
// Cache settings (in milliseconds) - configurable via environment variables
|
|
78
|
+
export const CACHE_TTL = {
|
|
79
|
+
SEARCH_RESULTS: getEnvNumber('CACHE_TTL_SEARCH', 30 * 60 * 1000), // 30 minutes
|
|
80
|
+
ARTICLE_CONTENT: getEnvNumber('CACHE_TTL_ARTICLE', 24 * 60 * 60 * 1000), // 24 hours
|
|
81
|
+
PRODUCT_LIST: getEnvNumber('CACHE_TTL_PRODUCTS', 7 * 24 * 60 * 60 * 1000), // 7 days
|
|
82
|
+
TOC: getEnvNumber('CACHE_TTL_TOC', 24 * 60 * 60 * 1000) // 24 hours
|
|
83
|
+
};
|
|
84
|
+
// Cache directory - configurable via environment variable
|
|
85
|
+
export const CACHE_DIR = getEnvString('CACHE_DIR', '.cache');
|
|
86
|
+
// Request settings - configurable via environment variables
|
|
87
|
+
export const REQUEST_CONFIG = {
|
|
88
|
+
TIMEOUT: getEnvNumber('REQUEST_TIMEOUT', 15000), // 15 seconds
|
|
89
|
+
MAX_RETRIES: getEnvNumber('MAX_RETRIES', 3),
|
|
90
|
+
RETRY_DELAY: getEnvNumber('RETRY_DELAY', 1000), // 1 second
|
|
91
|
+
RATE_LIMIT_DELAY: getEnvNumber('RATE_LIMIT_DELAY', 500), // 500ms between requests
|
|
92
|
+
USER_AGENT: getEnvString('USER_AGENT', 'JamfDocsMCP/1.0 (https://github.com/GET-Technology-Inc/jamf-docs-mcp-server)')
|
|
93
|
+
};
|
|
94
|
+
// Content limits
|
|
95
|
+
export const CONTENT_LIMITS = {
|
|
96
|
+
MAX_SEARCH_RESULTS: 50,
|
|
97
|
+
DEFAULT_SEARCH_RESULTS: 10,
|
|
98
|
+
MAX_CONTENT_LENGTH: 100000, // 100KB
|
|
99
|
+
MAX_SNIPPET_LENGTH: 500
|
|
100
|
+
};
|
|
101
|
+
// Token configuration (Context7 style)
|
|
102
|
+
export const TOKEN_CONFIG = {
|
|
103
|
+
DEFAULT_MAX_TOKENS: 5000,
|
|
104
|
+
MAX_TOKENS_LIMIT: 20000,
|
|
105
|
+
MIN_TOKENS: 100,
|
|
106
|
+
CHARS_PER_TOKEN: 4, // Estimation ratio
|
|
107
|
+
CODE_CHARS_PER_TOKEN: 3 // Code blocks have higher token density
|
|
108
|
+
};
|
|
109
|
+
// Pagination configuration
|
|
110
|
+
export const PAGINATION_CONFIG = {
|
|
111
|
+
DEFAULT_PAGE: 1,
|
|
112
|
+
DEFAULT_PAGE_SIZE: 10,
|
|
113
|
+
MAX_PAGE: 100
|
|
114
|
+
};
|
|
115
|
+
// Topic categories for filtering (comprehensive list based on actual Jamf documentation)
|
|
116
|
+
export const JAMF_TOPICS = {
|
|
117
|
+
// === Enrollment & Onboarding ===
|
|
118
|
+
'enrollment': {
|
|
119
|
+
name: 'Enrollment & Onboarding',
|
|
120
|
+
keywords: ['enroll', 'dep', 'ade', 'automated device enrollment', 'user enrollment', 'apple configurator', 'onboard', 'prestage', 'enrollment method']
|
|
121
|
+
},
|
|
122
|
+
// === Device Management ===
|
|
123
|
+
'computer-management': {
|
|
124
|
+
name: 'Computer Management',
|
|
125
|
+
keywords: ['computer management', 'computer inventory', 'remote command', 'remote administration', 'mass action', 'unmanag', 'check-in', 'startup script', 'login event']
|
|
126
|
+
},
|
|
127
|
+
'mobile-management': {
|
|
128
|
+
name: 'Mobile Device Management',
|
|
129
|
+
keywords: ['mobile device', 'iphone', 'ipad', 'ios', 'ipados', 'mobile inventory', 'mdm capabilities']
|
|
130
|
+
},
|
|
131
|
+
// === Configuration ===
|
|
132
|
+
'profiles': {
|
|
133
|
+
name: 'Configuration Profiles',
|
|
134
|
+
keywords: ['configuration profile', 'profile', 'payload', 'restriction', 'settings management', 'computer configuration', 'mobile configuration']
|
|
135
|
+
},
|
|
136
|
+
'policies': {
|
|
137
|
+
name: 'Policies',
|
|
138
|
+
keywords: ['policy', 'policies', 'execution frequency', 'user interaction', 'policy management', 'policy payload', 'trigger']
|
|
139
|
+
},
|
|
140
|
+
// === Software & Packages ===
|
|
141
|
+
'packages': {
|
|
142
|
+
name: 'Packages & Deployment',
|
|
143
|
+
keywords: ['package', 'pkg', 'dmg', 'package deployment', 'package management', 'installer']
|
|
144
|
+
},
|
|
145
|
+
'scripts': {
|
|
146
|
+
name: 'Scripts',
|
|
147
|
+
keywords: ['script', 'bash', 'shell', 'login script', 'startup script', 'extension attribute']
|
|
148
|
+
},
|
|
149
|
+
'patch': {
|
|
150
|
+
name: 'Patch Management',
|
|
151
|
+
keywords: ['patch', 'patch management', 'patch policy', 'software update', 'patch reporting', 'software title', 'patch source']
|
|
152
|
+
},
|
|
153
|
+
'apps': {
|
|
154
|
+
name: 'App Management',
|
|
155
|
+
keywords: ['app', 'application', 'app installer', 'vpp', 'volume purchase', 'managed app', 'app store', 'mac app store']
|
|
156
|
+
},
|
|
157
|
+
// === Self Service ===
|
|
158
|
+
'self-service': {
|
|
159
|
+
name: 'Self Service',
|
|
160
|
+
keywords: ['self service', 'self-service', 'dock item', 'branding', 'bookmark', 'user portal']
|
|
161
|
+
},
|
|
162
|
+
// === Security ===
|
|
163
|
+
'security': {
|
|
164
|
+
name: 'Security Settings',
|
|
165
|
+
keywords: ['security', 'security settings', 'restricted software', 'efi password', 'firmware password', 'gatekeeper']
|
|
166
|
+
},
|
|
167
|
+
'filevault': {
|
|
168
|
+
name: 'FileVault & Encryption',
|
|
169
|
+
keywords: ['filevault', 'encryption', 'recovery key', 'disk encryption', 'institutional recovery', 'personal recovery']
|
|
170
|
+
},
|
|
171
|
+
'compliance': {
|
|
172
|
+
name: 'Compliance & Baseline',
|
|
173
|
+
keywords: ['compliance', 'baseline', 'compliance baseline', 'security benchmark', 'cis benchmark', 'gdpr']
|
|
174
|
+
},
|
|
175
|
+
// === Endpoint Protection (Jamf Protect) ===
|
|
176
|
+
'protect-analytics': {
|
|
177
|
+
name: 'Threat Analytics',
|
|
178
|
+
keywords: ['analytic', 'threat', 'detection', 'analytic chain', 'custom analytic', 'jamf-managed analytic', 'alert']
|
|
179
|
+
},
|
|
180
|
+
'protect-plans': {
|
|
181
|
+
name: 'Protect Plans',
|
|
182
|
+
keywords: ['protect plan', 'jamf protect plan', 'threat prevention', 'endpoint security']
|
|
183
|
+
},
|
|
184
|
+
'data-integration': {
|
|
185
|
+
name: 'SIEM & Data Integration',
|
|
186
|
+
keywords: ['siem', 'splunk', 'sentinel', 'elastic', 'datadog', 'sumo logic', 'google secops', 'amazon s3', 'data stream', 'data integration']
|
|
187
|
+
},
|
|
188
|
+
// === Identity & Authentication ===
|
|
189
|
+
'sso': {
|
|
190
|
+
name: 'Single Sign-On',
|
|
191
|
+
keywords: ['sso', 'single sign-on', 'saml', 'oidc', 'oauth', 'jamf account', 'platform sso']
|
|
192
|
+
},
|
|
193
|
+
'ldap': {
|
|
194
|
+
name: 'Directory Services',
|
|
195
|
+
keywords: ['ldap', 'active directory', 'directory binding', 'open directory', 'google secure ldap']
|
|
196
|
+
},
|
|
197
|
+
'identity-provider': {
|
|
198
|
+
name: 'Identity Providers',
|
|
199
|
+
keywords: ['identity provider', 'idp', 'okta', 'azure ad', 'entra id', 'microsoft entra', 'google', 'cloud identity']
|
|
200
|
+
},
|
|
201
|
+
// === Jamf Connect ===
|
|
202
|
+
'connect-login': {
|
|
203
|
+
name: 'Jamf Connect Login',
|
|
204
|
+
keywords: ['jamf connect', 'login window', 'local account', 'account creation', 'account migration', 'mobile account']
|
|
205
|
+
},
|
|
206
|
+
'connect-password': {
|
|
207
|
+
name: 'Password & Keychain',
|
|
208
|
+
keywords: ['password sync', 'keychain', 'password policy', 'local password']
|
|
209
|
+
},
|
|
210
|
+
'privilege-elevation': {
|
|
211
|
+
name: 'Privilege Elevation',
|
|
212
|
+
keywords: ['privilege elevation', 'admin rights', 'sudo', 'privilege', 'self service+']
|
|
213
|
+
},
|
|
214
|
+
// === Users & Accounts ===
|
|
215
|
+
'users': {
|
|
216
|
+
name: 'Users & Accounts',
|
|
217
|
+
keywords: ['user account', 'local account', 'managed local administrator', 'mdm-enabled', 'user group', 'admin account']
|
|
218
|
+
},
|
|
219
|
+
'user-roles': {
|
|
220
|
+
name: 'Roles & Permissions',
|
|
221
|
+
keywords: ['user role', 'permission', 'privilege', 'administrator role', 'api role', 'access level']
|
|
222
|
+
},
|
|
223
|
+
// === Inventory & Reporting ===
|
|
224
|
+
'inventory': {
|
|
225
|
+
name: 'Inventory',
|
|
226
|
+
keywords: ['inventory', 'inventory collection', 'inventory display', 'hardware inventory', 'software inventory', 'inventory preload']
|
|
227
|
+
},
|
|
228
|
+
'extension-attributes': {
|
|
229
|
+
name: 'Extension Attributes',
|
|
230
|
+
keywords: ['extension attribute', 'custom attribute', 'ea', 'custom field', 'inventory attribute']
|
|
231
|
+
},
|
|
232
|
+
'reports': {
|
|
233
|
+
name: 'Reports & Searches',
|
|
234
|
+
keywords: ['report', 'search', 'advanced search', 'simple search', 'smart group', 'criteria', 'computer report']
|
|
235
|
+
},
|
|
236
|
+
'history': {
|
|
237
|
+
name: 'History & Logs',
|
|
238
|
+
keywords: ['history', 'log', 'audit', 'audit log', 'computer history', 'management history', 'server log']
|
|
239
|
+
},
|
|
240
|
+
// === API & Integration ===
|
|
241
|
+
'api': {
|
|
242
|
+
name: 'API & Automation',
|
|
243
|
+
keywords: ['api', 'rest api', 'classic api', 'jamf pro api', 'api role', 'api client', 'bearer token']
|
|
244
|
+
},
|
|
245
|
+
'graphql': {
|
|
246
|
+
name: 'GraphQL API',
|
|
247
|
+
keywords: ['graphql', 'query', 'mutation', 'schema', 'protect api']
|
|
248
|
+
},
|
|
249
|
+
'webhooks': {
|
|
250
|
+
name: 'Webhooks & Notifications',
|
|
251
|
+
keywords: ['webhook', 'notification', 'email notification', 'impact alert', 'event']
|
|
252
|
+
},
|
|
253
|
+
// === Network & Printing ===
|
|
254
|
+
'network': {
|
|
255
|
+
name: 'Network Configuration',
|
|
256
|
+
keywords: ['wifi', 'vpn', 'network', 'proxy', 'firewall', 'port', 'ip address', 'url']
|
|
257
|
+
},
|
|
258
|
+
'certificates': {
|
|
259
|
+
name: 'Certificates',
|
|
260
|
+
keywords: ['certificate', 'ssl', 'scep', 'push certificate', 'apns', 'signing']
|
|
261
|
+
},
|
|
262
|
+
'printers': {
|
|
263
|
+
name: 'Printers',
|
|
264
|
+
keywords: ['printer', 'print', 'cups', 'ppd']
|
|
265
|
+
},
|
|
266
|
+
// === Remote Access ===
|
|
267
|
+
'remote-access': {
|
|
268
|
+
name: 'Remote Access',
|
|
269
|
+
keywords: ['remote assist', 'jamf remote', 'teamviewer', 'screen sharing', 'vnc', 'remote administration']
|
|
270
|
+
},
|
|
271
|
+
// === Server Administration ===
|
|
272
|
+
'server-admin': {
|
|
273
|
+
name: 'Server Administration',
|
|
274
|
+
keywords: ['server', 'jamf pro server', 'activation code', 'smtp', 'ssl certificate', 'maintenance', 'health check', 'clustering']
|
|
275
|
+
},
|
|
276
|
+
'change-management': {
|
|
277
|
+
name: 'Change Management',
|
|
278
|
+
keywords: ['change management', 'change log', 'version', 'backup', 'restore']
|
|
279
|
+
},
|
|
280
|
+
// === License Management ===
|
|
281
|
+
'licensing': {
|
|
282
|
+
name: 'License Management',
|
|
283
|
+
keywords: ['license', 'licensed software', 'license compliance', 'license usage', 'vpp token']
|
|
284
|
+
},
|
|
285
|
+
// === Education (Jamf School) ===
|
|
286
|
+
'education': {
|
|
287
|
+
name: 'Education & Classroom',
|
|
288
|
+
keywords: ['school', 'class', 'teacher', 'student', 'jamf teacher', 'jamf student', 'jamf parent', 'classroom', 'education']
|
|
289
|
+
},
|
|
290
|
+
'school-integration': {
|
|
291
|
+
name: 'School Integrations',
|
|
292
|
+
keywords: ['apple school manager', 'asm', 'shared ipad', 'location', 'google classroom']
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
// HTML selectors for learn.jamf.com (React-based site)
|
|
296
|
+
export const SELECTORS = {
|
|
297
|
+
// Main content - learn.jamf.com uses semantic article tag
|
|
298
|
+
CONTENT: 'article, .article-content, main article, #content',
|
|
299
|
+
TITLE: 'h1',
|
|
300
|
+
// Navigation - learn.jamf.com structure
|
|
301
|
+
BREADCRUMB: '[class*="breadcrumb"] a, nav[aria-label="breadcrumb"] a',
|
|
302
|
+
TOC: 'nav.related-links a, [class*="toc"] a, [class*="sidebar"] a',
|
|
303
|
+
// Related content
|
|
304
|
+
RELATED: 'nav.related-links a, .related-topics a, [class*="related"] a',
|
|
305
|
+
// Elements to remove (scripts, tracking, etc.)
|
|
306
|
+
REMOVE: 'script, style, noscript, footer, [id="initial-data"], [class*="cookie"], [class*="tracking"], [class*="analytics"]'
|
|
307
|
+
};
|
|
308
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+BAA+B;AAC/B,SAAS,YAAY,CAAC,GAAW,EAAE,YAAoB;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;AAC/C,CAAC;AAED,SAAS,YAAY,CAAC,GAAW,EAAE,YAAoB;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;AAC1C,CAAC;AAED,YAAY;AACZ,MAAM,CAAC,MAAM,aAAa,GAAG,wBAAwB,CAAC;AACtD,MAAM,CAAC,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEx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ings":";AACA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Jamf Docs MCP Server
|
|
4
|
+
*
|
|
5
|
+
* An MCP server that provides access to Jamf documentation (docs.jamf.com)
|
|
6
|
+
* for AI assistants like Claude.
|
|
7
|
+
*/
|
|
8
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
9
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
|
+
import { registerSearchTool } from './tools/search.js';
|
|
11
|
+
import { registerGetArticleTool } from './tools/get-article.js';
|
|
12
|
+
import { registerListProductsTool } from './tools/list-products.js';
|
|
13
|
+
import { registerGetTocTool } from './tools/get-toc.js';
|
|
14
|
+
import { registerResources } from './resources/index.js';
|
|
15
|
+
// Create server instance
|
|
16
|
+
const server = new McpServer({
|
|
17
|
+
name: 'jamf-docs-mcp-server',
|
|
18
|
+
version: '1.0.0',
|
|
19
|
+
});
|
|
20
|
+
// Register all tools
|
|
21
|
+
registerListProductsTool(server);
|
|
22
|
+
registerSearchTool(server);
|
|
23
|
+
registerGetArticleTool(server);
|
|
24
|
+
registerGetTocTool(server);
|
|
25
|
+
// Register resources
|
|
26
|
+
registerResources(server);
|
|
27
|
+
// Start server
|
|
28
|
+
async function main() {
|
|
29
|
+
const transport = new StdioServerTransport();
|
|
30
|
+
await server.connect(transport);
|
|
31
|
+
// Log to stderr (not stdout, which is used for MCP protocol)
|
|
32
|
+
console.error('Jamf Docs MCP Server running on stdio');
|
|
33
|
+
console.error('Available tools: jamf_docs_list_products, jamf_docs_search, jamf_docs_get_article, jamf_docs_get_toc');
|
|
34
|
+
console.error('Available resources: jamf://products, jamf://topics');
|
|
35
|
+
}
|
|
36
|
+
main().catch((error) => {
|
|
37
|
+
console.error('Fatal error:', error);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
});
|
|
40
|
+
//# sour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9B,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources registration
|
|
3
|
+
*
|
|
4
|
+
* Exposes dynamic reference data for AI clients to read directly
|
|
5
|
+
* without needing to call tools. Data is fetched from the API
|
|
6
|
+
* with fallback to static constants.
|
|
7
|
+
*/
|
|
8
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
9
|
+
/**
|
|
10
|
+
* Register all MCP resources
|
|
11
|
+
*/
|
|
12
|
+
export declare function registerResources(server: McpServer): void;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4CzD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources registration
|
|
3
|
+
*
|
|
4
|
+
* Exposes dynamic reference data for AI clients to read directly
|
|
5
|
+
* without needing to call tools. Data is fetched from the API
|
|
6
|
+
* with fallback to static constants.
|
|
7
|
+
*/
|
|
8
|
+
import { getProductsResourceData, getTopicsResourceData } from '../services/metadata.js';
|
|
9
|
+
/**
|
|
10
|
+
* Register all MCP resources
|
|
11
|
+
*/
|
|
12
|
+
export function registerResources(server) {
|
|
13
|
+
// Products resource - dynamic with fallback
|
|
14
|
+
server.registerResource('products', 'jamf://products', {
|
|
15
|
+
title: 'Jamf Products List',
|
|
16
|
+
description: 'List of all available Jamf products (Jamf Pro, Jamf School, Jamf Connect, Jamf Protect) with their IDs and latest versions. Data is fetched dynamically from the API.',
|
|
17
|
+
mimeType: 'application/json'
|
|
18
|
+
}, async () => {
|
|
19
|
+
const data = await getProductsResourceData();
|
|
20
|
+
return {
|
|
21
|
+
contents: [{
|
|
22
|
+
uri: 'jamf://products',
|
|
23
|
+
mimeType: 'application/json',
|
|
24
|
+
text: JSON.stringify(data, null, 2)
|
|
25
|
+
}]
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
// Topics resource - dynamic with fallback
|
|
29
|
+
server.registerResource('topics', 'jamf://topics', {
|
|
30
|
+
title: 'Jamf Documentation Topics',
|
|
31
|
+
description: 'Topic categories for filtering documentation searches. Combines official TOC structure with curated categories.',
|
|
32
|
+
mimeType: 'application/json'
|
|
33
|
+
}, async () => {
|
|
34
|
+
const data = await getTopicsResourceData();
|
|
35
|
+
return {
|
|
36
|
+
contents: [{
|
|
37
|
+
uri: 'jamf://topics',
|
|
38
|
+
mimeType: 'application/json',
|
|
39
|
+
text: JSON.stringify(data, null, 2)
|
|
40
|
+
}]
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
console.error('Registered resources: jamf://products, jamf://topics');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,4CAA4C;IAC5C,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,iBAAiB,EACjB;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,uKAAuK;QACpL,QAAQ,EAAE,kBAAkB;KAC7B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,uBAAuB,EAAE,CAAC;QAC7C,OAAO;YACL,QAAQ,EAAE,CAAC;oBACT,GAAG,EAAE,iBAAiB;oBACtB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;iBACpC,CAAC;SACH,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,0CAA0C;IAC1C,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,eAAe,EACf;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,iHAAiH;QAC9H,QAAQ,EAAE,kBAAkB;KAC7B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,qBAAqB,EAAE,CAAC;QAC3C,OAAO;YACL,QAAQ,EAAE,CAAC;oBACT,GAAG,EAAE,eAAe;oBACpB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;iBACpC,CAAC;SACH,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for input validation
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { ResponseFormat, OutputMode } from '../constants.js';
|
|
6
|
+
/**
|
|
7
|
+
* Schema for jamf_docs_list_products
|
|
8
|
+
*/
|
|
9
|
+
export declare const ListProductsInputSchema: z.ZodObject<{
|
|
10
|
+
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
11
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
12
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type ListProductsInput = z.infer<typeof ListProductsInputSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Schema for jamf_docs_search
|
|
17
|
+
*/
|
|
18
|
+
export declare const SearchInputSchema: z.ZodObject<{
|
|
19
|
+
query: z.ZodString;
|
|
20
|
+
product: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
[x: string]: string;
|
|
22
|
+
}>>;
|
|
23
|
+
topic: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
[x: string]: string;
|
|
25
|
+
}>>;
|
|
26
|
+
version: z.ZodOptional<z.ZodString>;
|
|
27
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
29
|
+
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
30
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
31
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type SearchInput = z.infer<typeof SearchInputSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* Schema for jamf_docs_get_article
|
|
36
|
+
*/
|
|
37
|
+
export declare const GetArticleInputSchema: z.ZodObject<{
|
|
38
|
+
url: z.ZodString;
|
|
39
|
+
section: z.ZodOptional<z.ZodString>;
|
|
40
|
+
summaryOnly: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
includeRelated: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
+
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
43
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
44
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export type GetArticleInput = z.infer<typeof GetArticleInputSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Schema for jamf_docs_get_toc
|
|
49
|
+
*/
|
|
50
|
+
export declare const GetTocInputSchema: z.ZodObject<{
|
|
51
|
+
product: z.ZodEnum<{
|
|
52
|
+
[x: string]: string;
|
|
53
|
+
}>;
|
|
54
|
+
version: z.ZodOptional<z.ZodString>;
|
|
55
|
+
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
56
|
+
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
57
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
58
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export type GetTocInput = z.infer<typeof GetTocInputSchema>;
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,UAAU,EAMX,MAAM,iBAAiB,CAAC;AA8BzB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;kBAYzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;kBAwCnB,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;kBAgCvB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;kBAuBnB,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for input validation
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { ResponseFormat, OutputMode, JAMF_PRODUCTS, CONTENT_LIMITS, TOKEN_CONFIG, PAGINATION_CONFIG, JAMF_TOPICS } from '../constants.js';
|
|
6
|
+
// Valid product IDs
|
|
7
|
+
const productIds = Object.keys(JAMF_PRODUCTS);
|
|
8
|
+
// Valid topic IDs
|
|
9
|
+
const topicIds = Object.keys(JAMF_TOPICS);
|
|
10
|
+
// Response format enum
|
|
11
|
+
const ResponseFormatSchema = z.nativeEnum(ResponseFormat);
|
|
12
|
+
// Output mode enum
|
|
13
|
+
const OutputModeSchema = z.nativeEnum(OutputMode);
|
|
14
|
+
// Common maxTokens parameter schema
|
|
15
|
+
const MaxTokensSchema = z.number()
|
|
16
|
+
.int()
|
|
17
|
+
.min(TOKEN_CONFIG.MIN_TOKENS)
|
|
18
|
+
.max(TOKEN_CONFIG.MAX_TOKENS_LIMIT)
|
|
19
|
+
.default(TOKEN_CONFIG.DEFAULT_MAX_TOKENS)
|
|
20
|
+
.describe(`Maximum tokens in response (${TOKEN_CONFIG.MIN_TOKENS}-${TOKEN_CONFIG.MAX_TOKENS_LIMIT}, default: ${TOKEN_CONFIG.DEFAULT_MAX_TOKENS})`);
|
|
21
|
+
// Common page parameter schema
|
|
22
|
+
const PageSchema = z.number()
|
|
23
|
+
.int()
|
|
24
|
+
.min(1)
|
|
25
|
+
.max(PAGINATION_CONFIG.MAX_PAGE)
|
|
26
|
+
.default(PAGINATION_CONFIG.DEFAULT_PAGE)
|
|
27
|
+
.describe(`Page number (1-${PAGINATION_CONFIG.MAX_PAGE}, default: 1)`);
|
|
28
|
+
/**
|
|
29
|
+
* Schema for jamf_docs_list_products
|
|
30
|
+
*/
|
|
31
|
+
export const ListProductsInputSchema = z.object({
|
|
32
|
+
maxTokens: MaxTokensSchema
|
|
33
|
+
.optional()
|
|
34
|
+
.describe(`Maximum tokens in response (${TOKEN_CONFIG.MIN_TOKENS}-${TOKEN_CONFIG.MAX_TOKENS_LIMIT}, default: ${TOKEN_CONFIG.DEFAULT_MAX_TOKENS})`),
|
|
35
|
+
outputMode: OutputModeSchema
|
|
36
|
+
.default(OutputMode.FULL)
|
|
37
|
+
.describe('Output detail level: "full" for detailed output or "compact" for brief output'),
|
|
38
|
+
responseFormat: ResponseFormatSchema
|
|
39
|
+
.default(ResponseFormat.MARKDOWN)
|
|
40
|
+
.describe('Output format: "markdown" for human-readable or "json" for machine-readable')
|
|
41
|
+
}).strict();
|
|
42
|
+
/**
|
|
43
|
+
* Schema for jamf_docs_search
|
|
44
|
+
*/
|
|
45
|
+
export const SearchInputSchema = z.object({
|
|
46
|
+
query: z.string()
|
|
47
|
+
.min(2, 'Query must be at least 2 characters')
|
|
48
|
+
.max(200, 'Query must not exceed 200 characters')
|
|
49
|
+
.describe('Search keywords to find in Jamf documentation'),
|
|
50
|
+
product: z.enum(productIds)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Filter by product: jamf-pro, jamf-school, jamf-connect, jamf-protect'),
|
|
53
|
+
topic: z.enum(topicIds)
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Filter by topic: enrollment, profiles, security, inventory, policies, smart-groups, apps, identity, api, network'),
|
|
56
|
+
version: z.string()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Filter by version (e.g., "11.5.0", "10.x")'),
|
|
59
|
+
limit: z.number()
|
|
60
|
+
.int()
|
|
61
|
+
.min(1)
|
|
62
|
+
.max(CONTENT_LIMITS.MAX_SEARCH_RESULTS)
|
|
63
|
+
.default(CONTENT_LIMITS.DEFAULT_SEARCH_RESULTS)
|
|
64
|
+
.describe(`Maximum number of results per page (1-${CONTENT_LIMITS.MAX_SEARCH_RESULTS})`),
|
|
65
|
+
page: PageSchema
|
|
66
|
+
.optional()
|
|
67
|
+
.describe(`Page number for pagination (1-${PAGINATION_CONFIG.MAX_PAGE}, default: 1)`),
|
|
68
|
+
maxTokens: MaxTokensSchema
|
|
69
|
+
.optional()
|
|
70
|
+
.describe(`Maximum tokens in response (${TOKEN_CONFIG.MIN_TOKENS}-${TOKEN_CONFIG.MAX_TOKENS_LIMIT}, default: ${TOKEN_CONFIG.DEFAULT_MAX_TOKENS})`),
|
|
71
|
+
outputMode: OutputModeSchema
|
|
72
|
+
.default(OutputMode.FULL)
|
|
73
|
+
.describe('Output detail level: "full" for detailed output or "compact" for brief output'),
|
|
74
|
+
responseFormat: ResponseFormatSchema
|
|
75
|
+
.default(ResponseFormat.MARKDOWN)
|
|
76
|
+
.describe('Output format: "markdown" for human-readable or "json" for machine-readable')
|
|
77
|
+
}).strict();
|
|
78
|
+
/**
|
|
79
|
+
* Schema for jamf_docs_get_article
|
|
80
|
+
*/
|
|
81
|
+
export const GetArticleInputSchema = z.object({
|
|
82
|
+
url: z.string()
|
|
83
|
+
.url('Must be a valid URL')
|
|
84
|
+
.refine((url) => url.includes('docs.jamf.com') || url.includes('learn.jamf.com'), 'URL must be from docs.jamf.com or learn.jamf.com')
|
|
85
|
+
.describe('Full URL of the Jamf documentation article'),
|
|
86
|
+
section: z.string()
|
|
87
|
+
.optional()
|
|
88
|
+
.describe('Extract only a specific section by title or ID (e.g., "Prerequisites", "Configuration")'),
|
|
89
|
+
summaryOnly: z.boolean()
|
|
90
|
+
.default(false)
|
|
91
|
+
.describe('Return only article summary and outline instead of full content (token-efficient)'),
|
|
92
|
+
includeRelated: z.boolean()
|
|
93
|
+
.default(false)
|
|
94
|
+
.describe('Include related article links in the response'),
|
|
95
|
+
maxTokens: MaxTokensSchema
|
|
96
|
+
.optional()
|
|
97
|
+
.describe(`Maximum tokens in response (${TOKEN_CONFIG.MIN_TOKENS}-${TOKEN_CONFIG.MAX_TOKENS_LIMIT}, default: ${TOKEN_CONFIG.DEFAULT_MAX_TOKENS})`),
|
|
98
|
+
outputMode: OutputModeSchema
|
|
99
|
+
.default(OutputMode.FULL)
|
|
100
|
+
.describe('Output detail level: "full" for detailed output or "compact" for brief output'),
|
|
101
|
+
responseFormat: ResponseFormatSchema
|
|
102
|
+
.default(ResponseFormat.MARKDOWN)
|
|
103
|
+
.describe('Output format: "markdown" for human-readable or "json" for machine-readable')
|
|
104
|
+
}).strict();
|
|
105
|
+
/**
|
|
106
|
+
* Schema for jamf_docs_get_toc
|
|
107
|
+
*/
|
|
108
|
+
export const GetTocInputSchema = z.object({
|
|
109
|
+
product: z.enum(productIds)
|
|
110
|
+
.describe('Product ID: jamf-pro, jamf-school, jamf-connect, jamf-protect'),
|
|
111
|
+
version: z.string()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe('Specific version (defaults to latest)'),
|
|
114
|
+
page: PageSchema
|
|
115
|
+
.optional()
|
|
116
|
+
.describe(`Page number for pagination (1-${PAGINATION_CONFIG.MAX_PAGE}, default: 1)`),
|
|
117
|
+
maxTokens: MaxTokensSchema
|
|
118
|
+
.optional()
|
|
119
|
+
.describe(`Maximum tokens in response (${TOKEN_CONFIG.MIN_TOKENS}-${TOKEN_CONFIG.MAX_TOKENS_LIMIT}, default: ${TOKEN_CONFIG.DEFAULT_MAX_TOKENS})`),
|
|
120
|
+
outputMode: OutputModeSchema
|
|
121
|
+
.default(OutputMode.FULL)
|
|
122
|
+
.describe('Output detail level: "full" for detailed output or "compact" for brief output'),
|
|
123
|
+
responseFormat: ResponseFormatSchema
|
|
124
|
+
.default(ResponseFormat.MARKDOWN)
|
|
125
|
+
.describe('Output format: "markdown" for human-readable or "json" for machine-readable')
|
|
126
|
+
}).strict();
|
|
127
|
+
//# sourceMappingURL=index.js.map
|