# brapi-mcp-server [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/cyanheads/brapi-mcp-server  
**GitHub Stars:** 4  
**npm Downloads (last month):** 1603  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/brapi-mcp-server

## Description
BrAPI v2.1 MCP server — studies, germplasm, observations, genotypes, images, and pedigrees.

## Tools
Capabilities this server exposes over MCP:

- **brapi_connect** — Authenticate to a BrAPI v2 server, register it under an alias, and return the orientation envelope
- **brapi_server_info** — Return the orientation envelope for an alias, optionally refreshing capabilities
- **brapi_describe_filters** — List valid filter names for an endpoint, for use in any finder's `extraFilters
- **brapi_find_studies** — Find studies by crop, trial type, season, location, or program
- **brapi_get_study** — Fetch a study with program, trial, and location resolved, plus companion counts
- **brapi_find_germplasm** — Find germplasm by name, synonym, accession, PUI, crop, or free text
- **brapi_get_germplasm** — Fetch a germplasm with attributes, direct parents, and companion counts
- **brapi_walk_pedigree** — Walk ancestry or descendancy as a deduplicated DAG with cycle detection
- **brapi_find_variables** — Find observation variables by name, trait class, or ontology term, with free-text ranking
- **brapi_find_observations** — Pull observation records by study, germplasm, variable, season, or unit
- **brapi_find_images** — Find image metadata by unit, observation, study, ontology term, or MIME type
- **brapi_get_image** — Fetch up to 5 images inline as image content blocks
- **brapi_find_locations** — Find research stations by country, type, abbreviation, or bounding box
- **brapi_find_variants** — Find variants by variant set, reference, or genomic region
- **brapi_find_genotype_calls** — Pull genotype calls through async search, bounded by a deployment pull ceiling
- **brapi_dataframe_describe** — List dataframes, or describe one with columns, row count, and provenance
- **brapi_dataframe_query** — Run read-only SQL across dataframes
- **brapi_dataframe_drop** — _Opt-in._ Drop a dataframe by name
- **brapi_dataframe_export** — _Opt-in, stdio-only._ Export a dataframe to disk as CSV, Parquet, or JSON
- **brapi_build_phenotype_matrix** — Build a germplasm × trait matrix from one or more studies as a dataframe
- **brapi_germplasm_performance** — Per-variable aggregates (n, mean, median, sd, min, max) for one germplasm across its studies
- **brapi_export_genotype_matrix** — Pivot a variant set's calls into a germplasm × variant matrix, with VCF-lite or PLINK text
- **brapi_submit_observations** — _Opt-in._ Two-phase observation write: `preview` validates, `apply` confirms and writes
- **brapi_raw_get** — Passthrough to any `GET /{path}` endpoint no curated tool covers
- **brapi_raw_search** — Passthrough to any `POST /search/{noun}` endpoint, with async polling handled

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `bunx` (confidence: high):

```json
"mcpServers": {
  "brapi-mcp-server": {
    "command": "bunx",
    "args": ["@cyanheads/brapi-mcp-server@latest"]
  }
}
```

## Documentation

## What brapi-mcp-server MCP server does

The brapi-mcp-server MCP server gives MCP clients access to plant-breeding data exposed through BrAPI v2.1. It can connect to one or more BrAPI servers, retain each connection under an alias, and report the server’s identity, authentication status, supported capabilities, notable gaps, and available content.

The covered data domains include studies, germplasm, observation variables, observations, images, research locations, variants, and genotype calls. Retrieved records can also be used for pedigree traversal, phenotype summaries, and matrix generation. The server is intended for BrAPI-compliant deployments, including Breedbase and other systems that implement the API.

## How it works

An agent first uses `brapi_connect` to register a BrAPI endpoint. The connection can use no authentication, bearer tokens, API keys, Breedbase-style SGN token exchange, or OAuth2 client credentials. `brapi_server_info` can later refresh or return the registered server’s capability profile.

Finder tools provide domain-specific filtering, while `brapi_describe_filters` exposes the documented filter catalog for supported endpoints. Study and germplasm retrieval resolves related program, trial, location, attribute, or parent information where supported. Pedigree traversal returns a deduplicated graph and detects cycles.

Large or asynchronous retrievals are handled through the server’s search and polling behavior. Results that exceed the per-call pull limit can spill into a DuckDB dataframe workspace. Agents can inspect those dataframes, run read-only SQL, remove them when enabled, or export them from a stdio deployment. The two prompts listed by the project support study-level exploratory analysis and cross-study germplasm-by-trait meta-analysis.

## Setup and configuration

The brapi-mcp-server MCP server can run as a stdio process, a local Streamable HTTP server, or through the project’s public hosted MCP endpoint at `https://brapi.caseyjhand.com/mcp`. The README provides installation paths for Claude Desktop, Cursor, and VS Code, including an npm-based command configuration.

Connections may receive their URL and authentication settings directly through `brapi_connect`. When omitted, settings are resolved from per-alias environment configuration, built-in aliases, and default configuration. Multiple aliases allow an agent to work with several BrAPI deployments in one session. The repository also publishes an npm package and a Docker image.

## Tools and capabilities

Key operations include:

- Searching studies, germplasm, variables, observations, images, locations, and variants with domain-specific filters.
- Fetching detailed studies, germplasm, and images, including up to five images as inline image content.
- Walking ancestry or descendancy graphs with duplicate suppression and cycle detection.
- Pulling genotype calls asynchronously and exporting genotype matrices as VCF-lite or PLINK text.
- Building phenotype matrices and calculating per-variable statistics for a germplasm across studies.
- Querying dataframe results with read-only SQL and exporting dataframes as CSV, Parquet, or JSON when the relevant opt-in features are enabled.
- Writing observations only through the opt-in preview-then-apply workflow.
- Calling uncovered BrAPI GET paths or POST search endpoints through raw passthrough tools.

## Limitations and notes

Support depends on the capabilities and filters implemented by the connected BrAPI deployment. The filter catalog follows BrAPI v2.1, but an individual server may support only part of it. Genotype retrieval is bounded by a deployment pull ceiling, and dataframe export is limited to stdio operation. Dataframe dropping and observation submission are opt-in. Resource reads use the `default` connection, so multi-server workflows should use tools and aliases instead.

The brapi-mcp-server MCP server is marked Beta in the project metadata. A failed connection does not replace an earlier registration under the same alias, and unavailable scoped counts are omitted rather than presented as server-wide totals.

_Full upstream README: https://allmcps.com/mcp/brapi-mcp-server/readme_

