@prontosite/mcp 0.4.0 → 0.5.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 +7 -0
- package/README.md +1 -0
- package/api.mjs +15 -0
- package/index.mjs +21 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
Alle nennenswerten Änderungen am MCP-Server für ProntoSite. Der Server ist ein dünner Client um die
|
|
4
4
|
ProntoSite Deploy-API; die eigentliche Logik lebt serverseitig.
|
|
5
5
|
|
|
6
|
+
## 0.5.0 – 2026-09-20
|
|
7
|
+
|
|
8
|
+
- **Neu: `site_legal_options`** – Anzeige-Optionen der Rechtstext-Widgets je Rolle (impressum/datenschutz):
|
|
9
|
+
`showTitle` (Überschrift), `showDate` (Stand-Datum), `draftNotice` (Entwurfs-Hinweis in der Live-Ausgabe).
|
|
10
|
+
Ohne `impressum`/`datenschutz` nur lesen; sonst Teil-Update. `draftNotice:false` blendet den Entwurfs-Hinweis
|
|
11
|
+
live aus (protokolliert) – Bestätigung empfohlen. Serverseitig: `GET/PUT /api/legal-options/<site>`.
|
|
12
|
+
|
|
6
13
|
## 0.4.0 – 2026-09-20
|
|
7
14
|
|
|
8
15
|
- **Neu: `site_company_get`** – Firmendaten (Impressum/Footer) einer Website lesen (effektiver Stand +
|
package/README.md
CHANGED
|
@@ -88,6 +88,7 @@ sichern: `cp ~/.prontosite.json ~/.prontosite.json.bak`).
|
|
|
88
88
|
| `site_publish({ site? })` | Aktuellen Stand erneut veröffentlichen. **Schreibend.** |
|
|
89
89
|
| `site_company_get({ site? })` | Firmendaten (Impressum/Footer) lesen. **Lesend.** |
|
|
90
90
|
| `site_company_set({ site?, company, siteOverride? })` | Firmendaten setzen/ergänzen (Teil-Update); füllen Impressum/Datenschutz beim Deploy. **Schreibend.** |
|
|
91
|
+
| `site_legal_options({ site?, impressum?, datenschutz? })` | Anzeige-Optionen der Rechtstexte (showTitle, showDate, draftNotice); ohne Rolle nur lesen. **Schreibend.** |
|
|
91
92
|
|
|
92
93
|
`site_deploy` und `site_publish` sind **schreibende** Aktionen (verändern die Live-Website). Die
|
|
93
94
|
Tool-Beschreibungen weisen den Assistenten an, vorher rückzufragen. Jeder Aufruf wird serverseitig auditiert.
|
package/api.mjs
CHANGED
|
@@ -162,6 +162,21 @@ export async function apiCompanySet(cfg, { site, company, siteOverride = false }
|
|
|
162
162
|
return asJson(res);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/** GET/PUT /api/legal-options/<site> – Anzeige-Optionen der Rechtstext-Widgets. Ohne impressum/datenschutz
|
|
166
|
+
* nur LESEN; sonst Teil-Update (nur echte Booleans wirken). */
|
|
167
|
+
export async function apiLegalOptions(cfg, { site, impressum, datenschutz } = {}, fetchImpl = fetch) {
|
|
168
|
+
const { token, slug } = resolveTarget(cfg, site);
|
|
169
|
+
const endpoint = `${baseUrl(cfg)}/legal-options/${encodeURIComponent(slug)}`;
|
|
170
|
+
if (impressum === undefined && datenschutz === undefined) {
|
|
171
|
+
return asJson(await fetchImpl(endpoint, { headers: authHeaders(token) }));
|
|
172
|
+
}
|
|
173
|
+
const body = {};
|
|
174
|
+
if (impressum !== undefined) body.impressum = impressum;
|
|
175
|
+
if (datenschutz !== undefined) body.datenschutz = datenschutz;
|
|
176
|
+
const res = await fetchImpl(endpoint, { method: "PUT", headers: { ...authHeaders(token), "content-type": "application/json" }, body: JSON.stringify(body) });
|
|
177
|
+
return asJson(res);
|
|
178
|
+
}
|
|
179
|
+
|
|
165
180
|
/** Alle erreichbaren Sites auflisten (Slug, Plan, Publish-Bedarf, letzte Änderung). Bei einer sites-Map wird
|
|
166
181
|
* jeder Eintrag per Status abgefragt; sonst die eine konfigurierte Site. Fehler je Site werden mitgeführt. */
|
|
167
182
|
export async function sitesList(cfg, fetchImpl = fetch) {
|
package/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
13
|
import { z } from "zod";
|
|
14
|
-
import { loadConfig, apiStatus, apiExport, apiDeploy, apiPublish, sitesList, apiCompanyGet, apiCompanySet } from "./api.mjs";
|
|
14
|
+
import { loadConfig, apiStatus, apiExport, apiDeploy, apiPublish, sitesList, apiCompanyGet, apiCompanySet, apiLegalOptions } from "./api.mjs";
|
|
15
15
|
|
|
16
16
|
const cfg = loadConfig();
|
|
17
17
|
const server = new McpServer({ name: "prontosite", version: "0.3.1" });
|
|
@@ -126,5 +126,25 @@ server.tool(
|
|
|
126
126
|
}
|
|
127
127
|
);
|
|
128
128
|
|
|
129
|
+
const legalOptShape = z.object({
|
|
130
|
+
showTitle: z.boolean().optional().describe("Überschrift (H1) des Rechtstextes anzeigen (Default an)."),
|
|
131
|
+
showDate: z.boolean().optional().describe("Stand-Datum anzeigen (Default an; nur wo vorhanden, i. d. R. Datenschutz)."),
|
|
132
|
+
draftNotice: z.boolean().optional().describe("Entwurfs-Hinweis in der VERÖFFENTLICHTEN Seite anzeigen (Default an)."),
|
|
133
|
+
}).describe("Anzeige-Optionen einer Rechtstext-Rolle – Teil-Update, nur gesetzte Booleans wirken.");
|
|
134
|
+
|
|
135
|
+
server.tool(
|
|
136
|
+
"site_legal_options",
|
|
137
|
+
"LESEND/SCHREIBEND: Anzeige-Optionen der Rechtstext-Widgets je Rolle (impressum/datenschutz): showTitle "
|
|
138
|
+
+ "(Überschrift), showDate (Stand-Datum), draftNotice (Entwurfs-Hinweis in der Live-Ausgabe). OHNE impressum/"
|
|
139
|
+
+ "datenschutz nur LESEN. Teil-Update (nur gesetzte Felder). HINWEIS: draftNotice:false blendet den rechtlich "
|
|
140
|
+
+ "empfohlenen Entwurfs-Hinweis live aus (protokolliert) – bitte vorher bestätigen lassen.",
|
|
141
|
+
{ site: z.string().optional().describe(SITE_DESC),
|
|
142
|
+
impressum: legalOptShape.optional(),
|
|
143
|
+
datenschutz: legalOptShape.optional() },
|
|
144
|
+
async ({ site, impressum, datenschutz }) => {
|
|
145
|
+
try { return asText(await apiLegalOptions(cfg, { site, impressum, datenschutz })); } catch (e) { return asError(e); }
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
|
|
129
149
|
const transport = new StdioServerTransport();
|
|
130
150
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prontosite/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "MCP-Server für ProntoSite – Website-Status, Export, Deploy und Veröffentlichen direkt aus einem KI-Assistenten (Claude Desktop). Dünner Client um die ProntoSite Deploy-API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "prontosite-mcp": "index.mjs" },
|