strand-mcp
MCP server for the Strand Platform. Exposes upload / estimate / predict / job-lifecycle as MCP tools so any agent (Claude Code, Cursor, etc.) can run H&E → spatial-proteomics inference end-to-end.
Install
pip install strand-mcp
Or from this repo:
cd sdks/mcp-server
pip install -e .
Auth
Generate an API key at https://app.strandai.com/settings/api-keys and export it:
export STRAND_API_KEY=sk-strand-...
The server also reads STRAND_BASE_URL (defaults to https://app.strandai.com) if you need to point at staging.
The hosted service uses Strand OAuth instead of STRAND_API_KEY. Its
Streamable HTTP endpoint validates an opaque, audience-bound access token via
the platform's workload-authenticated introspection endpoint, then forwards that
user token through the SDK. The platform alone can invoke Hydra's private admin
service; the public MCP workload cannot. The remote catalog
mirrors all nine stdio capabilities. upload_slide returns a secure browser
handoff instead of accepting a Cloud Run filesystem path; both download tools
return short-lived signed artifact links. The stdio catalog below is unchanged.
Operator entry point: strand-mcp-http. Required settings are
STRAND_MCP_RESOURCE_URL, STRAND_OAUTH_ISSUER_URL,
STRAND_OAUTH_INTROSPECTION_URL (the platform's narrow internal endpoint), and in
Cloud Run STRAND_OAUTH_INTROSPECTION_AUDIENCE. Host/origin allowlists use
STRAND_MCP_ALLOWED_HOSTS and STRAND_MCP_ALLOWED_ORIGINS.
Wire into Claude Code
Add to ~/.claude/mcp.json (or your project's .mcp.json):
{
"mcpServers": {
"strand": {
"command": "strand-mcp",
"env": {
"STRAND_API_KEY": "sk-strand-..."
}
}
}
}
Then in Claude Code you can ask things like:
Upload
~/slides/biopsy.svsto Strand, run prediction for CD3, CD8, and Ki67, wait for the job, and download results into~/results/.
Claude calls the tools in sequence — no glue code needed.
Tools
| Tool | Purpose |
|---|---|
upload_slide |
Upload a local WSI; returns upload_id + dimensions |
estimate_run |
Patch count + credit cost for a (upload_id, markers) pair |
set_sample_mpp |
Set user-reported slide microns per pixel before inference |
submit_run |
Kick off a Lattice inference job; returns job_id |
get_job |
Point-in-time status snapshot |
cancel_job |
Cancel an in-flight job and refund its reserved credits |
wait_for_job |
Block until terminal state (uses SSE under the hood) |
download_results |
Pull OME-Zarr results into a local directory |
download_ome_tiff |
Render and download a completed job as a single OME-TIFF file |
Smoke test
STRAND_API_KEY=sk-strand-... strand-mcp
The server listens on stdio and waits for an MCP client to attach.
Dev
cd sdks/mcp-server
pip install -e ".[dev]" || pip install -e .
python -m strand_mcp
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strand_mcp-0.2.0.tar.gz.
File metadata
- Download URL: strand_mcp-0.2.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51b1cb847d1e25a169f649559a1e1edcdd6f27c742bbe977a60bc6fca23e2a45
|
|
| MD5 |
08303811b5e8eaf096bce9b01158f30b
|
|
| BLAKE2b-256 |
2da4e11778d99634ed3d905f33054ddb43e69d1f83dd55dcb56aac6322282888
|
Provenance
The following attestation bundles were made for strand_mcp-0.2.0.tar.gz:
Publisher:
sdks-publish.yml on Strand-AI/strand-official
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strand_mcp-0.2.0.tar.gz -
Subject digest:
51b1cb847d1e25a169f649559a1e1edcdd6f27c742bbe977a60bc6fca23e2a45 - Sigstore transparency entry: 2414070458
- Sigstore integration time:
-
Permalink:
Strand-AI/strand-official@1ed37688563f7673ce6011b9a25d8670bbc81447 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Strand-AI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdks-publish.yml@1ed37688563f7673ce6011b9a25d8670bbc81447 -
Trigger Event:
push
-
Statement type:
File details
Details for the file strand_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: strand_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9394425d8f1ddba2eb260479ebdb1a5ee4340697698ae0617a8c38e39b0c77f4
|
|
| MD5 |
88dbfca74a228ed88275d320da3d4ad8
|
|
| BLAKE2b-256 |
56b6ebf27693120f53f94061e4e60be29d9fda955d158631784e2128bf173602
|
Provenance
The following attestation bundles were made for strand_mcp-0.2.0-py3-none-any.whl:
Publisher:
sdks-publish.yml on Strand-AI/strand-official
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strand_mcp-0.2.0-py3-none-any.whl -
Subject digest:
9394425d8f1ddba2eb260479ebdb1a5ee4340697698ae0617a8c38e39b0c77f4 - Sigstore transparency entry: 2414070527
- Sigstore integration time:
-
Permalink:
Strand-AI/strand-official@1ed37688563f7673ce6011b9a25d8670bbc81447 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Strand-AI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdks-publish.yml@1ed37688563f7673ce6011b9a25d8670bbc81447 -
Trigger Event:
push
-
Statement type: