Buckets:
Streamable HTTP and Hosted MCP Deployment
This document covers local/self-hosted Streamable HTTP and the production anonymous data-only Hosted MCP.
Production service
Canonical endpoint:
https://mcp.aiworkstation.cn/mcp
Current contract:
anonymous
read-only / non-destructive / idempotent
9 public Radar data/evidence tools
no OAuth or bearer token
no Premium, checkout, credits or server-model tool
The host model performs reasoning. AI Workstation serves public Radar
data/evidence, and requirement selection keeps use_model=false.
The current v0.3.3 production deployment was verified on 2026-08-29 with:
source/runtime commit:
c2786c4e58ffd391b8424d0ad67987d7c2ffe564
GHCR digest:
sha256:cdbabe5a707e72d83529d81fb084113a91e03a948c7a39d75c6180e8075d08bd
The deployed container reported healthy with zero restarts at validation time.
English and Chinese remote smoke tests, nine-tool discovery, a real search,
runtime/OCI identity, gateway policy, Host rejection and loopback isolation all
passed. The canonical constraint workflow was also checked directly: a valid
enterprise Chinese RAG request preserved three hard requirements plus separate
low-code and no-code preferences, while an ambiguous required deployment value
failed locally with INVALID_INPUT. This is a deployment record, not a
perpetual uptime guarantee.
The immediate rollback target is the previous v0.3.2 image digest
sha256:6b1d3244d0040f51c4089371e1b00bb6ef0c0418ba3792b5517fb085c4381e48.
Its exact Compose override and the older rollback snapshots are retained. The
v0.3.3 deployment snapshot is
/opt/aiworkstation-osi/.deploy-backups/20260828T182845Z-v0.3.3.
Production topology
MCP client
|
| HTTPS
v
Nginx: TLS + Host/path policy + abuse controls
|
| host loopback only
v
127.0.0.1:8001 -> Hosted MCP container:8000
|
v
public AI Open Source Radar APIs
The dedicated hostname proxies only /mcp; unrelated paths return 404.
HTTP redirects to HTTPS, invalid Host values are rejected, and the container
port is not published on a public interface.
Current anonymous gateway controls:
short window: 60 requests/minute/IP, burst 30
sustained: 10 requests/minute/IP, burst 300
connections: 10/IP
body size: 256 KB
The gateway policy response identifies itself as:
X-OSI-Hosted-Gateway-Policy: tls-ip-rate-limited
The production vhost writes privacy-minimized service metrics to
/var/log/nginx/osi-mcp.access.log. Records contain only timestamp, HTTP
status, total request duration and upstream response duration; they omit client
IP, query string, referrer, User-Agent and request body. The host's Nginx
logrotate policy rotates logs daily and retains 14 rotations. Operators should
review status counts, p50/p95 latency, 429, 5xx, upstream failures and
container restart count at least daily during External Alpha.
The first validation-traffic baseline is recorded in
production-monitoring-baseline.md. Its
small sample had no 429, no 5xx, no Nginx error-log records and zero
container restarts. It is evidence that monitoring works, not evidence that the
anonymous thresholds are correctly tuned for real users.
The public Compose configuration bounds privacy-minimized application telemetry
to five 10 MiB Docker json-file logs. This limit was applied on 2026-08-12 as
a configuration-only container recreation while retaining the exact verified
image digest and rollback record; post-recreation English and Chinese smoke
both passed. These limits prevent an idle or degraded service from consuming
unbounded host storage; they do not replace the Nginx service metrics or an
incident owner.
These controls fit the current public, read-only, no-account product. If a future release adds private data, member features or server inference, it must introduce a separately reviewed identity, authorization, quota and privacy design rather than silently changing this endpoint's semantics.
Local Streamable HTTP defaults
OSI_MCP_HTTP_HOST=127.0.0.1
OSI_MCP_HTTP_PORT=8000
OSI_MCP_HTTP_MAX_REQUEST_BODY_BYTES=262144
OSI_PROVIDER=mock
This opens a loopback-only endpoint and performs no live Radar reads unless
OSI_PROVIDER=http is selected explicitly.
Run locally:
python -m pip install -e ".[mcp]"
OSI_PROVIDER=mock osi-mcp-http
Connect to:
http://127.0.0.1:8000/mcp
Non-loopback self-hosted mode
Binding to 0.0.0.0, a LAN address or a non-loopback hostname is rejected
unless all of these are configured:
OSI_PROVIDER=http
OSI_MCP_HTTP_PUBLIC_BIND_ACK=reverse-proxy-or-private-network
AIWORKSTATION_RADAR_BASE_URL=https://aiworkstation.cn
OSI_MCP_HTTP_ALLOWED_HOSTS=mcp.example.com,mcp.example.com:*
The live Radar origin must be allow-listed HTTPS with no embedded credentials, query, fragment, path or non-standard public port.
OSI_MCP_HTTP_ALLOWED_HOSTS is explicit DNS-rebinding/Host-header protection.
For browser clients, also set exact HTTPS origins with
OSI_MCP_HTTP_ALLOWED_ORIGINS. Keep the origin list empty for non-browser-only
deployments.
The public-bind acknowledgement is an operator assertion, not authentication. Self-hosted operators remain responsible for TLS, network access, rate limits, logging, incident response and local policy.
Validate configuration without opening a socket
osi-mcp-http --check-config
A non-loopback configuration fails before server construction if the acknowledgement, provider, Radar origin or Host allowlist is missing or invalid.
The request-body value must remain between 16 KiB and 1 MiB. A reverse proxy should impose its own request/header limits as defense in depth.
Container build and production candidate identity
Build an exact candidate image:
docker build \
--build-arg OSI_IMAGE_COMMIT="$(git rev-parse HEAD)" \
-t aiworkstation-osi-mcp:0.3.3 .
Validate the public-hosted example:
docker compose -f compose.public-hosted.example.yml config
Production must set the same exact 40-character commit for
OSI_IMAGE_COMMIT and OSI_RELEASE_COMMIT. The image runs as non-root with a
read-only filesystem, bounded tmpfs, dropped capabilities and
no-new-privileges.
Do not expose the container directly to the Internet or bake credentials into the image.
Remote validation
The read-only smoke client requires HTTPS for non-local endpoints and rejects URLs containing usernames, passwords, query strings or fragments.
osi-remote-smoke \
--url https://mcp.aiworkstation.cn/mcp
osi-remote-smoke \
--url https://mcp.aiworkstation.cn/mcp \
--invoke-search \
--locale en
osi-remote-smoke \
--url https://mcp.aiworkstation.cn/mcp \
--invoke-search \
--locale zh
A production acceptance must also verify:
- exact
serverInfo.versioncommit; - OCI revision,
OSI_IMAGE_COMMITandOSI_RELEASE_COMMITequality; - exactly nine tools and correct annotations;
- no Premium/OAuth/server-model tool;
- gateway header, HTTPS redirect and non-MCP
404behavior; - public port isolation and invalid Host rejection;
- container health/restart count and rollback readiness.
osi-readiness --require-hosted-alpha retains its historical field name. Its
output is candidate-bound evidence; it does not replace platform review,
real-user Alpha results, operational monitoring or incident ownership.
Current remaining release work
Runtime deployment is complete. Remaining work is product/distribution work:
- align service-specific Privacy/Terms/support copy with actual Hosted data handling;
- establish an error/latency/429 monitoring baseline and review anonymous abuse thresholds with real traffic;
- complete fresh-install Skill + Hosted MCP acceptance with external testers;
- verify publisher identity and submit the combined public plugin;
- retain an explicit rollback owner and procedure for every future runtime deployment.
For the initial production monitoring baseline, record the observation window and use the dedicated metrics log rather than raw prompts or client identity. An empty or very small sample is valid evidence of low traffic, not evidence that the threshold is correctly tuned. Keep the current abuse thresholds until real traffic demonstrates a concrete false-positive or capacity problem.
Xet Storage Details
- Size:
- 8.42 kB
- Xet hash:
- 17d7405d718bfebb6c0688e87870bc7400186286de342fedb7bf3fce7c558ae0
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.