MCP Server

ExoCLI includes a built-in Model Context Protocol (MCP) server that exposes data management operations as tools for AI agents. This lets agents like Claude, Cursor, or any MCP-compatible client create repositories, sync data, monitor progress, and more — without requiring knowledge of git-annex internals.

Quick Start

Starting the Server

exo mcp start

This starts the MCP server over stdio. You typically don’t run this directly — instead, you register it in your agent’s MCP configuration.

Claude Code Configuration

Register the MCP server with Claude Code:

claude mcp add --transport stdio exo -- exo mcp start

Or add it manually to your .mcp.json or project settings:

{
  "mcpServers": {
    "exo": {
      "command": "exo",
      "args": ["mcp", "start"]
    }
  }
}

Discovering Tools

List all available tools and their descriptions:

exo mcp list

Show full details for a specific tool, including parameters:

exo mcp show sync

Available Tools

ToolDescription
profilesList available server-authored setup profiles, or show one profile’s prompts
addAdd files to tracking with automatic content-type detection (text → git, binary → annex)
statusShow working tree status: untracked, modified, and staged files
locateShow where git-annex content is physically stored across remotes
syncDownload and upload git-annex managed data files to/from remote storage (background)
sync_statusCheck whether a background sync is still running
publishOrchestrate the full publish workflow: sync content → bundle metadata → sync to catalog → broadcast
broadcastBroadcast git-annex metadata to remotes without transferring file content
loginAuthenticate via OIDC device flow (non-blocking)
login_statusCheck whether authentication has completed
whoamiShow identity, session, organisation, and AWS credential info for the current login
heartbeat_recordStart recording sync progress metrics in the background
heartbeat_showShow the latest sync progress metrics
initInitialize or reconfigure git-annex in an existing repository, optionally applying a server-authored profile
init_remoteAdd a new storage remote to the repository
getDownload git-annex managed content for specific paths
doctorRun ExoHub client diagnostics: environment, auth, network, repo config, grants/S3 access, provenance
provenance_addRecord PROV-O provenance for generated/derived files
provenance_importImport provenance a workflow engine already recorded (e.g. a Nextflow run)
provenance_showShow a path’s recorded lineage from the repository’s provenance records
provenance_validateValidate recorded provenance for schema conformance, dangling references, and coverage
infoShow repository information: configured remotes, annex state, and storage statistics
docsFetch exo usage documentation (the llms.txt index, or a specific page)
catalog_searchSearch the ExoHub catalog for datasets and artifacts
catalog_schemasList available document schema names in the catalog
catalog_downloadDownload files, artifacts, or entire projects from the catalog
catalog_semantic_searchSemantic (natural language) search over the catalog using vector similarity
catalog_entitiesRetrieve entity details and relationships from the catalog knowledge graph
catalog_lineageShow an artifact’s recorded lineage from the catalog, plus its direct consumers

The MCP server does not expose a create_repo tool — the agent must get a local git repository pointed at origin first (git clone <url>, or git init + git remote add origin <url> for a brand-new repository on the git host), then call init to configure git-annex and remotes.

Workflows

Creating or Publishing a Repository

The MCP server does not expose a create_repo or clone tool — the agent runs git clone/git init in a terminal, then uses init (optionally with a server-authored profile) to configure git-annex:

1. login          → authenticate (returns auth URL for you to visit)
2. login_status   → poll until authentication completes
                   (then: git clone <url>, or git init + git remote add origin <url>, in a terminal)
3. profiles       → list available profiles (optional, usually the fastest path);
                     call again with 'name' to see that profile's prompts and ask the user about every one
4. init           → configure git-annex (pass 'profile' + 'answers' if using a profile);
                     without a profile, ask the user which remote types they want, then call init_remote
                     for each one, one at a time
5. add            → add files to tracking
6. provenance_add → record what was generated/derived, if the files came from a pipeline, script, or this agent
7. git commit, git push → push metadata
8. publish        → if an artifactdb remote is configured (syncs content, bundles metadata, syncs to the catalog);
                     otherwise sync         → upload data to the configured remotes

Cloning and Downloading Data

Cloning is done via git clone in a terminal. Once cloned, use init to configure git-annex remotes, then get or sync to download content:

1. login          → authenticate
2. login_status   → poll until authentication completes
                   (then: git clone <url> in a terminal)
3. init           → configure git-annex remotes from .exohub/remotes
4. get or sync    → download content from remotes (get for specific paths, sync for everything)

Syncing with Progress Monitoring

The sync tool runs in the background and returns immediately. The agent can monitor progress for you:

