@upassist/neos-mcp 1.0.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 +11 -0
- package/LICENSE +21 -0
- package/README.md +234 -0
- package/dist/index.js +21488 -0
- package/package.json +33 -0
- package/src/bridge.ts +58 -0
- package/src/index.ts +14 -0
- package/src/server.ts +47 -0
- package/src/tools/createContentNode.ts +31 -0
- package/src/tools/createDocumentNode.ts +45 -0
- package/src/tools/deleteNode.ts +21 -0
- package/src/tools/entityCrud.ts +105 -0
- package/src/tools/getDocumentProperties.ts +18 -0
- package/src/tools/getPageContent.ts +18 -0
- package/src/tools/getPreviewUrl.ts +18 -0
- package/src/tools/getSiteContext.ts +14 -0
- package/src/tools/listAssetTags.ts +14 -0
- package/src/tools/listAssets.ts +20 -0
- package/src/tools/listNodeTypes.ts +19 -0
- package/src/tools/listPages.ts +17 -0
- package/src/tools/listPendingChanges.ts +17 -0
- package/src/tools/moveNode.ts +37 -0
- package/src/tools/publishChanges.ts +17 -0
- package/src/tools/restart.ts +13 -0
- package/src/tools/setupWorkspace.ts +14 -0
- package/src/tools/updateNodeProperty.ts +27 -0
- package/src/types.ts +44 -0
- package/tsconfig.json +17 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## 0.2.0 (2026-03-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add getDocumentProperties and restart tools, add release scripts ([f376691](https://github.com/UpAssist/neos-mcp-client/commit/f376691b05ad97fba2b4f8eb7e2eb3352dc0ddd1))
|
|
11
|
+
* initial Neos MCP client ([0343b15](https://github.com/UpAssist/neos-mcp-client/commit/0343b159d70e8a09f6221bb8ca436b78c3eb43d9))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 UpAssist
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# @upassist/neos-mcp
|
|
2
|
+
|
|
3
|
+
**MCP server that connects AI assistants to Neos CMS.** Works with Claude Code, Cursor, and any other tool that supports the [Model Context Protocol](https://modelcontextprotocol.io).
|
|
4
|
+
|
|
5
|
+
This is the client-side component. It runs locally on your machine and translates MCP tool calls into HTTP requests to the [UpAssist.Neos.Mcp](https://github.com/UpAssist/neos-mcp) bridge running inside your Neos installation.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js 18+
|
|
10
|
+
- A Neos CMS instance with [UpAssist.Neos.Mcp](https://github.com/UpAssist/neos-mcp) installed and configured
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
**Via npm (recommended):**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @upassist/neos-mcp
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Or clone from source:**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git clone https://github.com/UpAssist/neos-mcp-client.git ~/Tools/neos-mcp-client
|
|
24
|
+
cd ~/Tools/neos-mcp-client
|
|
25
|
+
npm install
|
|
26
|
+
npm run build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
The MCP server connects to your Neos instance using two environment variables:
|
|
32
|
+
|
|
33
|
+
| Variable | Description | Example |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `NEOS_MCP_URL` | Base URL of the Neos site | `http://localhost:8081` |
|
|
36
|
+
| `NEOS_MCP_TOKEN` | Bearer token (must match `NEOS_MCP_BRIDGE_TOKEN` in Neos `.env`) | `a3f1c9...` |
|
|
37
|
+
|
|
38
|
+
### Generating a token
|
|
39
|
+
|
|
40
|
+
Pick a secure shared secret. The same token goes in two places:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Generate a random token
|
|
44
|
+
openssl rand -hex 32
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
1. **Neos side** — add to your Neos `.env` file as `NEOS_MCP_BRIDGE_TOKEN`
|
|
48
|
+
2. **MCP client side** — add to your editor config as `NEOS_MCP_TOKEN` (see below)
|
|
49
|
+
|
|
50
|
+
### Claude Code
|
|
51
|
+
|
|
52
|
+
**Per project (recommended)** — add a `.mcp.json` to your Neos project root:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"neos-local": {
|
|
58
|
+
"command": "neos-mcp",
|
|
59
|
+
"env": {
|
|
60
|
+
"NEOS_MCP_URL": "http://localhost:8081",
|
|
61
|
+
"NEOS_MCP_TOKEN": "your-token"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
> **Important:** Add `.mcp.json` to `.gitignore` — it contains your token.
|
|
69
|
+
|
|
70
|
+
You can define multiple environments in the same file (e.g. local + production):
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"neos-local": {
|
|
76
|
+
"command": "neos-mcp",
|
|
77
|
+
"env": {
|
|
78
|
+
"NEOS_MCP_URL": "http://localhost:8081",
|
|
79
|
+
"NEOS_MCP_TOKEN": "your-local-token"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"neos-production": {
|
|
83
|
+
"command": "neos-mcp",
|
|
84
|
+
"env": {
|
|
85
|
+
"NEOS_MCP_URL": "https://www.example.com",
|
|
86
|
+
"NEOS_MCP_TOKEN": "your-production-token"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Global (all projects)** — add the same `mcpServers` block to `~/.claude.json`.
|
|
94
|
+
|
|
95
|
+
### Cursor
|
|
96
|
+
|
|
97
|
+
Add to Cursor's MCP settings (Settings > MCP Servers):
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"neos-mcp": {
|
|
102
|
+
"command": "neos-mcp",
|
|
103
|
+
"env": {
|
|
104
|
+
"NEOS_MCP_URL": "http://localhost:8081",
|
|
105
|
+
"NEOS_MCP_TOKEN": "your-token"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Available tools
|
|
112
|
+
|
|
113
|
+
Once connected, your AI assistant can use these tools:
|
|
114
|
+
|
|
115
|
+
### Reading
|
|
116
|
+
|
|
117
|
+
| Tool | Description |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `neos_get_site_context` | Get site structure, node types, and page tree. **Call this first.** |
|
|
120
|
+
| `neos_list_pages` | List all pages in a workspace |
|
|
121
|
+
| `neos_get_page_content` | Get all content nodes on a specific page |
|
|
122
|
+
| `neos_get_document_properties` | Get page-level properties (title, SEO, etc.) |
|
|
123
|
+
| `neos_list_node_types` | List available node types and their properties |
|
|
124
|
+
|
|
125
|
+
### Writing
|
|
126
|
+
|
|
127
|
+
| Tool | Description |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `neos_setup_workspace` | Create the MCP workspace (auto-created on first write) |
|
|
130
|
+
| `neos_update_node_property` | Update a property on an existing node |
|
|
131
|
+
| `neos_create_content_node` | Create a new content element inside a page |
|
|
132
|
+
| `neos_create_document_node` | Create a new page |
|
|
133
|
+
| `neos_move_node` | Move or reorder a node |
|
|
134
|
+
| `neos_delete_node` | Remove a node |
|
|
135
|
+
|
|
136
|
+
### Media
|
|
137
|
+
|
|
138
|
+
| Tool | Description |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `neos_list_assets` | Browse images and files from the Media Manager |
|
|
141
|
+
| `neos_list_asset_tags` | List available asset tags |
|
|
142
|
+
|
|
143
|
+
### Review and publish
|
|
144
|
+
|
|
145
|
+
| Tool | Description |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| `neos_get_preview_url` | Generate a 24-hour preview link (no Neos login needed) |
|
|
148
|
+
| `neos_list_pending_changes` | See what has been changed |
|
|
149
|
+
| `neos_publish_changes` | Publish all changes to live |
|
|
150
|
+
|
|
151
|
+
### Entity management
|
|
152
|
+
|
|
153
|
+
If the Neos installation exposes custom Doctrine entities (see [bridge documentation](https://github.com/UpAssist/neos-mcp#entity-crud-advanced)), these tools are also available:
|
|
154
|
+
|
|
155
|
+
| Tool | Description |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| `neos_entity_discover` | List all exposed entities with their schemas |
|
|
158
|
+
| `neos_entity_list` | List/filter entities |
|
|
159
|
+
| `neos_entity_show` | Get a single entity by UUID |
|
|
160
|
+
| `neos_entity_create` | Create a new entity |
|
|
161
|
+
| `neos_entity_update` | Update entity properties |
|
|
162
|
+
| `neos_entity_delete` | Delete an entity |
|
|
163
|
+
| `neos_entity_action` | Run a named action (publish, archive, etc.) |
|
|
164
|
+
|
|
165
|
+
## How it works
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
AI Assistant (Claude Code, Cursor, etc.)
|
|
169
|
+
|
|
|
170
|
+
| MCP protocol (stdio)
|
|
171
|
+
|
|
|
172
|
+
@upassist/neos-mcp <-- this package
|
|
173
|
+
|
|
|
174
|
+
| HTTP + Bearer token
|
|
175
|
+
|
|
|
176
|
+
UpAssist.Neos.Mcp bridge (Neos CMS)
|
|
177
|
+
|
|
|
178
|
+
| ContentRepository API
|
|
179
|
+
|
|
|
180
|
+
Neos CMS database (mcp workspace -> live)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
1. Your AI assistant communicates with this MCP server via stdio
|
|
184
|
+
2. Each tool call is translated into an HTTP request to the Neos bridge
|
|
185
|
+
3. All write operations go to a staging workspace (not directly to live)
|
|
186
|
+
4. Changes can be previewed via generated URLs before publishing
|
|
187
|
+
5. Publishing requires an explicit call — the AI never auto-publishes
|
|
188
|
+
|
|
189
|
+
## Development
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# Run in dev mode (hot reload via tsx)
|
|
193
|
+
npm run dev
|
|
194
|
+
|
|
195
|
+
# Type check
|
|
196
|
+
npm run typecheck
|
|
197
|
+
|
|
198
|
+
# Build for production
|
|
199
|
+
npm run build
|
|
200
|
+
|
|
201
|
+
# Run built version
|
|
202
|
+
npm start
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Adding a new tool
|
|
206
|
+
|
|
207
|
+
1. Create a file in `src/tools/` (e.g. `myNewTool.ts`)
|
|
208
|
+
2. Export a register function that calls `server.tool()` with name, description, Zod schema, and handler
|
|
209
|
+
3. Use `callBridge()` to make the HTTP request to the Neos bridge
|
|
210
|
+
4. Import and call the register function in `src/server.ts`
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
214
|
+
import { z } from 'zod';
|
|
215
|
+
import { callBridge } from '../bridge.js';
|
|
216
|
+
|
|
217
|
+
export function registerMyNewTool(server: McpServer): void {
|
|
218
|
+
server.tool(
|
|
219
|
+
'neos_my_new_tool',
|
|
220
|
+
'Description of what this tool does',
|
|
221
|
+
{
|
|
222
|
+
some_param: z.string().describe('What this parameter does'),
|
|
223
|
+
},
|
|
224
|
+
async ({ some_param }) => {
|
|
225
|
+
const data = await callBridge('myNewAction', 'POST', { someParam: some_param });
|
|
226
|
+
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
MIT
|