temba-mcp 0.1.2 → 0.1.3
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/mcp.js +10 -1
- package/package.json +1 -1
- package/version.js +1 -1
package/mcp.js
CHANGED
|
@@ -12,9 +12,18 @@ export const startMcpServer = async () => {
|
|
|
12
12
|
|
|
13
13
|
// Fetch the index once on startup
|
|
14
14
|
let index = []
|
|
15
|
-
const searchIndexUrl = 'https://temba.bouwe.io/
|
|
15
|
+
const searchIndexUrl = 'https://temba.bouwe.io/search_index.json'
|
|
16
16
|
try {
|
|
17
17
|
const response = await fetch(searchIndexUrl)
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
throw new Error(`HTTP ${response.status} ${response.statusText}`)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const contentType = response.headers.get('content-type') || ''
|
|
23
|
+
if (!contentType.includes('application/json')) {
|
|
24
|
+
throw new Error(`Expected JSON, received ${contentType || 'unknown content type'}`)
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
index = await response.json()
|
|
19
28
|
} catch (e) {
|
|
20
29
|
console.error('Failed to fetch ' + searchIndexUrl, e)
|
package/package.json
CHANGED
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.1.
|
|
1
|
+
export const version = '0.1.3'
|