Skip to content

Commit e9dbadd

Browse files
committed
metamcp: make endpoint transport optional (schema + create path); do not send transport when omitted; bump to 0.1.27
1 parent 5901810 commit e9dbadd

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
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.26
5+
version: 0.1.27
66
appVersion: "latest"
77
icon: https://icoretech.github.io/helm/charts/metamcp/logo.png
88
keywords:

charts/metamcp/scripts/provision.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,18 +364,22 @@ def ensure_namespace(name, description=None):
364364
except Exception:
365365
pass
366366

367-
def create_endpoint(name, nsref, transport='SSE', extra=None, description=None, update_existing=True):
367+
def create_endpoint(name, nsref, transport=None, extra=None, description=None, update_existing=True):
368368
lr = trpc_get('/trpc/frontend/frontend.namespaces.list?input=%7B%7D')
369369
nid = None
370370
if lr.ok:
371371
for ns in lr.json().get('result',{}).get('data',{}).get('data',[]):
372372
if ns.get('uuid') == nsref or ns.get('name') == nsref:
373373
nid = ns.get('uuid'); break
374374
if not nid: return
375-
# normalize transport
376-
tr = (transport or 'SSE').upper()
377-
if tr in ('SSE','STREAMABLE'):
378-
tr = 'SSE' if tr=='SSE' else 'STREAMABLE_HTTP'
375+
# normalize transport if provided (MetaMCP serves both; transport optional)
376+
tr = None
377+
if transport:
378+
t = (transport or '').upper()
379+
if t in ('SSE','STREAMABLE'):
380+
tr = 'SSE' if t=='SSE' else 'STREAMABLE_HTTP'
381+
elif t in ('STREAMABLE_HTTP',):
382+
tr = t
379383
# find existing endpoint by name
380384
el = trpc_get('/trpc/frontend/frontend.endpoints.list?input=%7B%7D')
381385
e_uuid = None
@@ -403,7 +407,9 @@ def create_endpoint(name, nsref, transport='SSE', extra=None, description=None,
403407
log(f"endpoint updated: {name}")
404408
else:
405409
# create new endpoint
406-
body = {'name': name,'namespaceUuid': nid,'transport': tr}
410+
body = {'name': name,'namespaceUuid': nid}
411+
if tr:
412+
body['transport'] = tr
407413
body.update(flags)
408414
r = trpc_post('/trpc/frontend/frontend.endpoints.create', body)
409415
if r.ok: log(f"endpoint created: {name} ({tr})")

charts/metamcp/values.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
"type": "array",
200200
"items": {
201201
"type": "object",
202-
"required": ["name", "namespace", "transport"],
202+
"required": ["name", "namespace"],
203203
"properties": {
204204
"name": { "type": "string" },
205205
"namespace": { "type": "string" },

0 commit comments

Comments
 (0)