1. heartbeat_record   → start background metrics capture
2. sync               → start the sync (runs in background)
3. heartbeat_show     → poll periodically to check progress
4. sync_status        → check if sync has completed

Checking Repository State

1. status    → see untracked/modified/staged files
2. locate    → find which remotes hold specific files

Use info to see configured remotes and their types, or exo info from the CLI. Remotes are defined in the .exohub/remotes manifest file.

Discovering and Downloading Catalog Data

1. catalog_schemas          → discover available schema types
2. catalog_search           → find datasets matching your criteria
3. catalog_semantic_search  → natural language search (e.g. "datasets related to neurodegeneration")
4. catalog_entities         → look up entity details and relationships (genes, diseases, pathways, etc.)
5. catalog_lineage          → look up a specific artifact's recorded lineage and direct consumers once you have its id
6. catalog_download         → download artifacts found in search results

Recording and Checking Provenance

1. provenance_add       → after generating/transforming files, before committing: what was generated, what it
                           was derived from or used, and who/what is responsible
2. provenance_import    → instead of provenance_add, when a workflow engine (e.g. Nextflow) already recorded the
                           run's lineage
3. provenance_show      → see a path's recorded lineage from the repository directly
4. provenance_validate  → before committing or publishing: catch schema errors, dangling references, or
                           missing coverage

Tool Details

profiles

List available server-authored ExoHub setup profiles, or show one profile’s prompts. Call without name to list profiles (name, description) so you can offer the user a choice. Call with name to get that profile’s prompts (key, type, choices, default) so you can ask the user every question yourself — never assume a default, especially for a read_access prompt: it controls who can see the published catalog entries (e.g. public vs authenticated), and some profiles default to public. Pass the answers to init as profile + answers. Read-only.

Parameters:

ParameterRequiredDescription
nameNoProfile name to show prompts for (omit to list all available profiles)

add

Add files to tracking with automatic content-type detection. In auto mode (default), text files go to git and binary/data files go to git-annex based on mimetype.

paths also accepts exohub:<project>[:path]@<version> references to import an asset, folder, whole project, or named collection from another ExoHub project (see Importing from Another Project ). References cannot be mixed with local paths/URLs in the same call, or combined with mode.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
pathsYesFile paths, URLs, or exohub: references to add
modeNoauto (default), annex, or git — not used with exohub: references
toNoDestination path for an exohub: reference (--to)
repoNoGit remote URL to resolve an exohub: reference against when it isn’t reachable via a local clone or the catalog (--repo)
verifyNoRe-resolve an exohub: reference via the source’s git remote and fail on a mismatch (--verify)

Prerequisites: git-annex initialized in the repository.

status

Show working tree status including untracked, modified, and staged files. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository

locate

Show where git-annex managed content is physically stored across remotes. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
pathsNoSpecific file paths to locate (defaults to all annexed files)

Prerequisites: git-annex initialized. Remotes defined in .exohub/remotes.

sync

Download and upload git-annex managed data files to/from remote storage. Runs in the background and returns immediately.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
withNoRemote names to sync with (defaults to all)

Prerequisites: git-annex initialized (exo init). Remotes defined in .exohub/remotes; use exo info to list them.

Background execution: This tool starts the sync process in the background and returns immediately. Use sync_status to check completion and heartbeat_show for progress details.

sync_status

Check whether a background sync is still running for the given repository.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository

Returns: running or not_running.

publish

Orchestrate the full publish workflow: sync content to storage remotes, generate bundle metadata, sync to catalog remotes, then broadcast metadata to all remotes.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
syncNoArray of remote names to sync in step 1; overrides auto-discovery when provided
refNoArray of tags/commits to publish with the current routing (repeatable). Content and metadata come from each ref, while routing (remotes, role, url, data_from) comes from the current checked-out .exohub/remotes — this is how an older tag whose own routing predates a migration gets published to the current catalog instead of a stale or missing target
forceNoBypass the ref-to-remotes check and the source-repo guard (with ref, also skip the content-availability check); never bypasses tag immutability

Prerequisites: git-annex initialized. Remotes defined in .exohub/remotes.

broadcast

Broadcast git-annex metadata and tracking information to remotes without transferring file content. Use this instead of git annex sync --no-content.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
withNoRemote names to broadcast to (defaults to all)

Prerequisites: git-annex initialized. Remotes defined in .exohub/remotes.

init

