One Connector, N Tenants: A Multi-Tenant Hosting Architecture for the Model Context Protocol with Per-Product Audience Binding

Abstract Large language model (LLM) hosts — Claude, ChatGPT, Mistral, and emerging open hosts — deliver tool-result content to users through a small set of fixed modalities: streaming text, static images, hand-coded interactive widgets, and (more recently) static inline iframes via the SEP-1865 MCP Apps extension. We identify a missing modality: streaming, auto-generated, interactive HTML that fills in live in the chat area as the model produces it. We present two compositional techniques that together provide this modality without requiring any change to LLM host code, and without writing per-endpoint UI: Auto-generated UI from JSON shape detection — a server-side engine reads a configuration declaring "wrap these N REST endpoints as Claude tools", and at each tool call fetches the endpoint, classifies the JSON response shape, selects a renderer (KPI grid / horizontal bar chart / SVG sparkline / data table / definition list / fallback), produces a self-contained HTML document, writes it to a temporary buffer, and returns the ui:// resource URI for the host to fetch and render in an inline sandboxed iframe. No UI code is written for any specific endpoint. Streaming HTML into the chat area via partial-input subscription — the host's existing ontoolinputpartial SDK callback delivers progressively-healed partial JSON of the tool arguments to the iframe view code. View code subscribes, reads the html argument on each frame, and assigns it to iframe.srcdoc at a 60-millisecond throttle. The result is a fill-in-live preview in the chat area, completing approximately 200–500 milliseconds before the tool call itself has returned. We characterise the design space these techniques open, present a six-shape JSON classifier and matching server-side HTML renderers, describe a working reference implementation deployed against a multi-tenant MCP platform behind a single Cloudflare tunnel, and identify three immediate UX consequences: (a) conversational interfaces can now display real-time visualisations of any REST API without per-endpoint UI investment, (b) the perceived latency of tool calls drops because users see useful output before the tool returns, and (c) the same primitive supports generated dashboards, drafted documents, and exploratory data views — categories that previously required either custom host code or post-hoc text-to-image rendering. We discuss the empirical envelope (bundle size, throttle range, shape-detection accuracy), the security model (CSP sandboxing on the iframe), and the spec contributions we propose to formalise the pattern. This paper is a companion to the architectural work One Connector, N Tenants [16] which describes the multi-tenant MCP hosting platform on which this UI primitive runs. The reference implementation is available under CC BY 4.0 (see Appendix A).

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-05-22
DOI
https://doi.org/10.5281/zenodo.20335337
Primary Topic
Artificial Intelligence in Healthcare and Education
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

One Connector, N Tenants: A Multi-Tenant Hosting Architecture for the Model Context Protocol with Per-Product Audience Binding

Arindam Chakraborty
Zenodo (CERN European Organization for Nuclear Research)
Artificial Intelligence in Healthcare and Education
article

One Connector, N Tenants: A Multi-Tenant Hosting Architecture for the Model Context Protocol with Per-Product Audience Binding

Arindam Chakraborty
article en

Abstract

Abstract Large language model (LLM) hosts — Claude, ChatGPT, Mistral, and emerging open hosts — deliver tool-result content to users through a small set of fixed modalities: streaming text, static images, hand-coded interactive widgets, and (more recently) static inline iframes via the SEP-1865 MCP Apps extension. We identify a missing modality: streaming, auto-generated, interactive HTML that fills in live in the chat area as the model produces it. We present two compositional techniques that together provide this modality without requiring any change to LLM host code, and without writing per-endpoint UI: Auto-generated UI from JSON shape detection — a server-side engine reads a configuration declaring "wrap these N REST endpoints as Claude tools", and at each tool call fetches the endpoint, classifies the JSON response shape, selects a renderer (KPI grid / horizontal bar chart / SVG sparkline / data table / definition list / fallback), produces a self-contained HTML document, writes it to a temporary buffer, and returns the ui:// resource URI for the host to fetch and render in an inline sandboxed iframe. No UI code is written for any specific endpoint. Streaming HTML into the chat area via partial-input subscription — the host's existing ontoolinputpartial SDK callback delivers progressively-healed partial JSON of the tool arguments to the iframe view code. View code subscribes, reads the html argument on each frame, and assigns it to iframe.srcdoc at a 60-millisecond throttle. The result is a fill-in-live preview in the chat area, completing approximately 200–500 milliseconds before the tool call itself has returned. We characterise the design space these techniques open, present a six-shape JSON classifier and matching server-side HTML renderers, describe a working reference implementation deployed against a multi-tenant MCP platform behind a single Cloudflare tunnel, and identify three immediate UX consequences: (a) conversational interfaces can now display real-time visualisations of any REST API without per-endpoint UI investment, (b) the perceived latency of tool calls drops because users see useful output before the tool returns, and (c) the same primitive supports generated dashboards, drafted documents, and exploratory data views — categories that previously required either custom host code or post-hoc text-to-image rendering. We discuss the empirical envelope (bundle size, throttle range, shape-detection accuracy), the security model (CSP sandboxing on the iframe), and the spec contributions we propose to formalise the pattern. This paper is a companion to the architectural work One Connector, N Tenants [16] which describes the multi-tenant MCP hosting platform on which this UI primitive runs. The reference implementation is available under CC BY 4.0 (see Appendix A).

Zenodo (CERN European Organization for Nuclear Research)
Hunter New England Local Health District (AU)
Openalex Percentile: Top 9%
Artificial Intelligence in Healthcare and Education
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.