Skip to content

Use refgenie with an AI assistant

AI assistants such as Claude Code, Claude Desktop and Cursor can work with refgenie in two ways. Use either or both:

  1. The assistant runs refgenie for you. It runs the CLI, pulls and builds assets, and puts asset paths into your scripts. Point it at the refgenie skill file.
  2. The assistant looks things up in your refgenie database. It answers questions like "what genomes do I have?" without changing anything. Connect the built-in MCP server.

Refgenie publishes an instruction file for AI agents at https://docs.refgenie.org/SKILL.md. It covers how to pull, build and seek, initialize genomes, retrieve sequences and use the Python API. A second file, https://api.refgenie.org/SKILL.md, covers using a refgenie server over HTTP with nothing installed.

Give any assistant that can fetch a URL or run shell commands an instruction like:

Read https://docs.refgenie.org/SKILL.md, then use refgenie to download the bowtie2 index for hg38 and give me the path.

Following https://docs.refgenie.org/SKILL.md, initialize my custom genome from ~/data/mygenome.fa.gz and build its FASTA and bwa indexes.

Use refgenie (see https://docs.refgenie.org/SKILL.md) to replace the hardcoded genome paths in this alignment script.

Refgenie includes an MCP server that gives an assistant read-only access to your local refgenie database. Install the mcp extra and connect it to Claude Code:

Terminal window
pip install "refgenie[mcp]>=1.0.0a3"
claude mcp add refgenie "$(which refgenie-mcp)"

Run it with refgenie's environment active. For another refgenie folder, see Connect AI assistants (MCP).

Then ask things like:

What genomes do I have in refgenie?

What assets are available for hg38?

Do I have any mouse genomes?

How do hg38 and GRCh38 compare?

For Claude Desktop, the full list of tools, and the public server's MCP endpoint, see Connect AI assistants (MCP).

You want to...Use
Have the assistant download, build or wire up assetsThe skill file
Ask about genomes and assets you already haveThe MCP server
Keep the assistant read-onlyThe MCP server
Work in a tool that can only fetch URLsThe skill file

They work well together: the MCP server lets the assistant see your database, and the skill file shows it how to act on it.