Pick your client
Every client gets the same tools. Setup differs because slide bytes travel from the client to storage, and some clients restrict outbound network access.Claude Code and the Strand AI SDK
Claude Code runs on your own machine, so it can send slide bytes to storage without extra configuration./mcp in Claude Code, authorize with your Strand AI account, and pick the
organization this connection may act on. The authorized session supports
upload, inference, and result access.
The Python SDK and REST API connect directly
without an MCP connector. Use them for scripted or bulk uploads.
Claude web and desktop apps
These steps cover claude.ai in a browser and the Claude desktop app.1
Add the connector
In Claude, add a custom connector with the server URL
https://mcp.strandai.com/mcp over the Streamable HTTP transport.2
Authorize with Strand AI
Claude opens Strand AI’s sign-in and consent screen. Sign in with your Strand AI
account and approve the requested scopes.
3
Choose an organization
Pick the Strand AI organization this connection may act on. The connection is
bound to that organization and to your user, and jobs are billed to that
organization’s credits.
4
Allow uploads to reach storage (upload prerequisite)
Before your first upload, open your organization’s “Settings → Capabilities →
Allow network egress” and add
storage.googleapis.com. This setting applies
to the organization, so an administrator must change it on team and
enterprise plans. Start a new chat after changing the setting. An open
conversation retains its original sandbox configuration.Claude sends slide bytes to storage from its sandbox. Until the host is
allowed, uploads fail with host_not_allowed; the other tools continue to
work. The setting is required once per organization. Claude Code and the
Strand AI SDK run on your machine and do not require it.Why storage.googleapis.com is required. Slides are sent directly from
the client to the Google Cloud Storage bucket for your organization’s data.
Transfer bytes bypass the conversational model context and MCP transport;
Lattice still processes the stored slide to generate predictions. Each
presigned session is restricted to one object in your organization’s storage
and cannot be redirected.Authorization
The remote Strand MCP server accepts either an OAuth 2.1 access token or an existing Strand API key in theAuthorization: Bearer <credential> header.
Claude Code and the Claude web and desktop apps use OAuth 2.1 with PKCE. An
OAuth connection is scoped to one organization and acts as you. Strand AI
re-checks its grant, scopes, organization membership, and object ownership on
every request, and uses short-lived access tokens. Review or revoke an OAuth
connection from Settings → Connected
Apps.
For clients that supply their own bearer credential, create an API key in
Settings → API keys. The key is
bound to that organization and attributed to the user who created it. It has
full authority across all ten MCP tools, including operations that spend the
organization’s credits.
Strand revalidates the key on every MCP introspection and REST request. A key
with a configured expiry stops working at that time. Rotate a key by creating a
replacement, updating the client, and revoking the old key in Settings → API
keys. Revocation takes effect on
the next request.
Remote file transfer
Upload and download bytes bypass the conversational model context and MCP transport. Lattice still processes stored slide data to generate predictions:- Upload:
upload_sampleimmediately creates the owned sample and a presigned, resumable transfer (an upload id, upload URL, and structured transfer/network/processing metadata) bound to your organization’s storage. The upload id is the sample id used byget_sampleandsubmit_job. A client that can make HTTP requests sends the slide bytes directly to that URL. GCS starts ingest preprocessing automatically when GCS commits the final PUT. Usesubmit_jobwithdry_run: truefor the retryable readiness check. Automated de-identification is off by default and runs during ingest only when enabled for your organization. Clients with a restricted sandbox must allow the upload host,storage.googleapis.com. For a multi-GB slide, or to avoid the egress step entirely, upload in your browser at app.strandai.com/samples/upload instead. Browser upload runs independently from MCP upload sessions. Discover its resulting owned sample withlist_samplesorget_sample. For scripted or bulk uploads, use the Python SDK or REST API, which stream slides for you. - Download:
download_resultstakes the format you want.ome-zarrreturns links to the stored result without conversion, so it is ready as soon as the job completes.ome-zarr-zipandome-tiffare generated on demand: the first call starts the export and reportspendingorrunning, and repeating the call polls it until a short-lived signed link appears. A large slide can take several minutes to render. You retrieve the bytes from storage yourself.include_original_upload: trueinstead requests the separate stored source file, not processed H&E. The option defaults tofalse, is runtime-gated, and is currently disabled in production. The source can be multi-GB; if ingest de-identification ran, the stored de-identified copy is returned. Its private bearer URL expires after 15 minutes. Anyone holding it can download the source until expiry, so do not share it.
Available tools
Read-only tools can run without a per-call prompt. Tools that write or spend ask you to confirm in Claude.list_samples defaults to active, non-trashed samples owned by the selected
organization. It can instead list the curated public cohort or combine both,
with owned items first and deduplicated. Every item has a canonical id and an
ownership discriminator. get_sample accepts either kind of ID; owned detail
includes up to its 50 newest jobs plus an uncapped count, while public detail
contains only curated public fields. Use get_job for one exact known job of
any age. Reads do not spend credits.
Sample results include a canonical absolute app_url. Use this value instead
of constructing a URL from the sample ID.
update_sample updates the requested name, unified field values, or isotropic
MPP calibration. Field values are keyed by stable key; fields.tags is the
complete desired Tags set, not a delta. Public is read-only. segment_sample starts or retries cell segmentation on an owned,
ready sample. It reserves no credits, reuses completed or in-flight work, and
leaves public samples untouched. submit_job with dry_run: true creates no
job and reserves no credits. Without that flag it reserves the estimate and
starts inference. Completion settles and debits delivered work, then releases
any unused reservation. Eligible cancellation releases the reservation.
get_job makes one status request and returns immediately. A nonterminal
response does not schedule another check or wake the conversation. Call it again
only when you ask or return. Host schedulers may poll outside the model transcript.
Example prompts
- Upload my de-identified H&E slide to Strand AI, dry-run a CD3e, CD8, and Ki67 prediction, show me the credit estimate, and ask before submitting it.
- Read sample
SAMPLE_IDand summarize its job history. Read jobJOB_ID; if it is complete, give me the OME-Zarr ZIP download link. - Update sample
SAMPLE_IDto 0.5 microns per pixel and setfields.tagstocohort-aandsite-2, then dry-run CD45 and CD3e before asking me to submit.
Troubleshooting
- Upload fails with
host_not_allowed: on claude.ai, addstorage.googleapis.comunder your organization’s “Settings → Capabilities → Allow network egress”, then start a new chat and retry. An already-open conversation keeps the sandbox it started with, so the change does not reach it. The upload session stays valid. - Authorization fails: reconnect Strand AI and select an organization where your account is still a member.
- Your existing connector shows the wrong scopes or permissions: delete the connector and add it again. Reconnecting reuses the registration Claude already holds, so only removing the connector forces a fresh one.
- Upload remains
not_ready: keep the returnedupload_idand retrysubmit_jobwithdry_run: trueafter its suggested interval. If the upload reportsupload_failed, create a newupload_samplesession and re-send the complete file. The Python SDK handles this readiness wait for you. - Insufficient credits on submit: choose a funded organization, or ask its Strand AI administrator to add credits.
- Result link expired: ask Claude to run
download_resultsagain with the same format. Signed links are short-lived. The server reuses a cached export instead of rendering it again. - An export stays
pendingorrunning:ome-zarr-zipandome-tiffare rendered on demand and a large slide takes minutes. Ask Claude to check again. For the fastest path, requestome-zarr, which does not require conversion.