Skip to content

Quickstart

This walks through a first session in Claude Code1; other clients work the same way once connected (Clients). It uses the tools available today: edi_ping, the discovery tools (edi_search_packages, edi_list_scopes, edi_list_identifiers, edi_list_revisions) and the package tools (edi_get_package, edi_get_metadata, edi_list_entities). Preview, download and citation tools are still being built; see the Roadmap.

1. Register the server

edi-mcp works with or without an EDI API key. With a key it reads EDI's own PASTA+ API; without one it falls back to the anonymous DataONE replicas of EDI content (see Backends).

Create a key at auth.edirepository.org (step by step) and export it as EDI_API_KEY without echoing it to the terminal:

read -rs EDI_API_KEY && export EDI_API_KEY     # paste the key, press Enter
claude mcp add edi -s user -e EDI_API_KEY="$EDI_API_KEY" -- edi-mcp --transport stdio
claude mcp add edi -s user -- edi-mcp --transport stdio

Search and the listing tools answer from DataONE, which can lag new EDI uploads. edi_list_scopes then serves a dated snapshot instead of the live list.

2. Check it

Ask the agent to "call edi_ping with check_api=true". The result shows the version, protocol 2026-07-28, keyConfigured, the backend serving you (pasta or dataone) and, under api, whether one small request to that backend succeeded. With a key, api.credential is token when edi-mcp exchanged the key for a short-lived edi-token. The key itself never appears in any result.

3. Find and inspect a package

The agent normally chains these on its own; the arguments below are what it sends. Results are abbreviated, and the package ids are examples: what a search returns depends on the backend and on what EDI holds at the time.

  1. Search

    {"tool": "edi_search_packages", "arguments": {"query": "net primary production", "scope": "Jornada"}}
    

    → resolved: [{"field": "scope", "input": "Jornada", "code": "knb-lter-jrn", ...}] and items, each with packageId (such as knb-lter-jrn.210548103.33), title, pubDate, doi, authors, keywords and portalUrl, plus page for paging and source.backend. Scopes accept exact names (knb-lter-jrn), LTER site codes (JRN) and names (Jornada); see Package identifiers.

  2. List the revisions of one package

    {"tool": "edi_list_revisions", "arguments": {"package": "jrn.210548103"}}
    

    → series: "knb-lter-jrn.210548103", the revisions in ascending order, newest, oldest and newestPackageId. Without a key, DataONE answers and may not yet hold the newest revision PASTA has.

  3. Browse a scope

    {"tool": "edi_list_identifiers", "arguments": {"scope": "HBR"}}
    

    → the package identifiers in knb-lter-hbr, ascending and paged.

  4. Read one package

    {"tool": "edi_get_package", "arguments": {"package": "knb-lter-hbr.14.22"}}
    

    → title, doi, license, isNewest, and entities with sizes and totalBytes. Then edi_get_metadata (with include such as ["overview", "coverage"]) gives the abstract, keywords and coverage, and edi_list_entities gives each table's columns, units and missing-value codes, with a PASTA dataUrl and, where DataONE replicates the scope, a keyless anonymousUrl. See Packages, metadata and entities.

Every result also carries notes (caveats such as DataONE lag) and nextSteps (concrete follow-up calls). The Tool reference lists every input and result field.


  1. Claude Code — MCP. https://docs.claude.com/en/docs/claude-code/mcp ↩

  2. EDI PASTA+ Data Package Manager REST API. https://pasta.lternet.edu/package/docs/api ↩