Skip to main content

Configuration & API Reference

Quick-reference guide to core configuration specs, runtime environment variables, OAuth callback allowlists, publishing limits, and the MCP Apps (2026-01-26) protocol methods, container matrix, request budgets, and error codes for Qoder's open ecosystem.

1. Core Files & Directory Conventions

Extension TypeRequired FilesCommon Optional Files / DirectoriesSpecification
SkillSKILL.md (YAML frontmatter with name, description)references/, scripts/, assets/Skill Specification
Plugin.qoder-plugin/plugin.json (also supports .claude-plugin/plugin.json, with the former taking precedence).mcp.json (or mcp.json), skills/, commands/, agents/, hooks/hooks.json, local server artifacts, README.mdPlugin Specification
App Plugin (with UI)Same as Plugin + MCP Server & ui:// HTML resourcesskills/, icon data URLs, CSP & host extension configsProtocol & Host Capabilities
ConnectorPublic HTTPS MCP Server URL + OAuth 2.0No ZIP upload requiredConnector Specification

Built-in Runtime Variables (.mcp.json)

VariableDescription
${QODER_PLUGIN_ROOT} (legacy alias: ${CLAUDE_PLUGIN_ROOT})Absolute path to the installed Plugin root directory (never hardcode local machine paths)
${QODER_NODE_RUNTIME}Path to the Qoder host's built-in Node.js executable (recommended for local Node stdio MCP servers)

OAuth 2.0 Callback Allowlist (Global)

ScenarioExact Callback URL (character-for-character match)
Production integration and current test publishing page authorizationhttps://mcp.qoder.com/api/mcp/oauth_callback
Dedicated test pipelinehttps://mcp-test.qoder.ai/api/mcp/oauth_callback

2. Publishing Center Asset & Package Limits

ItemFormat & Hard Limit
Extension ZIP package (Plugin / Skill).zip, ≤ 20 MB per package; Plugin root must contain .qoder-plugin/plugin.json directly
Extension iconPNG / JPG / GIF / WebP / SVG, ≤ 1 MB
Showcase screenshotsUp to 6 images, 16:9 aspect ratio, 640×360–3840×2160, ≤ 1 MB each
Self-test report documentsPDF / DOCX / Markdown, up to 10 files, ≤ 20 MB each
Publisher avatar / logoJPG / PNG, ≤ 100 KB (for review use only)
Publisher bio / contact phoneBio ≤ 128 characters; country code + local digits 7–15 digits total

3. App Plugins (MCP Apps 2026-01-26) Protocol Reference

1. Protocol Methods & Container Support Matrix

Method / NotificationSDK Call or Raw Messageinline Cardfullscreen Standalone ViewPrerequisites / Notes
ui/initialize / ui/notifications/initializedapp.connect()SupportedSupportedRegister the message listener before handshaking
ui/notifications/tool-input / tool-result / tool-cancelledapp.ontoolresult, etc.SupportedSupportedRender tool-result directly on first paint without re-running the entry tool
ui/notifications/host-context-changedapp.onhostcontextchangedSupportedSupportedIncremental updates for theme, dimensions, route, and model context
tools/callapp.callServerTool({ name, arguments })SupportedSupportedRestricted to App-visible tools on the same Server
resources/list / resources/readStandard MCP resource methodsSupportedSupportedRestricted to the same Server
ui/messageapp.sendMessage({ role, content, _meta })Subject to session capabilitySubject to session capabilityrole must be "user"; returns {} on success
ui/update-model-contextapp.updateModelContext({ content, structuredContent })Subject to session capabilitySubject to session capabilityPass {} or { content: [] } to withdraw context
ui/open-linkapp.openLink({ url })SupportedSupportedCheck openLinks capability and isError
ui/request-display-modeapp.requestDisplayMode(...)Returns current modeReturns current modeDoes not migrate containers in place
ui/notifications/size-changedRaw notification { height }SupportedN/Ainline only; report positive integer height
ui/download-fileapp.downloadFile({ contents }, options)SupportedSupportedReturns { isError: true } if user cancels
ui/resource-teardownRespond {} to cleanup requestSupportedSupportedRelease listeners, timers, and pending requests
ui/notifications/request-teardownApp requests host to close viewNot supportedSupportedStandalone view only
qoder/files/open / pick / subscribe-dropRaw requestsSubject to capabilitySubject to capabilityCheck experimental["qoder/files"] and sub-flags
ping / sandbox-proxy-readyKeepalive & sandbox readinessSupportedSupportedping returns {} on success
prompts/get / sampling/createMessage / resources/templates/list—Not supportedNot supportedExplicitly unsupported

