Skip to content

How to use refgenie with an AI assistant

AI coding assistants (Claude Code, Claude Desktop, Cursor, and similar tools) work well with refgenie. There are two complementary ways to combine them, and you can use either or both:

  1. Let the assistant operate refgenie for you — run the CLI, pull and build assets, and wire asset paths into your scripts. Point it at the refgenie skill file.
  2. Let the assistant query your refgenie database — answer questions like “what genomes do I have?” without touching anything. Use the built-in MCP server.

Option 1: Point your assistant at the skill file

Section titled “Option 1: Point your assistant at the skill file”

Refgenie publishes a single self-contained instruction file for AI agents at:

https://refgenie.org/SKILL.md

It teaches an assistant the refgenie commands and concepts it needs — how to pull, build, seek, initialize genomes, retrieve sequences, and use the Python API — in one page. You do not need to explain refgenie yourself; you just direct the assistant to read it.

With any assistant that can fetch a URL or run shell commands, give an instruction like:

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

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

Use refgenie (see https://refgenie.org/SKILL.md) to add the correct genome asset paths to this alignment script instead of the hardcoded ones.

The assistant reads the page, learns the commands, and runs them for you.

Option 2: Let the assistant query your database (MCP)

Section titled “Option 2: Let the assistant query your database (MCP)”

Refgenie ships a built-in MCP server that gives an AI assistant read-only access to your local refgenie database. Once connected, you can ask questions in plain language and the assistant answers from your actual data — it can look things up, but it never modifies anything.

Connect it in one command with Claude Code:

Terminal window
claude mcp add refgenie refgenie-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 configuration, the full list of available tools, and more examples, see How to connect AI assistants to your refgenie database.

You want to…Use
Have the assistant download, build, or wire up assetsThe skill file (Option 1)
Ask questions about genomes and assets you already haveThe MCP server (Option 2)
Keep the assistant strictly read-onlyThe MCP server (Option 2)
Work in an editor/agent that only fetches URLsThe skill file (Option 1)

The two combine naturally: connect the MCP server so the assistant can see your database, and hand it the skill file so it knows how to act on it.