@get-technology-inc/jamf-docs-mcp-server 1.0.0 β 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/README.md +61 -139
- package/dist/constants.d.ts +4 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +10 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- 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 +24 -61
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +18 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/cache.d.ts +4 -13
- package/dist/services/cache.d.ts.map +1 -1
- package/dist/services/cache.js +8 -32
- package/dist/services/cache.js.map +1 -1
- 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 +2 -2
- package/dist/services/scraper.d.ts.map +1 -1
- package/dist/services/scraper.js +118 -142
- package/dist/services/scraper.js.map +1 -1
- 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 +17 -1
- package/dist/services/tokenizer.d.ts.map +1 -1
- package/dist/services/tokenizer.js +122 -66
- package/dist/services/tokenizer.js.map +1 -1
- package/dist/tools/get-article.d.ts +1 -1
- package/dist/tools/get-article.d.ts.map +1 -1
- package/dist/tools/get-article.js +114 -65
- package/dist/tools/get-article.js.map +1 -1
- package/dist/tools/get-toc.d.ts +1 -1
- package/dist/tools/get-toc.d.ts.map +1 -1
- package/dist/tools/get-toc.js +71 -41
- package/dist/tools/get-toc.js.map +1 -1
- package/dist/tools/list-products.d.ts +1 -1
- package/dist/tools/list-products.d.ts.map +1 -1
- package/dist/tools/list-products.js +21 -3
- package/dist/tools/list-products.js.map +1 -1
- package/dist/tools/search.d.ts +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +97 -57
- package/dist/tools/search.js.map +1 -1
- package/dist/types.d.ts +8 -17
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,202 +4,124 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@get-technology-inc/jamf-docs-mcp-server)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
An MCP
|
|
7
|
+
An MCP server that gives AI assistants (Claude, Cursor, etc.) direct access to Jamf official documentation. Ask Jamf-related questions and get answers based on the latest docs from learn.jamf.com.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Supported Products**: Jamf Pro, Jamf School, Jamf Connect, Jamf Protect
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- π **Read Articles**: Fetch full article content in Markdown format
|
|
13
|
-
- π **Browse TOC**: Explore documentation structure by product
|
|
14
|
-
- π·οΈ **Product Filtering**: Filter by Jamf Pro, School, Connect, or Protect
|
|
15
|
-
- πΎ **Caching**: Built-in caching for faster responses
|
|
11
|
+
[δΈζζδ»Ά](docs/README.zh-TW.md)
|
|
16
12
|
|
|
17
|
-
##
|
|
13
|
+
## Quick Start
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|---------|-------------|
|
|
21
|
-
| Jamf Pro | Enterprise Apple device management |
|
|
22
|
-
| Jamf School | Education-focused device management |
|
|
23
|
-
| Jamf Connect | Identity and access management |
|
|
24
|
-
| Jamf Protect | Endpoint security for Apple |
|
|
15
|
+
### Claude Desktop
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
Edit `claude_desktop_config.json`:
|
|
27
18
|
|
|
28
|
-
-
|
|
19
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
20
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# Build
|
|
41
|
-
npm run build
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"jamf-docs": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": ["-y", "@get-technology-inc/jamf-docs-mcp-server"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
42
31
|
```
|
|
43
32
|
|
|
44
|
-
|
|
33
|
+
Restart Claude Desktop to apply.
|
|
45
34
|
|
|
46
|
-
###
|
|
35
|
+
### Claude Code (CLI)
|
|
47
36
|
|
|
48
37
|
```bash
|
|
49
|
-
npx @get-technology-inc/jamf-docs-mcp-server
|
|
38
|
+
claude mcp add jamf-docs -- npx -y @get-technology-inc/jamf-docs-mcp-server
|
|
50
39
|
```
|
|
51
40
|
|
|
52
|
-
###
|
|
41
|
+
### Cursor
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
Edit `~/.cursor/mcp.json`:
|
|
55
44
|
|
|
56
45
|
```json
|
|
57
46
|
{
|
|
58
47
|
"mcpServers": {
|
|
59
48
|
"jamf-docs": {
|
|
60
|
-
"command": "
|
|
61
|
-
"args": ["/
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "@get-technology-inc/jamf-docs-mcp-server"]
|
|
62
51
|
}
|
|
63
52
|
}
|
|
64
53
|
}
|
|
65
54
|
```
|
|
66
55
|
|
|
67
|
-
###
|
|
56
|
+
### Verify Installation
|
|
68
57
|
|
|
69
|
-
|
|
70
|
-
claude mcp add jamf-docs -- node /path/to/jamf-docs-mcp-server/dist/index.js
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Testing with MCP Inspector
|
|
58
|
+
Test with MCP Inspector:
|
|
74
59
|
|
|
75
60
|
```bash
|
|
76
|
-
npx @modelcontextprotocol/inspector
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Available Tools
|
|
80
|
-
|
|
81
|
-
### `jamf_docs_list_products`
|
|
82
|
-
|
|
83
|
-
List all available Jamf products and their documentation versions.
|
|
84
|
-
|
|
61
|
+
npx @modelcontextprotocol/inspector npx -y @get-technology-inc/jamf-docs-mcp-server
|
|
85
62
|
```
|
|
86
|
-
"What Jamf products have documentation?"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### `jamf_docs_search`
|
|
90
63
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
"Search for SSO configuration in Jamf Pro"
|
|
95
|
-
"Find articles about MDM enrollment"
|
|
96
|
-
```
|
|
64
|
+
## Usage Examples
|
|
97
65
|
|
|
98
|
-
|
|
66
|
+
Once configured, just ask your AI assistant:
|
|
99
67
|
|
|
100
|
-
|
|
68
|
+
- "How do I configure SSO in Jamf Pro?"
|
|
69
|
+
- "What are the system requirements for Jamf Protect?"
|
|
70
|
+
- "Explain the MDM enrollment process"
|
|
101
71
|
|
|
102
|
-
|
|
103
|
-
"Get the article at https://docs.jamf.com/..."
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### `jamf_docs_get_toc`
|
|
107
|
-
|
|
108
|
-
Get the table of contents for a product's documentation.
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
"Show me the Jamf Pro documentation structure"
|
|
112
|
-
```
|
|
72
|
+
## Available Tools
|
|
113
73
|
|
|
114
|
-
|
|
74
|
+
| Tool | Description |
|
|
75
|
+
|------|-------------|
|
|
76
|
+
| `jamf_docs_search` | Search documentation |
|
|
77
|
+
| `jamf_docs_get_article` | Get article content |
|
|
78
|
+
| `jamf_docs_get_toc` | Get table of contents |
|
|
79
|
+
| `jamf_docs_list_products` | List supported products |
|
|
115
80
|
|
|
116
|
-
|
|
117
|
-
# Install dependencies
|
|
118
|
-
npm install
|
|
81
|
+
## MCP Resources
|
|
119
82
|
|
|
120
|
-
|
|
121
|
-
npm run dev
|
|
122
|
-
|
|
123
|
-
# Build for production
|
|
124
|
-
npm run build
|
|
83
|
+
Static reference data accessible without tool calls:
|
|
125
84
|
|
|
126
|
-
|
|
127
|
-
|
|
85
|
+
| Resource | Description |
|
|
86
|
+
|----------|-------------|
|
|
87
|
+
| `jamf://products` | List of products with version info |
|
|
88
|
+
| `jamf://topics` | Topic categories for filtering |
|
|
128
89
|
|
|
129
|
-
|
|
130
|
-
npm run typecheck
|
|
131
|
-
```
|
|
90
|
+
## Key Features
|
|
132
91
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
βββ src/
|
|
138
|
-
β βββ index.ts # Entry point
|
|
139
|
-
β βββ types.ts # Type definitions
|
|
140
|
-
β βββ constants.ts # Configuration
|
|
141
|
-
β βββ tools/ # MCP tool implementations
|
|
142
|
-
β β βββ list-products.ts
|
|
143
|
-
β β βββ search.ts
|
|
144
|
-
β β βββ get-article.ts
|
|
145
|
-
β β βββ get-toc.ts
|
|
146
|
-
β βββ services/ # Core services
|
|
147
|
-
β β βββ scraper.ts # Web scraping
|
|
148
|
-
β β βββ cache.ts # Caching
|
|
149
|
-
β βββ schemas/ # Zod validation schemas
|
|
150
|
-
βββ .cache/ # Local cache (gitignored)
|
|
151
|
-
βββ dist/ # Build output
|
|
152
|
-
βββ package.json
|
|
153
|
-
βββ tsconfig.json
|
|
154
|
-
βββ CLAUDE.md # Development guide
|
|
155
|
-
```
|
|
92
|
+
- **Compact Mode**: Use `outputMode: "compact"` for token-efficient responses
|
|
93
|
+
- **Summary Only**: Use `summaryOnly: true` to preview articles before fetching full content
|
|
94
|
+
- **Version Query**: Use `version` parameter to query specific product versions
|
|
95
|
+
- **Search Suggestions**: Get helpful suggestions when no results found
|
|
156
96
|
|
|
157
97
|
## Configuration
|
|
158
98
|
|
|
159
|
-
|
|
99
|
+
Optional environment variables:
|
|
160
100
|
|
|
161
101
|
| Variable | Description | Default |
|
|
162
102
|
|----------|-------------|---------|
|
|
163
103
|
| `CACHE_DIR` | Cache directory | `.cache` |
|
|
164
|
-
| `REQUEST_TIMEOUT` |
|
|
165
|
-
| `
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
| `USER_AGENT` | Custom User-Agent string | `JamfDocsMCP/1.0` |
|
|
169
|
-
| `CACHE_TTL_SEARCH` | Search results cache TTL (ms) | `1800000` (30 min) |
|
|
170
|
-
| `CACHE_TTL_ARTICLE` | Article content cache TTL (ms) | `86400000` (24 hr) |
|
|
171
|
-
| `CACHE_TTL_TOC` | TOC cache TTL (ms) | `86400000` (24 hr) |
|
|
172
|
-
| `CACHE_TTL_PRODUCTS` | Products list cache TTL (ms) | `604800000` (7 days) |
|
|
173
|
-
|
|
174
|
-
Example:
|
|
104
|
+
| `REQUEST_TIMEOUT` | Request timeout (ms) | `15000` |
|
|
105
|
+
| `CACHE_TTL_ARTICLE` | Article cache TTL (ms) | `86400000` (24hr) |
|
|
106
|
+
|
|
107
|
+
## Development
|
|
175
108
|
|
|
176
109
|
```bash
|
|
177
|
-
|
|
110
|
+
git clone https://github.com/GET-Technology-Inc/jamf-docs-mcp-server.git
|
|
111
|
+
cd jamf-docs-mcp-server
|
|
112
|
+
npm install
|
|
113
|
+
npm run dev
|
|
178
114
|
```
|
|
179
115
|
|
|
180
|
-
## Contributing
|
|
181
|
-
|
|
182
|
-
1. Fork the repository
|
|
183
|
-
2. Create a feature branch
|
|
184
|
-
3. Make your changes
|
|
185
|
-
4. Run tests and type checks
|
|
186
|
-
5. Submit a pull request
|
|
187
|
-
|
|
188
116
|
## License
|
|
189
117
|
|
|
190
118
|
MIT - Copyright (c) 2025 GET Technology Inc.
|
|
191
119
|
|
|
192
|
-
## Maintainer
|
|
193
|
-
|
|
194
|
-
Developed and maintained by [GET Technology Inc.](https://github.com/GET-Technology-Inc)
|
|
195
|
-
|
|
196
120
|
## Disclaimer
|
|
197
121
|
|
|
198
|
-
This is an unofficial tool
|
|
122
|
+
This is an unofficial tool and is not affiliated with Jamf.
|
|
199
123
|
|
|
200
|
-
##
|
|
124
|
+
## Links
|
|
201
125
|
|
|
202
126
|
- [Jamf Documentation](https://learn.jamf.com)
|
|
203
|
-
- [Jamf Developer Portal](https://developer.jamf.com)
|
|
204
127
|
- [MCP Specification](https://spec.modelcontextprotocol.io/)
|
|
205
|
-
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
package/dist/constants.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* The new URL structure is: learn.jamf.com/en-US/bundle/{product}-documentation/page/{page}.html
|
|
6
6
|
*/
|
|
7
7
|
export declare const DOCS_BASE_URL = "https://learn.jamf.com";
|
|
8
|
-
export declare const LEARN_BASE_URL = "https://learn.jamf.com";
|
|
9
8
|
export declare const DOCS_API_URL = "https://learn-be.jamf.com";
|
|
10
9
|
export declare const JAMF_PRODUCTS: {
|
|
11
10
|
readonly 'jamf-pro': {
|
|
@@ -54,6 +53,10 @@ export declare enum ResponseFormat {
|
|
|
54
53
|
MARKDOWN = "markdown",
|
|
55
54
|
JSON = "json"
|
|
56
55
|
}
|
|
56
|
+
export declare enum OutputMode {
|
|
57
|
+
FULL = "full",
|
|
58
|
+
COMPACT = "compact"
|
|
59
|
+
}
|
|
57
60
|
export declare const CACHE_TTL: {
|
|
58
61
|
readonly SEARCH_RESULTS: number;
|
|
59
62
|
readonly ARTICLE_CONTENT: number;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,YAAY,8BAA8B,CAAC;AAGxD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,aAAa,CAAC;AAGnD,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAGD,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAGD,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAGX,eAAO,MAAM,SAAS,QAAsC,CAAC;AAG7D,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAGX,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkMd,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,WAAW,CAAC;AAG/C,eAAO,MAAM,SAAS;;;;;;;CAcZ,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -5,20 +5,19 @@
|
|
|
5
5
|
* The new URL structure is: learn.jamf.com/en-US/bundle/{product}-documentation/page/{page}.html
|
|
6
6
|
*/
|
|
7
7
|
// Environment variable helpers
|
|
8
|
-
|
|
8
|
+
function getEnvNumber(key, defaultValue) {
|
|
9
9
|
const value = process.env[key];
|
|
10
10
|
if (value === undefined) {
|
|
11
11
|
return defaultValue;
|
|
12
12
|
}
|
|
13
13
|
const parsed = parseInt(value, 10);
|
|
14
14
|
return isNaN(parsed) ? defaultValue : parsed;
|
|
15
|
-
}
|
|
16
|
-
|
|
15
|
+
}
|
|
16
|
+
function getEnvString(key, defaultValue) {
|
|
17
17
|
return process.env[key] ?? defaultValue;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
// Base URLs
|
|
20
20
|
export const DOCS_BASE_URL = 'https://learn.jamf.com';
|
|
21
|
-
export const LEARN_BASE_URL = 'https://learn.jamf.com';
|
|
22
21
|
export const DOCS_API_URL = 'https://learn-be.jamf.com';
|
|
23
22
|
// Supported products - updated URL patterns for learn.jamf.com
|
|
24
23
|
export const JAMF_PRODUCTS = {
|
|
@@ -69,6 +68,12 @@ export var ResponseFormat;
|
|
|
69
68
|
ResponseFormat["MARKDOWN"] = "markdown";
|
|
70
69
|
ResponseFormat["JSON"] = "json";
|
|
71
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 = {}));
|
|
72
77
|
// Cache settings (in milliseconds) - configurable via environment variables
|
|
73
78
|
export const CACHE_TTL = {
|
|
74
79
|
SEARCH_RESULTS: getEnvNumber('CACHE_TTL_SEARCH', 30 * 60 * 1000), // 30 minutes
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+BAA+B;AAC/B,
|
|
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,GAA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ACpB,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,CAAC,sBAAsB,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,CAAC;KACzF;CACO,CAAC;AAIX,uDAAuD;AACvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,0DAA0D;IAC1D,OAAO,EAAE,mDAAmD;IAC5D,KAAK,EAAE,IAAI;IAEX,wCAAwC;IACxC,UAAU,EAAE,yDAAyD;IACrE,GAAG,EAAE,6DAA6D;IAElE,kBAAkB;IAClB,OAAO,EAAE,8DAA8D;IAEvE,+CAA+C;IAC/C,MAAM,EAAE,oHAAoH;CACpH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { registerSearchTool } from './tools/search.js';
|
|
|
11
11
|
import { registerGetArticleTool } from './tools/get-article.js';
|
|
12
12
|
import { registerListProductsTool } from './tools/list-products.js';
|
|
13
13
|
import { registerGetTocTool } from './tools/get-toc.js';
|
|
14
|
+
import { registerResources } from './resources/index.js';
|
|
14
15
|
// Create server instance
|
|
15
16
|
const server = new McpServer({
|
|
16
17
|
name: 'jamf-docs-mcp-server',
|
|
@@ -21,6 +22,8 @@ registerListProductsTool(server);
|
|
|
21
22
|
registerSearchTool(server);
|
|
22
23
|
registerGetArticleTool(server);
|
|
23
24
|
registerGetTocTool(server);
|
|
25
|
+
// Register resources
|
|
26
|
+
registerResources(server);
|
|
24
27
|
// Start server
|
|
25
28
|
async function main() {
|
|
26
29
|
const transport = new StdioServerTransport();
|
|
@@ -28,6 +31,7 @@ async function main() {
|
|
|
28
31
|
// Log to stderr (not stdout, which is used for MCP protocol)
|
|
29
32
|
console.error('Jamf Docs MCP Server running on stdio');
|
|
30
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');
|
|
31
35
|
}
|
|
32
36
|
main().catch((error) => {
|
|
33
37
|
console.error('Fatal error:', error);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,yBAAyB;AACzB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,qBAAqB;AACrB,wBAAwB,CAAC,MAAM,CAAC,CAAC;AACjC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE3B,qBAAqB;AACrB,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAE1B,eAAe;AACf,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,6DAA6D;IAC7D,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;IACvD,OAAO,CAAC,KAAK,CAAC,sGAAsG,CAAC,CAAC;IACtH,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;AACvE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,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"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -2,97 +2,60 @@
|
|
|
2
2
|
* Zod schemas for input validation
|
|
3
3
|
*/
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { ResponseFormat } from '../constants.js';
|
|
5
|
+
import { ResponseFormat, OutputMode } from '../constants.js';
|
|
6
6
|
/**
|
|
7
7
|
* Schema for jamf_docs_list_products
|
|
8
8
|
*/
|
|
9
9
|
export declare const ListProductsInputSchema: z.ZodObject<{
|
|
10
10
|
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
maxTokens?: number | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
maxTokens?: number | undefined;
|
|
17
|
-
responseFormat?: ResponseFormat | undefined;
|
|
18
|
-
}>;
|
|
11
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
12
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
19
14
|
export type ListProductsInput = z.infer<typeof ListProductsInputSchema>;
|
|
20
15
|
/**
|
|
21
16
|
* Schema for jamf_docs_search
|
|
22
17
|
*/
|
|
23
18
|
export declare const SearchInputSchema: z.ZodObject<{
|
|
24
19
|
query: z.ZodString;
|
|
25
|
-
product: z.ZodOptional<z.ZodEnum<
|
|
26
|
-
|
|
20
|
+
product: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
[x: string]: string;
|
|
22
|
+
}>>;
|
|
23
|
+
topic: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
[x: string]: string;
|
|
25
|
+
}>>;
|
|
27
26
|
version: z.ZodOptional<z.ZodString>;
|
|
28
27
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
29
28
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
30
29
|
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
responseFormat: ResponseFormat;
|
|
35
|
-
limit: number;
|
|
36
|
-
version?: string | undefined;
|
|
37
|
-
maxTokens?: number | undefined;
|
|
38
|
-
product?: string | undefined;
|
|
39
|
-
topic?: string | undefined;
|
|
40
|
-
page?: number | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
query: string;
|
|
43
|
-
version?: string | undefined;
|
|
44
|
-
maxTokens?: number | undefined;
|
|
45
|
-
responseFormat?: ResponseFormat | undefined;
|
|
46
|
-
product?: string | undefined;
|
|
47
|
-
topic?: string | undefined;
|
|
48
|
-
limit?: number | undefined;
|
|
49
|
-
page?: number | undefined;
|
|
50
|
-
}>;
|
|
30
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
31
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
51
33
|
export type SearchInput = z.infer<typeof SearchInputSchema>;
|
|
52
34
|
/**
|
|
53
35
|
* Schema for jamf_docs_get_article
|
|
54
36
|
*/
|
|
55
37
|
export declare const GetArticleInputSchema: z.ZodObject<{
|
|
56
|
-
url: z.
|
|
38
|
+
url: z.ZodString;
|
|
57
39
|
section: z.ZodOptional<z.ZodString>;
|
|
40
|
+
summaryOnly: z.ZodDefault<z.ZodBoolean>;
|
|
58
41
|
includeRelated: z.ZodDefault<z.ZodBoolean>;
|
|
59
42
|
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
responseFormat: ResponseFormat;
|
|
64
|
-
includeRelated: boolean;
|
|
65
|
-
maxTokens?: number | undefined;
|
|
66
|
-
section?: string | undefined;
|
|
67
|
-
}, {
|
|
68
|
-
url: string;
|
|
69
|
-
maxTokens?: number | undefined;
|
|
70
|
-
responseFormat?: ResponseFormat | undefined;
|
|
71
|
-
section?: string | undefined;
|
|
72
|
-
includeRelated?: boolean | undefined;
|
|
73
|
-
}>;
|
|
43
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
44
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
74
46
|
export type GetArticleInput = z.infer<typeof GetArticleInputSchema>;
|
|
75
47
|
/**
|
|
76
48
|
* Schema for jamf_docs_get_toc
|
|
77
49
|
*/
|
|
78
50
|
export declare const GetTocInputSchema: z.ZodObject<{
|
|
79
|
-
product: z.ZodEnum<
|
|
51
|
+
product: z.ZodEnum<{
|
|
52
|
+
[x: string]: string;
|
|
53
|
+
}>;
|
|
80
54
|
version: z.ZodOptional<z.ZodString>;
|
|
81
55
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
82
56
|
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
product: string;
|
|
87
|
-
version?: string | undefined;
|
|
88
|
-
maxTokens?: number | undefined;
|
|
89
|
-
page?: number | undefined;
|
|
90
|
-
}, {
|
|
91
|
-
product: string;
|
|
92
|
-
version?: string | undefined;
|
|
93
|
-
maxTokens?: number | undefined;
|
|
94
|
-
responseFormat?: ResponseFormat | undefined;
|
|
95
|
-
page?: number | undefined;
|
|
96
|
-
}>;
|
|
57
|
+
outputMode: z.ZodDefault<z.ZodEnum<typeof OutputMode>>;
|
|
58
|
+
responseFormat: z.ZodDefault<z.ZodEnum<typeof ResponseFormat>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
97
60
|
export type GetTocInput = z.infer<typeof GetTocInputSchema>;
|
|
98
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|