# Unoic Labs MCP

Endpoint: https://labs-mcp.unoic.com/mcp

An independent Cloudflare Worker with a private SQLite Durable Object namespace and dedicated publishing/dead-letter queues. It does not call Studio's MCP, Supabase, or AI providers.

## Connection

Use a trusted native MCP client or your portal backend with Streamable HTTP and an Authorization: Bearer <UNOIC_LABS_TOKEN> header. Keep the credential in secret storage. Never put it into a browser bundle, iframe, URL, or public page. The first release uses a dedicated bearer credential, with no OAuth or authenticator-app enrollment. OAuth-only connector UIs need a compatible trusted bridge; adding the URL alone does not configure those clients.

The SDK negotiates protocols through 2025-11-25; the 2026-07-28 protocol is not implemented. Initialize before tools/list or tools/call. Name this server unoic-labs so agents distinguish it from any Studio connection.

## Tools

| Tool | Behavior |
|---|---|
| get_capabilities | Exact Labs capabilities, connection permissions and limits |
| search_resources | Paginated discovery of all 51 resources; limit 1–50, nextOffset pagination |
| get_resource | Resource metadata, hosted link and parameter contract |
| calculate_molar_mass | Neutral formula to g/mol and elemental contributions |
| balance_equation | Separate reactants and products, molecular atom conservation |
| check_solubility | Qualitative classroom solubility prediction |
| run_experiment | Configured Ohm's law or small-angle pendulum readings |
| create_lab | Durable job publishing an unlisted configured lab |
| get_job | Poll this connection's job and retrieve its finished artifact |
| get_artifact | Retrieve this connection's active lab URL and iframe HTML |

Discovery, calculators and execution require catalog:read. Publishing and publication retrieval require labs:create. The dedicated Unoic Labs connection has both permissions. There are no Studio tools or content grants.

## Scope of release

All 51 resources (7 tools, 7 standalone labs and 37 workbench lessons) are discoverable. Most return hosted links and do not support configured execution or publishing. Only lesson-l01 and lesson-l07 support run_experiment and create_lab. The linked Labs website retains its own hosting/login policy. Private learner sessions are not exposed.

Chemistry accepts neutral formulas, at most 128 characters, nesting depth 8 and 10,000 atoms. Equations are limited to 512 characters per side, 8 species total and 16 elements. Charges, isotopes and ionic/redox balancing are unsupported. Solubility predictions do not include temperature, concentration or Ksp.

Ohm's law: voltageV 0–24 and resistanceOhm 1–10000, defaults 6 and 100. Ideal DC model, no heating. Pendulum: lengthM 0.1–5, gravityMps2 1–20, releaseAngleRad 1–10 degrees expressed in radians. Defaults 1 m, 9.81 m/s² and pi/36 radians. Analytic small-angle model, no drag.

Execution durationS is 0–60 (default 0), sampleIntervalS is 1/60–60 (default 0.1), both exact multiples of 1/60 second, at most 601 samples. Outputs include SI values, units, readings, diagnostics and model assumptions.

## Publish and embed

Call create_lab with a unique idempotencyKey and parameters. Example tool arguments:

{
  "idempotencyKey": "portal-ohm-001",
  "parameters": {
    "resourceId": "lesson-l01",
    "configuration": {"voltageV": 12, "resistanceOhm": 100},
    "title": "Ohm's law"
  }
}

Poll get_job with the returned jobId every few seconds until ready or failed. Review the returned reviewStatus and warnings, then use artifact.url or artifact.embedHtml verbatim. The artifact lab field records its versions, initial configuration and initial readings. Preview resources are available at ui://unoic-labs/preview.html for MCP Apps-compatible hosts.

An iframe works across portal origins without an MCP credential. Anyone holding an unlisted publication URL can open it while active. Player adjustments stay in that browser; Reset restores the published configuration. Cross-origin browser calls to MCP are not enabled. Use a portal backend for tool calls.

## Limits and retries

Two queued/running publishing jobs and 60 admitted lab jobs per rolling hour across this Labs service; individual connection limit 0–60/hour. 120 MCP requests per connection per fixed UTC minute. No Studio quotas or queue slots are used.

Retry an uncertain create_lab request with the SAME key and parameters. A changed request using the same key returns IDEMPOTENCY_CONFLICT. Quota/concurrency rejection admits no job; QUEUE_UNAVAILABLE means a job was saved and the same retry or recovery scheduler will enqueue it. Failed jobs count toward the hourly admission limit.

Errors use isError: true with error.code, message and retryable. Unsupported tools return UNKNOWN_TOOL. Tokens from Studio are invalid here.

## Operator controls

This first release is operated through the dedicated Cloudflare deployment and local scripts, not Studio's connection manager. Disable publishing or pause the connection to permanently withdraw its existing links. Re-enabling permits new publications, without restoring old links. Rotating the bearer also permanently withdraws prior links. Monotonic configuration revisions prevent an old deployment from restoring removed access.
