Skip to content

Commit 69f025d

Browse files
committed
fix(metamcp/provision): call namespaces.update with ?batch=1 and input {"0": {...}} to align with UI (mcpServerUuids); bump 0.1.9
1 parent a1ab3bb commit 69f025d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

charts/metamcp/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: metamcp
33
description: MetaMCP aggregator Helm chart for Kubernetes
44
type: application
5-
version: 0.1.8
5+
version: 0.1.9
66
appVersion: "latest"
77
icon: https://icoretech.github.io/helm/charts/metamcp/logo.png
88
keywords:

charts/metamcp/scripts/provision.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def trpc_post(path, body):
9393
return sess.post(f"{BACKEND}{path}", headers={'Content-Type':'application/json','Host': SVC}, json=body, timeout=12)
9494
def trpc_get(path):
9595
return sess.get(f"{BACKEND}{path}", headers={'Host': SVC}, timeout=12)
96+
def trpc_post_batch(path, body):
97+
# Wrap body as {"0": body} and use ?batch=1 to match UI routes
98+
return sess.post(f"{BACKEND}{path}?batch=1", headers={'Content-Type':'application/json','Host': SVC}, json={"0": body}, timeout=12)
9699

97100
# Map existing servers
98101
srv_map = {}
@@ -211,7 +214,7 @@ def ensure_namespace(name, description=None):
211214
payload = {'uuid': nid, 'name': name, 'mcpServerUuids': srv_ids}
212215
if desc:
213216
payload['description'] = desc
214-
trpc_post('/trpc/frontend/frontend.namespaces.update', payload)
217+
trpc_post_batch('/trpc/frontend/frontend.namespaces.update', payload)
215218
except Exception:
216219
pass
217220

0 commit comments

Comments
 (0)