@upassist/neos-mcp 2.1.0 → 2.2.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.2.0](https://github.com/UpAssist/neos-mcp-client/compare/2.1.0...2.2.0) (2026-10-12)
6
+
7
+
8
+ ### Features
9
+
10
+ * document link property values for the write tools ([#4](https://github.com/UpAssist/neos-mcp-client/issues/4)) ([c775e8f](https://github.com/UpAssist/neos-mcp-client/commit/c775e8f314c20b60923f8779ac3acf1e00bf7d48))
11
+
5
12
  ## [2.1.0](https://github.com/UpAssist/neos-mcp-client/compare/2.0.2...2.1.0) (2026-10-08)
6
13
 
7
14
 
package/README.md CHANGED
@@ -144,6 +144,11 @@ Once connected, your AI assistant can use these tools:
144
144
  | `neos_move_node` | Move or reorder a node |
145
145
  | `neos_delete_node` | Remove a node |
146
146
 
147
+ Property values are passed to the bridge unchanged and resolved there against the NodeType's property type:
148
+
149
+ - Image/asset properties: the asset `identifier` (e.g. from `neos_list_assets` or `neos_upload_asset`).
150
+ - Link properties (`Neos\Neos\Domain\Link\Link`, edited with the LinkEditor): a URI string such as `node://<nodeAggregateId>`, `asset://<id>` or `https://…`, or an object `{ "href": "…", "title": "…", "target": "_blank" }`. An empty string clears the link. A `node://` target must exist in the workspace, otherwise the bridge rejects the write. Needs a Neos 9 bridge with Link property support (see the [bridge README](https://github.com/UpAssist/neos-mcp#property-resolution)).
151
+
147
152
  ### Media
148
153
 
149
154
  | Tool | Description |
package/dist/index.js CHANGED
@@ -21201,7 +21201,7 @@ function registerCreateContentNode(server) {
21201
21201
  "Node type name, e.g. UpAssist.Site:Content.Headline"
21202
21202
  ),
21203
21203
  properties: external_exports.record(external_exports.unknown()).default({}).describe(
21204
- "Property key-value pairs to set on the new node. Use neos_list_node_types to see available properties."
21204
+ "Property key-value pairs to set on the new node. Use neos_list_node_types to see available properties. Values are resolved like in neos_update_node_property (asset identifiers, link URIs or { href, \u2026 } objects)."
21205
21205
  ),
21206
21206
  workspace: external_exports.string().default("mcp").describe("Draft workspace name")
21207
21207
  },
@@ -21227,7 +21227,9 @@ function registerUpdateNodeProperty(server) {
21227
21227
  "Node identifier \u2014 use nodeAggregateId (Neos 9) or contextPath/path (Neos 8)"
21228
21228
  ),
21229
21229
  property: external_exports.string().describe("Property name to update"),
21230
- value: external_exports.unknown().describe("New property value (string, number, boolean, or object)"),
21230
+ value: external_exports.unknown().describe(
21231
+ 'New property value (string, number, boolean, or object). Image/asset properties: the asset identifier. Link properties (type Neos\\Neos\\Domain\\Link\\Link): a URI string such as "node://<nodeAggregateId>", "asset://<id>" or "https://\u2026", or an object { href, title?, target?, rel?, download? }; an empty string clears the link. A node:// target must exist in the workspace (check with neos_list_pages), otherwise the write is rejected.'
21232
+ ),
21231
21233
  workspace: external_exports.string().default("mcp").describe("Workspace to write to")
21232
21234
  },
21233
21235
  async ({ node_id, property, value, workspace }) => {
@@ -21289,7 +21291,7 @@ function registerCreateDocumentNode(server) {
21289
21291
  "Document node type name, e.g. UpAssist.Site:Document.Page"
21290
21292
  ),
21291
21293
  properties: external_exports.record(external_exports.unknown()).default({}).describe(
21292
- 'Property key-value pairs, e.g. { title: "About us", uriPathSegment: "about-us" }'
21294
+ 'Property key-value pairs, e.g. { title: "About us", uriPathSegment: "about-us" }. Values are resolved like in neos_update_node_property (asset identifiers, link URIs or { href, \u2026 } objects).'
21293
21295
  ),
21294
21296
  workspace: external_exports.string().default("mcp").describe("Draft workspace name"),
21295
21297
  node_name: external_exports.string().optional().describe(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upassist/neos-mcp",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "MCP server for Neos CMS — connects AI assistants to any UpAssist.Neos.Mcp bridge",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -14,7 +14,8 @@ export function registerCreateContentNode(server: McpServer): void {
14
14
  'Node type name, e.g. UpAssist.Site:Content.Headline'
15
15
  ),
16
16
  properties: z.record(z.unknown()).default({}).describe(
17
- 'Property key-value pairs to set on the new node. Use neos_list_node_types to see available properties.'
17
+ 'Property key-value pairs to set on the new node. Use neos_list_node_types to see available properties. ' +
18
+ 'Values are resolved like in neos_update_node_property (asset identifiers, link URIs or { href, … } objects).'
18
19
  ),
19
20
  workspace: z.string().default('mcp').describe('Draft workspace name'),
20
21
  },
@@ -16,7 +16,8 @@ export function registerCreateDocumentNode(server: McpServer): void {
16
16
  'Document node type name, e.g. UpAssist.Site:Document.Page'
17
17
  ),
18
18
  properties: z.record(z.unknown()).default({}).describe(
19
- 'Property key-value pairs, e.g. { title: "About us", uriPathSegment: "about-us" }'
19
+ 'Property key-value pairs, e.g. { title: "About us", uriPathSegment: "about-us" }. ' +
20
+ 'Values are resolved like in neos_update_node_property (asset identifiers, link URIs or { href, … } objects).'
20
21
  ),
21
22
  workspace: z.string().default('mcp').describe('Draft workspace name'),
22
23
  node_name: z.string().optional().describe(
@@ -11,7 +11,12 @@ export function registerUpdateNodeProperty(server: McpServer): void {
11
11
  'Node identifier — use nodeAggregateId (Neos 9) or contextPath/path (Neos 8)'
12
12
  ),
13
13
  property: z.string().describe('Property name to update'),
14
- value: z.unknown().describe('New property value (string, number, boolean, or object)'),
14
+ value: z.unknown().describe(
15
+ 'New property value (string, number, boolean, or object). Image/asset properties: the asset identifier. ' +
16
+ 'Link properties (type Neos\\Neos\\Domain\\Link\\Link): a URI string such as "node://<nodeAggregateId>", "asset://<id>" or "https://…", ' +
17
+ 'or an object { href, title?, target?, rel?, download? }; an empty string clears the link. ' +
18
+ 'A node:// target must exist in the workspace (check with neos_list_pages), otherwise the write is rejected.'
19
+ ),
15
20
  workspace: z.string().default('mcp').describe('Workspace to write to'),
16
21
  },
17
22
  async ({ node_id, property, value, workspace }) => {
@@ -0,0 +1,86 @@
1
+ import { test, before, after, beforeEach } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+
4
+ import './support/env.js';
5
+ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
6
+ import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
7
+ import { createServer } from '../src/server.js';
8
+ import { setApiVersion } from '../src/bridge.js';
9
+
10
+ type Call = { url: string; body: any };
11
+
12
+ const realFetch = globalThis.fetch;
13
+ let calls: Call[] = [];
14
+ let client: Client;
15
+
16
+ /** Records bridge calls; the bridge resolves link values, so the client must pass them through untouched. */
17
+ function mockFetch() {
18
+ globalThis.fetch = (async (input: any, init: any = {}) => {
19
+ calls.push({ url: String(input), body: init.body ? JSON.parse(init.body) : undefined });
20
+ return new Response(JSON.stringify({ success: true }), {
21
+ status: 200,
22
+ headers: { 'content-type': 'application/json' },
23
+ });
24
+ }) as typeof fetch;
25
+ }
26
+
27
+ before(async () => {
28
+ setApiVersion(2);
29
+ const server = createServer();
30
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
31
+ client = new Client({ name: 'test', version: '0.0.0' });
32
+ await Promise.all([server.connect(serverTransport), client.connect(clientTransport)]);
33
+ });
34
+
35
+ after(() => {
36
+ globalThis.fetch = realFetch;
37
+ });
38
+
39
+ beforeEach(() => {
40
+ calls = [];
41
+ mockFetch();
42
+ });
43
+
44
+ test('neos_update_node_property: a link URI string is sent as is', async () => {
45
+ const result = await client.callTool({
46
+ name: 'neos_update_node_property',
47
+ arguments: { node_id: 'n1', property: 'linkObject', value: 'node://target-id' },
48
+ });
49
+ assert.notEqual(result.isError, true);
50
+
51
+ assert.equal(calls.length, 1);
52
+ assert.equal(calls[0].url, 'http://bridge.test/neos/mcp/updateNodeProperty');
53
+ assert.equal(calls[0].body.nodeAggregateId, 'n1');
54
+ assert.equal(calls[0].body.value, 'node://target-id');
55
+ });
56
+
57
+ test('neos_update_node_property: a link object is sent as a JSON object, not stringified', async () => {
58
+ const link = { href: 'node://target-id', title: 'Zur Seite', target: '_blank' };
59
+ const result = await client.callTool({
60
+ name: 'neos_update_node_property',
61
+ arguments: { node_id: 'n1', property: 'linkObject', value: link },
62
+ });
63
+ assert.notEqual(result.isError, true);
64
+
65
+ assert.deepEqual(calls[0].body.value, link);
66
+ });
67
+
68
+ test('neos_create_content_node: link objects inside properties are sent unchanged', async () => {
69
+ const properties = { title: '<h2>Teaser</h2>', linkObject: { href: 'https://example.org', target: '_blank' } };
70
+ const result = await client.callTool({
71
+ name: 'neos_create_content_node',
72
+ arguments: { parent_id: 'p1', node_type: 'Vendor.Site:Content.Teaser', properties },
73
+ });
74
+ assert.notEqual(result.isError, true);
75
+
76
+ assert.equal(calls[0].url, 'http://bridge.test/neos/mcp/createContentNode');
77
+ assert.deepEqual(calls[0].body.properties, properties);
78
+ });
79
+
80
+ test('the link formats are described on the value parameter', async () => {
81
+ const { tools } = await client.listTools();
82
+ const tool = tools.find((t) => t.name === 'neos_update_node_property');
83
+ const description = (tool?.inputSchema.properties as any)?.value?.description ?? '';
84
+ assert.match(description, /node:\/\//);
85
+ assert.match(description, /href/);
86
+ });