@kontent-ai/mcp-server 0.21.1 → 0.21.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/README.md CHANGED
@@ -25,6 +25,10 @@ Kontent.ai MCP Server implements the Model Context Protocol to connect your Kont
25
25
  - [⚙️ Configuration](#️-configuration)
26
26
  - [🚀 Transport Options](#-transport-options)
27
27
  - [💻 Development](#-development)
28
+ - [🛠 Local Installation](#-local-installation)
29
+ - [📂 Project Structure](#-project-structure)
30
+ - [🔍 Debugging](#-debugging)
31
+ - [📦 Release Process](#-release-process)
28
32
  - [License](#license)
29
33
 
30
34
  ## 🔌 Quickstart
@@ -332,6 +336,16 @@ npx @modelcontextprotocol/inspector
332
336
 
333
337
  This provides a web interface for inspecting and testing the available tools.
334
338
 
339
+ ### 📦 Release Process
340
+
341
+ To release a new version:
342
+
343
+ 1. Bump the version using `npm version [patch|minor|major]` - this updates `package.json`, `package-lock.json`, and syncs to `server.json`
344
+ 2. Push the commit to your branch and create a pull request
345
+ 3. Merge the pull request
346
+ 4. Create a new GitHub release with the version number as both name and tag, using auto-generated release notes
347
+ 5. Publishing the release triggers an automated workflow that publishes to npm and GitHub MCP registry
348
+
335
349
  ## License
336
350
 
337
351
  MIT
@@ -4,6 +4,12 @@ import { searchOperationSchema } from "../schemas/searchOperationSchemas.js";
4
4
  import { handleMcpToolError } from "../utils/errorHandler.js";
5
5
  import { createMcpToolSuccessResponse } from "../utils/responseHelper.js";
6
6
  import { throwError } from "../utils/throwError.js";
7
+ class OperationResultIncompleteError extends Error {
8
+ constructor() {
9
+ super("AI operation result is incomplete");
10
+ this.name = "OperationResultIncompleteError";
11
+ }
12
+ }
7
13
  export const registerTool = (server) => {
8
14
  server.tool("search-variants-mapi", `AI-powered semantic search for finding Kontent.ai content by meaning, concepts, themes, and content similarity in a specific language variant. This tool uses vector database and AI to enable searching by meaning and similarity rather than exact keyword matching.
9
15
 
@@ -83,11 +89,17 @@ export const registerTool = (server) => {
83
89
  .get()
84
90
  .withAction(`projects/${environmentId}/early-access/ai-operation-result/${operationId}`)
85
91
  .toPromise();
86
- return pollResponse.data;
92
+ const [response] = pollResponse.data;
93
+ if (response.type === "cumulated-result-v1" &&
94
+ !response.result?.isFinished) {
95
+ throw new OperationResultIncompleteError();
96
+ }
97
+ return response;
87
98
  }
88
99
  catch (error) {
89
- if (error?.response?.status === 404) {
90
- throw new Error("Operation result not available yet. Retrying.");
100
+ if (error?.response?.status === 404 ||
101
+ error instanceof OperationResultIncompleteError) {
102
+ throw error;
91
103
  }
92
104
  throw new AbortError(error);
93
105
  }
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@kontent-ai/mcp-server",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "build": "rimraf build && tsc",
6
+ "build": "rimraf build && tsc --project scripts/tsconfig.json && tsc",
7
7
  "start:stdio": "node build/bin.js stdio",
8
8
  "start:shttp": "node build/bin.js shttp",
9
9
  "dev:stdio": "tsx watch src/bin.ts stdio",
10
10
  "dev:shttp": "tsx watch src/bin.ts shttp",
11
- "format": "cross-env node node_modules/@biomejs/biome/bin/biome ci ./",
12
- "format:fix": "cross-env node node_modules/@biomejs/biome/bin/biome check ./ --fix --unsafe"
11
+ "format": "cross-env biome ci",
12
+ "format:fix": "cross-env biome check --fix --unsafe",
13
+ "sync-version": "node --experimental-strip-types scripts/syncVersion.ts",
14
+ "version": "npm run sync-version sync && npm run format:fix -- server.json && git add server.json"
13
15
  },
14
16
  "bin": {
15
17
  "@kontent-ai/mcp-server": "./build/bin.js"