Local MCP setup
Guide contents · CLI · Command reference
The shipped adapter is dna-cli mcp-stdio: local newline-delimited UTF-8 JSON-RPC over stdin/stdout, pinned to MCP 2025-11-25 with tool JSON Schema 2020-12. It has no HTTP listener, account or required browser. Other protocol editions or arbitrary client versions are not claimed compatible. Keep stdout protocol-only; diagnostics go to stderr.
Configure a client
Create a dedicated data directory and a separate private state directory. Grant only the data you intend the client to use. Substitute real absolute paths:
{
"mcpServers": {
"xihl": {
"command": "/absolute/path/to/dna-cli",
"args": [
"mcp-stdio",
"--allow-root", "/absolute/path/to/xihl-data",
"--state-dir", "/absolute/path/to/xihl-mcp-state"
]
}
}
}
This is the common client configuration shape; use your client's documented equivalent. It is not an automatic installer or proof of that client's compatibility. Run dna-cli mcp-stdio --help for exact startup flags. Default data effects are read-only and network-disabled. The server may maintain private control state.
xihl_track_query opens the selected saved track or mapping job. Its source, required reference, and required file indexes must be in an allowed root or explicitly granted as external sources. The query leaves adjacent caches unchanged. It can index a plain VCF in memory and can build a BED index or compact coverage summary in disposable private server state. A private BED index or coverage cache is limited to 128 MiB per call. Coverage sources over 16 MiB require their prepared summary and index to be readable under the same grants. Prepare them in the desktop or CLI before querying. Add --allow-write only to enable intended mutations/outputs under granted roots, and --allow-network only for explicitly initiated supported acquisition.
Repeated --allow-root ABS_ROOT adds data roots. An explicit --allow-external-source ABS_FILE admits that source read-only without granting its containing directory. To admit an external directory, pass that directory explicitly as the source. Client root notifications cannot enlarge startup grants. Control state, configuration and executable areas are protected from data outputs. Traversal, symlink escapes and referenced sidecar/source paths are checked. These are cooperative local access controls, not an OS sandbox against malicious software running as the same user.
For optional executable overrides, startup configuration must admit the exact trusted path, for example --trusted-executable minimap2=/absolute/path/minimap2. Use the current help for supported names. Tool arguments cannot select arbitrary programs or shell commands. A trusted-path grant does not replace the scientific tool's version, identity, license or resource checks. Empty DNA tool fields use the checked bundle where the request supports a default. The server does not forward local tool environment overrides. Use explicit trusted paths for STAR, gzip and other optional tools as required.
Discover and call
Initialize with protocolVersion, client capabilities and clientInfo, then send the initialized notification. Call tools/list, then pass each returned nextCursor as the next request's cursor until none is returned. The 119 current domain commands map to xihl_ plus command names with hyphens changed to underscores. mcp-stdio is a launcher, not a recursively callable tool.
For example, CLI
dna-cli inspect --input /absolute/path/to/xihl-data/first-project.fasta
corresponds to tools/call with name: "xihl_inspect" and arguments: {"input":"/absolute/path/to/xihl-data/first-project.fasta"}. The result retains the CLI envelope in structuredContent, with a JSON text compatibility block. Do not assume legacy inspect.records moved under result. Tool validation and operation failures return isError: true, the JSON envelope as text, and typed error details under _meta.error when available. Failed calls have no success structuredContent. Invalid framing, unknown methods and unknown tools are protocol errors. Effect hints describe behavior and do not grant authority.
Read resources/list for registered artifact URIs. Read only returned xihl://artifact/SHA256 identities with resources/read; arbitrary filesystem URLs are not a resource-fetch API. Offset/length reads are bounded to 1 MiB per request and retain artifact identity. Preserve freshness/checksum failures.
The transport caps requests at 256 KiB, serialized results at 8 MiB, discovery pages at 50 and concurrent calls at 4. CLI control-file limits can be larger; they do not override transport caps. Use scoped files/bounded queries for large data rather than returning an entire reference, alignment or trace.
Long work and uncertain outcomes
Use the supported durable job tools for long workflows. Accepted jobs retain their ID, status, logs and results across a client reconnect using the same server state. Inspect xihl_jobs_list / xihl_jobs_status; cancel deliberately with xihl_jobs_cancel. An RPC cancellation or EOF does not mean undoing a committed mutation or cancelling an independently accepted job. Do not use a nonexistent shutdown RPC. If a response was lost, inspect accepted jobs/project revisions and the operation's recovery records before resubmitting.
Pass an absolute file path as arguments.request for workflow tools. The server checks the paths and effects described in that JSON before invoking the command. For workflow preflight, include write permission when the request proposes output destinations. Use xihl_aligner_profiles to list or parse profiles and xihl_aligner_index_inspect to check a typed AlignerIndex request without building it. To prepare or align, submit the same supported typed requests to xihl_jobs_submit with write access enabled. Use xihl_jobs_retry for a terminal job when its original tools and inputs are still available. Known minimap2 and STAR profiles are supported; external-only arbitrary arguments are refused. See aligner profiles and request examples.
For xihl_replay_run, use a fresh bundle in a writable data root. The server checks the recorded input paths and executable grants before starting the run. If the inputs moved, use inputs-dir with the numbered input filenames recorded by the replay convention (for example, input-1-reads.fastq). Only the files at their resolved locations need a read grant. The replay writes new outputs beside its manifest and refuses existing replay output or index cache directories.
Equivalent CLI commands and request shapes are in durable jobs. MCP preserves saved-revision conflicts, staleness, completeness and provenance; it does not silently resolve them for the agent.
Client compatibility
The server uses local stdio with the pinned protocol version. Your client must support that version and supply the startup settings above. A third-party client may transmit tool results according to its own configuration; grant only the paths you intend to share with it.