2. Available hostContext Fields

FieldDescription
theme"light" / "dark"
displayMode / availableDisplayModesCurrent active container mode and available modes
containerDimensions{ maxWidth, maxHeight } layout bounds
locale / timeZone / platformUI locale, timezone, and platform ("desktop")
deviceCapabilities{ touch, hover }
qoder/deepLink{ url: "/your/route" } (object, not a bare string)
qoder/modelContextAccepted context (including updateId); null once withdrawn
hostContext does not provide: host color CSS variables, safe-area insets, chat sessionId, cwd, workspace name, or execution host type (for reading session metadata, see Protocol & Host Capabilities).

3. Budgets & Size Limits

KiB / MiB are binary units; the 20,000,000 HTML limit is in decimal bytes. Layered budgets apply simultaneously.
TargetLimit / Constraint
UI HTML payloadDecoded UTF-8 ≤ 20,000,000 bytes; MIME must be text/html;profile=mcp-app
Tool resourceUri≤ 8,192 chars (ui:// + hostname; no credentials or control characters)
Entry tool icons data URL≤ 65,536 chars (PNG / JPEG / WebP / GIF)
Entry tool titleRecommended ≤ 8 Chinese chars / ≤ 15 English chars (layout guidance)
ui/message total request / single text block≤ 2 MiB / ≤ 64 KiB
Model context (per entry / per instance / per session)≤ 128 KiB / ≤ 2 MiB / ≤ 8 MiB; titles and group names exceeding 512 chars are truncated
Shared in-flight host request budget2 per App instance / 32 global (shared across state, messages, context, and file open)
State & context subscription limits256 each for instance state and session context subscriptions; context concurrent reads 2 / timeout 30s
Local file pickerExtensions: 1–16 lowercase alphanumeric chars (no leading dot); up to 16 files per batch
File downloads & concurrencyUp to 8 files / 16 MiB decoded total per batch; 1 per window / 4 global; SDK default timeout 60s
Resource response / standalone view envelope4 MiB / 5 MiB (includes JSON and base64 overhead; also constrains downloads)
Host settings form (qoder/settings)Up to 64 fields / 128 layout items / 16 groups; pattern ≤ 512 chars; concurrency 16 global, 2 per Server, timeout 30s
App deep link / session navigation sessionIdDeep link total length ≤ 32,768; sessionId length 1–128 ([a-zA-Z0-9_-])

4. App Plugin Error Codes

Error CodeMeaningRecommended Handling
MCP_APP_SESSION_REVOKEDInstance closed or origin access revokedStop sending requests on this instance; prompt user to reopen or re-authorize
MCP_APP_SESSION_EXPIREDView instance expired / releasedDo not reuse the old instance; guide user to reopen
MCP_APP_SERVER_UNAVAILABLEMCP Server temporarily unavailableCheck server status; once recovered, run a read-only refresh first
MCP_APP_TOOL_NOT_ALLOWEDTool is not visible to App, crosses Servers, or is ambiguousVerify Server ownership, tools/list, and _meta.ui.visibility
MCP_APP_READ_ONLY_TOOL_REQUIREDEntry tool must be read-onlyRemove side effects and set annotations.readOnlyHint: true
MCP_APP_HOST_REQUEST_LIMITShared in-flight host request budget exceededQueue, throttle, and coalesce redundant requests
MCP_APP_CONTEXT_BUSYConcurrent model context read/write limit exceededSerialize context updates and reduce update frequency
MCP_APP_CONTEXT_SNAPSHOT_CHANGEDContext changed concurrently while message send was frozenRe-verify latest context and session before deciding whether to resend
MCP_APP_FILE_OPEN_UNAVAILABLEFile-open capability unavailable or invalid pathVerify capability flag, absolute path, and regular-file readability
MCP_APP_RESOURCE_MIME_TYPE_INVALIDInvalid HTML resource MIME typeSet MIME type strictly to text/html;profile=mcp-app
MCP_APP_RESOURCE_TOO_LARGEHTML exceeds 20,000,000 bytesTrim bundle size and inline assets
MCP_APP_RESOURCE_MISMATCHDeclared resourceUri does not match resources/read resultKeep URI identical character-for-character between tool definition and resources/read
MCP_APP_RESOURCE_CONTENT_INVALIDUI resource content is not valid HTMLReturn a local HTML shell instead of a raw remote URL
MCP_APP_HOST_WATCH_LIMITState/context subscription limit exceededClean up redundant listeners and stale instance subscriptions