Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.
TypeScript ai-photo-editorcomfyui-alternativegenerative-fillimage-editingimage-generationinpaintinglinuxlocal-aimacosmcpmcp-servernano-banana-alternativeofflinephoto-editorprivacyqwen-imageqwen-image-2-1stable-diffusion-cppvulkanwindows
fix(mcp): version from mcp/package.json, kept equal to the app's (#6)
Gabriele Lozuponef26e122b04c6
diff --git a/docs/releasing.md b/docs/releasing.mdindex 2ce9625..9a08a7c 100644--- a/docs/releasing.md+++ b/docs/releasing.md@@ -29,7 +29,9 @@ How to publish a version that installed copies update to, on Windows and macOS.1. **Bump the version** in `src-tauri/tauri.conf.json`, `Cargo.toml` (workspace) and`package.json`, all to the same value. The updater only offers versions *higher* than the- installed one.+ installed one. Also bump the MCP server: `cd mcp && npm version <x.y.z> --no-git-tag-version`,+ then both `"version"` fields in `mcp/server.json` (`npm test` in `mcp/` fails until all match;+ `kokon-mcp --version` reads `mcp/package.json`).2. **Windows:** `powershell -ExecutionPolicy Bypass -File scripts\build-release.ps1`3. **Mac:** `bash scripts/build-release-mac.sh`. Then copy `dist-release/` from the Mac to thePC (or the other way around) so that one folder holds both platforms' files.@@ -52,6 +54,10 @@ How to publish a version that installed copies update to, on Windows and macOS.1. Copy its files and its `updater-<platform>.json` into the same `dist-release/`.2. Run the manifest step again.3. Upload with `gh release upload v0.9.1 <files> dist-release/latest.json --clobber`.+7. **MCP server** (after the GitHub release is out): `cd mcp && npm publish` (runs the build and+ tests first), then `mcp-publisher login github` and `mcp-publisher publish` from `mcp/` so the+ MCP Registry lists the new version. Glama (https://glama.ai/mcp/servers/GabrieleLozupone/kokon)+ indexes the GitHub repo by itself; check the listing a day later.## Testing an updatediff --git a/mcp/package-lock.json b/mcp/package-lock.jsonindex 2d05d76..b10c57f 100644--- a/mcp/package-lock.json+++ b/mcp/package-lock.json@@ -1,12 +1,12 @@{"name": "qls-mcp",- "version": "1.0.0",+ "version": "0.9.3","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "qls-mcp",- "version": "1.0.0",+ "version": "0.9.3","dependencies": {"@modelcontextprotocol/sdk": "^1.32.1","zod": "^4.6.5"diff --git a/mcp/package.json b/mcp/package.jsonindex 2d3f82a..427876a 100644--- a/mcp/package.json+++ b/mcp/package.json@@ -1,10 +1,20 @@{"name": "kokon-mcp",- "version": "0.9.1",+ "version": "0.9.3","mcpName": "io.github.GabrieleLozupone/kokon","license": "AGPL-3.0-only","description": "MCP server for Kokon: generate and edit images offline with Qwen-Image 2.1 on your own GPU. Requires the Kokon desktop app (Windows/macOS).",- "keywords": ["mcp", "mcp-server", "model-context-protocol", "image-generation", "image-editing", "qwen-image", "local", "offline", "kokon"],+ "keywords": [+ "mcp",+ "mcp-server",+ "model-context-protocol",+ "image-generation",+ "image-editing",+ "qwen-image",+ "local",+ "offline",+ "kokon"+ ],"author": "Gabriele Lozupone","homepage": "https://kokon.app","bugs": "https://github.com/GabrieleLozupone/kokon/issues",diff --git a/mcp/server.json b/mcp/server.jsonindex 4ac78be..a2e7d32 100644--- a/mcp/server.json+++ b/mcp/server.json@@ -3,7 +3,7 @@"name": "io.github.GabrieleLozupone/kokon","title": "Kokon","description": "Generate and edit images offline with Qwen-Image 2.1 on your GPU. Needs the Kokon desktop app.",- "version": "0.9.1",+ "version": "0.9.3","websiteUrl": "https://kokon.app","repository": {"url": "https://github.com/GabrieleLozupone/kokon",@@ -22,7 +22,7 @@"registryType": "npm","registryBaseUrl": "https://registry.npmjs.org","identifier": "kokon-mcp",- "version": "0.9.1",+ "version": "0.9.3","runtimeHint": "npx","transport": { "type": "stdio" },"environmentVariables": [diff --git a/mcp/src/index.ts b/mcp/src/index.tsindex ddaab54..a3f4cfd 100644--- a/mcp/src/index.ts+++ b/mcp/src/index.ts@@ -6,8 +6,10 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";import { handlers, schemas, toErrorResult, type ToolContext, type ToolResult } from "./tools.js";import { ServiceClient } from "./service.js";+import pkg from "../package.json" with { type: "json" };-const VERSION = "0.9.1";+// Bundled in by esbuild: the one place to bump is package.json (see docs/releasing.md).+const VERSION = pkg.version;const DESCRIPTIONS: Record<keyof typeof schemas, { title: string; description: string }> = {generate_image: {diff --git a/mcp/test/version.test.ts b/mcp/test/version.test.tsnew file mode 100644index 0000000..ed92ea0--- /dev/null+++ b/mcp/test/version.test.ts@@ -0,0 +1,15 @@+import { readFileSync } from "node:fs";+import { describe, expect, it } from "vitest";++const json = (p: string) => JSON.parse(readFileSync(new URL(p, import.meta.url), "utf8"));++// kokon-mcp ships with the app (sidecar), on npm and in the MCP Registry under one version.+describe("version", () => {+ it("matches the app and the registry entry", () => {+ const mcp = json("../package.json").version;+ expect(mcp).toBe(json("../../package.json").version);+ const server = json("../server.json");+ expect(server.version).toBe(mcp);+ expect(server.packages[0].version).toBe(mcp);+ });+});diff --git a/mcp/tsconfig.json b/mcp/tsconfig.jsonindex f067b92..78973ff 100644--- a/mcp/tsconfig.json+++ b/mcp/tsconfig.json@@ -4,6 +4,7 @@"module": "NodeNext","moduleResolution": "NodeNext","strict": true,+ "resolveJsonModule": true,"skipLibCheck": true,"noEmit": true,"types": ["node"]