latch-mcp.md
161 lines · skills/latchbio-integration/references/latch-mcp.md at 5f2bc03
Most marks come from matching words in the file, so treat them as pointers.
Latch MCP
Latch provides a remote Model Context Protocol server:
https://mcp.latch.bio/mcpIt lets compatible AI clients discover workflows and interact with Latch Data and executions through an OAuth-authorized tool surface.
Raw lines 1 to 11Authentication Boundary
- A Latch account is required.
- MCP uses OAuth in the connected AI client.
- MCP authorization does not authenticate the Latch SDK, CLI, or Console.
- SDK login credentials do not replace MCP authorization.
- Actions launched through MCP incur the same normal Latch charges as the corresponding Console or SDK action.
Never copy OAuth tokens between these authentication domains.
Raw lines 12 to 22Setup
Raw lines 23 to 24Cursor
Add:
{
"mcpServers": {
"LatchBio": {
"url": "https://mcp.latch.bio/mcp"
}
}
}Then open Cursor Settings → Tools & MCP(s), select LatchBio, click Connect, and complete OAuth.
Raw lines 25 to 41Claude Code
claude mcp add --transport http latchbio https://mcp.latch.bio/mcpRun /mcp and complete OAuth.
Codex
codex mcp add latchbio --url https://mcp.latch.bio/mcp
codex mcp login latchbioFor another MCP client, configure the same remote HTTP URL and follow that client's OAuth flow.
Raw lines 50 to 59Documented Tools
The current guide lists:
| Tool | Purpose |
|---|---|
list_files | List immediate children of a Latch Data directory |
get_file | Return a Console link or presigned download URL for a file |
list_workspaces | List accessible workspaces and the default |
list_workflows | Discover workspace and public workflows |
get_workflow_schema | Retrieve launch metadata and parameter schema |
launch_workflow | Launch with schema-compatible values |
list_executions | Filter executions by workspace, workflow, name, or status |
get_execution | Get status, task nodes, result files, and Console URL |
get_task_logs | Get inline logs or a signed URL for complete logs |
Tool names and schemas can evolve. Discover the connected server's current tools before calling them.
Raw lines 60 to 78Safe Launch Workflow
- Select a workspace
- Call
list_workspaces. - Prefer the default only when it is clearly the intended target.
- Discover rather than guess
- Call
list_workflows. - Identify the exact workflow and version.
- Fetch the schema
- Call
get_workflow_schema. - Use returned types, required values, enums, defaults, and path rules.
- Resolve data
- Use
list_filesonly for the minimum directories needed. - It lists metadata, not file contents.
- Use
get_filefor a selected file's access link. Prefer its Console link for sharing; treat a presigned download URL as a temporary credential. - Do not browse unrelated or sensitive directories.
- Prepare a launch summary
- Workspace
- Workflow and version
- Input paths and parameters
- Output destination
- Expected resource/cost implications
- Confirm
- Obtain user approval before launching paid compute.
- Reconfirm unusually large, GPU, or fan-out workloads.
- Launch
- Call
launch_workflowonce. - Preserve the returned execution identifier and Console URL.
- Monitor
- Poll with
get_execution. - Use
get_task_logsonly for relevant nodes. - Avoid repeatedly downloading full logs when an inline excerpt is enough.
Example Agent Plan
list_workspaces
→ choose workspace 12345
→ list_workflows
→ choose Bulk RNA-seq version X
→ get_workflow_schema
→ validate sample paths and output directory
→ present launch summary and request confirmation
→ launch_workflow
→ get_execution until terminal status
→ get_task_logs only if a task failsRaw lines 120 to 134Cost and Data Safety
- Listing resources is read-only; launching is not.
- Do not launch during exploratory discovery.
- Do not expose signed log URLs; they may grant temporary access.
- Do not paste secrets into workflow parameters.
- Confirm paths belong to the selected workspace.
- Avoid broad file listing when exact paths are already known.
- Stop polling after a terminal state.
- Scientific validation still requires inspecting outputs and method assumptions after orchestration succeeds.
When MCP Is Unavailable
Use:
- Latch Console for interactive discovery and launch
latch_cli.services.launch.launch_v2for Python automationlatch lsorLPathfor data inspection- Latch Console for execution monitoring;
latch get-executionsremains in 2.77.1 but is deprecated and scheduled for removal
Do not simulate a missing MCP tool by inventing undocumented HTTP endpoints.
Raw lines 147 to 158