Initialize or reconfigure git-annex in an existing git repository, optionally applying a server-authored profile. The repository must already exist locally (git clone <url>, or git init + git remote add origin <url> for a brand new repository) — this tool does not create the git repository itself.

Without profile, runs exo init --yes to ensure git-annex is set up and all remotes defined in .exohub/remotes are properly configured — idempotent, safe to call multiple times. Use this after git clone to enable remotes, or any time remote configuration may be stale.

With profile, also fetches and applies that server-authored profile: use the profiles tool first to discover available profiles and their prompts, ask the user about every prompt (never assume a value, especially read_access), then pass the answers here as answers (key → value, matching the profile’s prompt keys and types). This is equivalent to the CLI’s --profile/--set key=value flags (see Using Profiles ).

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository; must already exist (see git clone / git init first)
profileNoName of a server-authored profile to apply (see the profiles tool)
nameNoExplicit repository name (passed through as --name)
answersNoAnswers to the chosen profile’s prompts, keyed by prompt key; unanswered prompts fall back to their default

init_remote

Add a new storage remote to the repository. Creates an S3 or local remote for storing git-annex data. The remote is saved to .exohub/remotes for reproducible setup across clones.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
nameYesRemote name (e.g., s3-annex, s3-export)
typeYesRemote type: annex, export, artifactdb, or exospace
s3urlNoS3 URL (required for annex, export, artifactdb). Example: s3://example-sandbox-bucket/sandbox/<org>/<repo>/_annex
rsyncurlNoRsync URL or local path (required for exospace). Example: rsync://host/path
tracking_branchNoTracking branch for export remotes (defaults to current branch)
grantsNoEnable fine-grained S3 Access Grants permissions (default: true)
roleNoartifactdb remotes only: atlas (default, publishes the bundle) or instance (publishes .artifactdb/ into an ArtifactDB instance, never a git-annex special remote)
urlNoartifactdb remotes only: the Atlas to publish to (role: atlas, optional) or the ArtifactDB instance endpoint (role: instance, required)
grants_account_idNoartifactdb remotes only: Access Grants account id to request credentials from for this remote
data_fromNoartifactdb role: instance only: the role: atlas remote this instance delegates to (defaults to the repository’s single atlas remote)

get

Download git-annex managed content for specific paths into the local repository (wraps exo get). Use this for a targeted download instead of sync, which transfers content for the whole repository.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
pathsNoPaths to get (defaults to the current directory, i.e. everything)
fromNoSource remote to get content from (defaults to any remote with the content)
allNoGet all versions of the content, not just the current one

Prerequisites: git-annex initialized in the repository (run init first).

doctor

Run ExoHub client diagnostics (wraps exo doctor): environment, auth, network, repo config, grants/S3 access, and provenance checks. Each check reports pass, warn, fail, or skip. Use this to diagnose a failing sync, login, or permission issue before asking the user to investigate manually. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirNoPath to an ExoHub repo to scope repo-specific checks (default: current directory)
remoteNoOnly run per-remote checks for this remote name
write_testNoAlso perform an opt-in S3 write canary (put + delete) under a caller-owned prefix

provenance_add

Record PROV-O provenance for files in this repository (wraps exo provenance add): what was generated, what it was derived from or used, and who/what asserted it. Call this after generating or transforming files and before committing, so the commit carries both the data and its provenance.

Unless agent is given explicitly, the record is attributed to this calling tool as a software agent, acting on behalf of the logged-in user (exo resolves the on-behalf-of person automatically). Choose assertion based on how you know the lineage: use recorded when you (this agent) yourself just ran the step that produced generated — you observed the activity directly; use asserted (the default) plus evidence when you are inferring lineage after the fact (e.g. from file names, timestamps, or a README) rather than having executed the step; use imported when the lineage was taken from another system’s records rather than observed or inferred here.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
generatedYesPaths that were generated/created by this activity
usedNoPaths that were read as inputs without being transformed into generated
derived_fromNoPaths that generated was derived/transformed from
no_derived_fromNoExplicitly assert generated has no inputs (e.g. hand-authored files)
revision_ofNoPaths/ids that generated is a revision of
planNoPath to a plan/script/notebook document describing the activity
plan_repositoryNoGit repository URL hosting the plan’s code (exo:repository)
plan_commitNoCommit of the plan’s code in its repository (exo:commit)
plan_urlNoThe plan’s addressable URL, or its script/process path within plan_repository (label); identifies the plan when plan is omitted
roleNorole=path the entity played as an input of this activity (repeatable)
output_roleNorole=path the role a generated entity played as an output of this activity (repeatable)
paramNoname=value parameter used by this activity (repeatable); value is parsed as JSON when possible, else kept as a string
resultNoname=value non-file result generated by this activity (repeatable); value is parsed as JSON when possible, else kept as a string
environmentNoPath or IRI of the software environment used by this activity (repeatable), for example docker://host/image@sha256:...
sourceNoIRI of the run this activity was recorded from elsewhere (hadPrimarySource)
agentNoperson:<unix id> or software:<name> asserting this record; defaults to software:<this MCP client>
on_behalf_ofNoperson:<unix id> the software agent acted on behalf of; defaults to the logged-in user when agent is a software agent
modelNoModel identifier for a software agent (requires agent software:<name>)
startedNoActivity start time (RFC3339); defaults to now
endedNoActivity end time (RFC3339); defaults to now
assertionNoAssertion kind: recorded, asserted (default), or imported
evidenceNoFree-text justification for how you inferred the lineage; required context for an asserted record
supersedesNoRecord ids this record supersedes
skip_existingNoSkip generated paths that already have provenance instead of erroring
dry_runNoPrint the record that would be written without writing it

