AI Router · CLI · MCPCheapest eligible quotes before you create
informational · awareness

stdio MCP for a local generation bridge

Explain local process transport while making clear the generation itself still runs in the cloud.

Connect OfflineCreator with OAuth
FAQ interlock

stdio MCP questions

These answers separate the local stdio process from cloud generation, state what the bare package exposes, and preserve the implementation limits that matter when the process reads a local file or exits during a request.

Does stdio mean image generation runs locally?

No. stdio is the local subprocess transport between the MCP client and the package. The published package sends authenticated Studio API requests, and OfflineCreator states that Studio generation runs through disclosed cloud providers rather than on-device.

Does the bare stdio server hide tools based on API-key scopes?

No. In the published 0.1.2 entry point, the bare stdio invocation passes no scopes option. The server treats absent or empty scopes as allowing registration, so that path exposes all nine package tools instead of filtering the local registry from API-key scopes.

Does OFFLINECREATOR_UPLOAD_ROOT prevent every symlink escape?

No. The package lexically compares the resolved path with the configured root and validates the opened file, but it does not resolve symlinks with realpath before open. An in-root symlink can therefore point outside the intended tree; this boundary was found by code inspection and was not execution-tested.

Is retrying safe after the stdio process exits during generation?

The MCP 2026-07-28 specification now states the protocol is stateless and that in-flight requests are simply lost on unexpected termination, so the client can retry against a fresh process. However, this protocol-level safety does not guarantee application-level idempotency: the inspected package does not declare an idempotency key for POST /api/v1/generations, meaning Studio may or may not have accepted the job before the process exited.

Canonical plate

Canonical ownership and consolidation rule

The canonical owner is /learn/stdio-mcp. This page owns the narrow query \u201cstdio mcp image generation\u201d: the local subprocess transport, the published package tool bridge, the cloud provider path, and the security limits specific to local filePath handling.

Do not broaden this page into the general MCP image-generation definition, the full hosted Streamable HTTP guide, or a standalone OAuth tutorial. If the page can no longer maintain current, source-backed package architecture and provider-path evidence, consolidate its useful material into /learn/mcp-image-generation-learning-center instead of preserving a thin duplicate.

Tool rack

Tools exposed by the stdio bridge

The current 0.1.2 package implements nine tools for model discovery, credit reading, generation creation, image input, job status and waiting, output retrieval, cancellation, and recent jobs. Their handlers call StudioApiClient, which maps those actions to authenticated /api/v1 requests. This tool rack is the package architecture: MCP supplies the local callable interface, while Studio supplies the remote job service.

Tool failures are returned as MCP error results. A StudioApiError contributes its message, HTTP status, and response details. A wait that reaches its deadline fetches the latest job state and marks the result timedOut instead of labeling the job completed or failed. Top-up discovery and Checkout creation are CLI or API features, not MCP tools; their documented result is a URL for a person to open rather than an agent-side payment action.

list_models and get_credits
Input: no tool argumentsOutput: the current model catalog with costs, or the account credit balance.
generate
Input: modelId, prompt, optional ratio and waitOutput: initial generation data or a polled status result.
upload_input
Input: generationId plus filePath or base64The filePath check is lexical; it does not resolve symlinks before opening the file.
get_generation, wait_generation, download_output
Input: generationIdOutput: current or waited status, or a completed generation's short-lived output URL.
Human boundary
Top-up Checkout stays outside MCPThe CLI or API may return a browser URL; the MCP tool set does not charge a payment method.
Transport switch

Choose the transport in the documented preference order

OfflineCreator currently recommends its hosted Streamable HTTP endpoint with OAuth. Local stdio is the API-key fallback for a client that can launch a command, and a legacy remote endpoint with an Authorization header is another API-key fallback for clients that support fixed headers. The three paths are alternatives; adding stdio does not make local execution the preferred connection or move generation onto the device.

With stdio, the MCP client launches the package as a subprocess and exchanges one newline-delimited JSON-RPC message per line over stdin and stdout. That transport has no HTTP header layer, so the package receives its API key through process configuration and uses it on subsequent Studio API requests. The 2026-07-28 specification confirms the wire format works unchanged over any reliable bidirectional byte stream, and custom transports built on such streams should reuse the same framing.

1. Recommended
Hosted Streamable HTTP with OAuthConnect to the documented remote MCP URL and complete browser authorization.
2. Local fallback
stdio with OFFLINECREATOR_API_KEYUse when the client can launch npx and hold the key in secret process configuration.
3. Legacy remote fallback
Remote URL with Authorization headerUse only in a client that supports fixed secret headers; never place the key in the URL.
OAuth sequence

Trace the recommended remote OAuth connection

The local stdio fallback does not perform this OAuth sequence; it starts with an API key in process configuration. The sequence here belongs to the recommended hosted endpoint. Its protected-resource metadata names the authorization server, advertises models, read, and generate scopes, and identifies bearer headers as the supported bearer method.

The authorization-server metadata publishes authorization, token, registration, and revocation endpoints, supports the authorization-code and refresh-token grants, and advertises S256 PKCE. OfflineCreator's product page instructs the user to connect, complete Studio browser sign-in and consent, and revoke the connection later from Settings.

Discover
Read protected-resource and authorization-server metadataResolve the authorization server, endpoints, supported scopes, grants, and S256 PKCE.
Consent
Complete Studio browser authorizationThe user signs in and approves the requested connection and scopes.
Exchange and refresh
Use the token endpointThe metadata supports authorization_code and refresh_token grants.
Revoke
Disconnect from Studio SettingsThe product page documents revocation, and metadata publishes a revocation endpoint.
Related circuit

Return to the learning center for the parent explanation of image-generation tools and resources. Read the Streamable HTTP page for the adjacent hosted transport. Use the OAuth and PKCE page as the narrower next action when you are ready to connect through the recommended remote path.