See Provenance for the full record format and agent-workflow recommendations.

provenance_import

Import provenance a workflow engine already recorded (wraps exo provenance import): reads one run from a supported source format and writes ExoHub provenance records with exo:assertion imported, staged like records written by provenance_add. Each run file is resolved to repository content the same way provenance_add resolves a path, verified by checksum when possible, by size otherwise; a file outside the repository or whose content no longer matches is referenced by an external IRI. Importing a run that was already imported writes nothing and exits zero, reporting the existing record; pass supersedes to re-import on purpose. Requires an exo login token to identify the importing person (run login first).

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
formatYesImport format adapter name, for example nextflow
runNoRun id/name to import (defaults to the latest run found in the format’s default location)
storeNoLocation of the format’s lineage store (format-specific; defaults to the format’s usual location)
tasksNoWrite one activity per task instead of one for the whole run
supersedesNoRecord ids this import supersedes (repeatable); required to re-import an already-imported run
keep_sourceNoCommit a copy of the run’s source lineage documents under .exohub/provenance/sources/, referenced as evidence
dry_runNoPrint the records that would be written without writing them

See Importing from a Workflow Engine for the full command behavior.

provenance_show

Show the recorded lineage for a path from the git repository’s provenance records (wraps exo provenance show): what generated it, what it was derived from, and the agents involved. Use this to answer “where did this file come from” before reusing or publishing it. Complements catalog_lineage, which reads lineage already published to the catalog. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
pathYesPath to show lineage for
refNoShow lineage as of this git ref (default: HEAD)
depthNoMaximum number of upstream hops to walk (default: unlimited)

provenance_validate

Validate recorded provenance for consistency (wraps exo provenance validate): schema conformance, dangling references, and coverage. Returns a report of errors (exit-affecting) and warnings per record. Run this before committing or publishing to catch provenance problems early. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
stagedNoValidate the staged (index) state instead of the worktree
refNoValidate records as of this git ref instead of the worktree (mutually exclusive with staged)

info

Show repository information including configured remotes, annex state, and storage statistics. Use this to discover which remotes are available before running sync or broadcast. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository

login

Authenticate via OIDC device flow. If valid credentials exist, returns immediately. Otherwise, starts a device flow in the background and returns an auth URL that the agent shows to you.

Parameters:

ParameterRequiredDescription
forceNoForce re-authentication even if valid credentials exist

Non-blocking: When device flow is needed, returns the auth URL immediately. Poll login_status to check when authentication completes.

Required before: init (with a profile), sync, broadcast, get, publish.

login_status

Check the status of an in-progress login or verify existing credentials.

Returns: waiting (device flow pending), ok (authenticated), not_authenticated, or expired.

whoami

Show who you’re logged in as: identity, session expiry, organisation claims, and the AWS profile/credentials exo will use. Read-only. Returns an error if not logged in (call login first). Never returns tokens or AWS secrets.

Parameters:

ParameterRequiredDescription
awsNoAlso perform a live sts:GetCallerIdentity call (network call)

Prerequisites: Authentication (login).

heartbeat_record

Start recording sync progress metrics in the background. Launches a background process that continuously captures annex sync metrics every interval seconds.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository
intervalNoRecording interval in seconds (default: 2)
pathsNoPaths to track (defaults to ["."] for the entire repo)

Returns immediately after starting the background recorder. Use heartbeat_show to read captured metrics.

heartbeat_show

Show the latest sync progress metrics captured by heartbeat_record. Read-only.

Parameters:

ParameterRequiredDescription
repo_dirYesPath to the git repository

Returns: Structured data including per-path file counts, storage progress, active downloads/uploads, network transfer rates, and completion percentages.

Prerequisites: heartbeat_record must be running (or have run) to produce metrics.

Search the ExoHub catalog for datasets and artifacts using full-text or field-specific queries. Artifact documents carry a lineage object when provenance was recorded: query lineage.inputs.id:"<id>" to find what consumed a given artifact, or lineage.generated_by.agents.id:"<agent id>" to find what an agent produced. Prefer catalog_lineage for a single artifact’s lineage and direct consumers.

Parameters:

ParameterRequiredDescription
qYesSearch query. Use * for all results. Supports dotfield notation (e.g., _extra.project_id:"myproject", path:*.parquet)
schemaNoFilter by schema name (e.g., exohub-artifact/v1)
projectNoFilter by project ID
latestNoReturn only latest versions (default: true)
fieldsNoComma-separated response fields (default: _extra,path)
sortNoSort order (default: -_extra.uploaded, prefix - for descending)
sizeNoResults per page (default: 10, max: 100)

Prerequisites: Authentication (login).

catalog_schemas

List available document schema names from the catalog. Useful for discovering what schema values to pass to catalog_search, including exohub-provenance/v1 (a bundle’s whole compiled provenance graph, flattened for search) alongside exohub-artifact/v1 and friends.

Parameters:

ParameterRequiredDescription
filterNoGlob pattern to filter schema names (default: exohub-*)

Prerequisites: Authentication (login).

catalog_download

Download data files, artifacts, or entire projects from the catalog.

Parameters:

ParameterRequiredDescription
idYesArtifact ID (e.g., myproject:file.txt@v1), project@version (e.g., myproject@v1), bundle ID, or commit ID
output_dirNoOutput directory (default: current directory)
forceNoRe-download even if file exists with matching size (default: false)

Prerequisites: Authentication (login).

Perform a semantic (natural language) search over the ExoHub catalog using vector similarity. Unlike catalog_search which does full-text keyword matching, this tool embeds the query and retrieves semantically related chunks, entities, and relationships.

Parameters:

ParameterRequiredDescription
qYesNatural language query (e.g. "datasets related to cell proliferation", "BRCA1 gene expression studies")
typesNoResult types to include: chunks, entities, relationships (defaults to all)
projectNoFilter results by project ID
limitNoMaximum results per type (default: 10, max: 100)

Prerequisites: Authentication (login).

catalog_entities

Retrieve entity details and relationships from the ExoHub catalog knowledge graph. Entities are extracted from catalog documents (genes, diseases, pathways, datasets, etc.). Use this to explore how a specific entity connects to other entities across the catalog.

Parameters:

ParameterRequiredDescription
nameYesEntity name to look up (e.g. "BRCA1", "Alzheimer's disease", "RNAseq")
include_relationshipsNoWhether to include related relationships (default: true)

Prerequisites: Authentication (login).

catalog_lineage

Show an artifact’s recorded lineage from the ExoHub catalog (its lineage field, written by exo bundle from provenance records: what generated it, its inputs, and the agents involved) plus its direct consumers — other catalog artifacts whose lineage.inputs reference this artifact. Complements provenance_show, which reads an artifact’s lineage from the git repository directly rather than from what has been published to the catalog. Use catalog_search (schema exohub-artifact/v1 or exohub-provenance/v1) to find artifact ids first. Read-only.

Parameters:

ParameterRequiredDescription
idYesArtifact ID to look up (e.g. "myproject:file.txt@v1"), as returned by catalog_search in _extra.id
consumers_sizeNoMax number of direct consumers to return (default: 10, max: 100)

Prerequisites: Authentication (login).

docs

Fetch exo usage documentation for agents. Read-only. With no arguments, returns the llms.txt index of available doc pages. Pass page with a link from that index (or a path under the docs base) to fetch that page’s content. If the docs site is unreachable, returns the attempted URL and the error instead of failing.

Parameters:

ParameterRequiredDescription
pageNoA page link from the llms.txt index, or a path under the docs base

Architecture

The MCP server runs as a child process of your agent, communicating over stdin/stdout via JSON-RPC. When the agent session ends, stdin closes and the server exits cleanly, killing any background processes it spawned (sync, heartbeat recorder, login).

All tool definitions are centralized in a shared registry, ensuring that exo mcp list, exo mcp show, and the running server always expose the same tools and descriptions.