# Metrc MCP

> Metrc connects your AI agent to a licensed cannabis track-and-trace system. You can query real-time inventory status, monitor plant life cycles, and audit compliance records—all through natural conversation. Use it to list active facilities, check package details by label, or verify incoming transfers without logging into any dashboard.

## Overview
- **Category:** supply-chain
- **Price:** Free
- **Tags:** track-and-trace, inventory-management, regulatory-compliance, supply-chain-visibility, reporting

## Description

**Metrc MCP Server: Track Cannabis Inventory & Compliance**

This server connects your AI agent directly to your licensed cannabis track-and-trace system, letting you query real-time operational data just by talking to it. Forget logging into dashboards; you'll use natural conversation to pull audited compliance information instantly.

***

### Checking Facility and Compliance Details

You can start by listing every single licensed location associated with your Metrc account using `list_facilities`. You'll also get clarity on the system’s measurement standards; for example, you can call `get_unit_of_measures` to see if the facility uses grams or ounces. If you need deep metadata about a specific package label—say, checking its current status and contents—you just run `get_package_details` against that unique label.

### Monitoring Current Inventory Status

Need to know what's sitting on your shelves? Your agent uses `list_active_items` to give you a full rundown of all finished goods or products, like concentrates and strains, currently in stock. You can also get a list of every active strain the facility handles or produces by calling `list_active_strains`. For labeled units—the actual packages sitting on shelves—you'll run `list_active_packages` to see what’s physically there. If you want to keep tabs on specific individual plants, you can use `list_tracked_plants` for a compliance listing.

### Tracking Material Movement and Life Cycles

The system keeps track of everything that moves through the site. You'll get an immediate list of any inventory transfers that are currently scheduled or expected to arrive at your facility by calling `list_incoming_transfers`. To monitor production flow, you can retrieve a list of all recently completed and active harvest batches using `list_active_harvests`. This gives you a clear view of the material movement from cultivation through processing.

### Reviewing Sales and Compliance History

For compliance auditing, your agent pulls a list of recent and active sales receipts via `list_active_sales`, letting you verify transactions immediately. You don't have to check every single label manually; if you need to audit specific shipments or transfers, you can use the package details tool again—`get_package_details`—to pull deep metadata based on a label, cross-referencing it against sales history.

## Tools

### get_package_details
Retrieves detailed metadata for a specific package label, including its current status and contents.

### get_unit_of_measures
Lists all available units of measure (like grams or ounces) used in the system.

### list_facilities
Retrieves a list of every licensed location associated with your Metrc account.

### list_active_harvests
Retrieves a list of recently completed and active harvest batches for your facility.

### list_active_items
Lists all current products or finished goods (strains, concentrates) that are in stock at the facility.

### list_active_packages
Provides a list of specific inventory packages—the labeled units currently sitting on shelves.

### list_tracked_plants
Provides a list of individual plants that are being monitored for tracking and compliance purposes.

### list_active_sales
Generates a list of recent and active sales receipts for compliance auditing.

### list_active_strains
Lists all current cannabis strains that your facility handles or produces.

### list_incoming_transfers
Lists inventory transfers that are currently scheduled or expected to arrive at the facility.

## Prompt Examples

**Prompt:** 
```
List all active facilities associated with my Metrc account.
```

**Response:** 
```
Retrieving facilities... I found 2 licensed facilities: 'Green Valley Cultivation' and 'Downtown Distribution Center'.
```

**Prompt:** 
```
Show active inventory packages for license 'LIC-12345'.
```

**Response:** 
```
Querying inventory... I identified 15 active packages, including 10 units of 'Blue Dream' flower and 5 units of 'OG Kush' concentrates.
```

**Prompt:** 
```
Get details for package label 'ABCDEFG1234567'.
```

**Response:** 
```
Inspecting package... Label 'ABCDEFG1234567' contains 500g of bulk flower, currently in 'Active' status at your primary facility.
```

## Capabilities

### Check Facility & Compliance Details
List all licensed facilities, check unit of measure standards, and retrieve deep metadata for specific packages.

### Monitor Current Inventory Status
Get lists of active items, strains, and packages currently in your facility's possession.

### Track Material Movement & Lifecycle
Audit incoming inventory transfers, list harvests, or track individual plants through their life cycle at the site.

### Review Sales and Compliance History
List active sales receipts to verify transactions and check historical data for specific packages by label.

## Use Cases

### Auditing a large shipment arrival.
A facility just received 50 boxes of product. Instead of manually logging into the portal and finding the transfer ID, your agent runs `list_incoming_transfers`. You get the expected manifest details instantly and can cross-reference it with local stock using `list_active_items` to confirm readiness.

### Investigating a missing product count.
A batch of high-value concentrates seems short. The agent first runs `get_package_details` on the label ID to confirm its status, then cross-checks that against `list_active_sales`. This pinpoints whether the package was sold, transferred out, or is still sitting in storage.

### Quarterly compliance report generation.
You need proof of all sales for Q3. You ask your agent to list active sales using `list_active_sales`. The tool gathers the necessary receipts and structured data, making it easy to build a comprehensive legal report without copy-pasting anything.

### Planning next season's yield.
The Head Grower needs an overview of what’s ready. They ask for active harvests using `list_active_harvests`. The agent provides a list of batch IDs and dates, which the grower can then use to schedule packaging labor.

## Benefits

- Real-time visibility into every unit. Instead of just seeing a product name, you can use `list_active_packages` to get specific label IDs and check the exact quantity available.
- Compliance is automated. Use `list_active_sales` to pull immediate sales records for audits, eliminating manual data aggregation from multiple sources.
- Know where things are moving. `list_incoming_transfers` tells you exactly what product is expected on site before it even arrives, letting you plan labor and storage space.
- Deep inspection capabilities. When a label needs verification, `get_package_details` pulls all the necessary metadata—status, contents, location—in one shot.
- Manage your whole supply chain flow. You can track materials from initial growth (`list_tracked_plants`) through harvest (`list_active_harvests`) to final sale.

## How It Works

The bottom line is, you get compliance-grade data retrieved instantly by simply talking to your agent.

1. Subscribe to the Metrc server and input your state-specific Base URL, Integrator Key, and User Key.
2. Your AI agent processes a natural language request (e.g., 'What's incoming?') and determines which tool is needed.
3. The server executes the query against your live Metrc data and sends back structured results directly to your agent.

## Frequently Asked Questions

**How do I check if a label is still valid using get_package_details?**
The `get_package_details` tool provides the current status of any specific package label. It tells you if it's 'Active,' which confirms its current compliance standing in your facility.

**Can I see what products are arriving soon with list_incoming_transfers?**
Yes, `list_incoming_transfers` pulls a manifest of all expected inventory transfers. This lets you know exactly what product is scheduled to arrive and when.

**What tools can I use to check my current stock levels?**
You should start with `list_active_items` for general categories (strains, concentrates), and then narrow it down by using `list_active_packages` if you need details on labeled units.

**How do I list all the different licensed locations?**
Run the `list_facilities` tool. This gives you a complete list of every facility registered under your Metrc account for compliance checking.

**What is the difference between list_active_items and list_active_packages?**
`list_active_items` shows general product categories (like 'Flower'). `list_active_packages` tracks specific, labeled units of inventory that fall under those categories.

**What happens if I need to validate my API credentials before running a report using list_active_strains?**
The server requires three specific keys: the Base URL, Integrator Key, and User Key. You must enter these credentials during the initial setup in your AI client's configuration panel. This keeps sensitive access data separate from any natural conversation context.

**How do I ensure that my inventory units are correct before listing them with list_active_items?**
You should run get_unit_of_measures first. This tool pulls the master list of all valid measurement types (like grams or ounces) accepted by Metrc. You validate incoming data against this returned list, which stops errors before you query inventory records.

**Does the server handle pagination when I run list_active_packages because my facility has thousands of items?**
Yes, the API supports pagination for large result sets. If a query exceeds the default limit, your AI client can request subsequent pages by passing the provided cursor or page number parameter. This prevents timeouts and guarantees you retrieve all records.

**How do I find my Metrc API Keys?**
Your Integrator Key is provided by your software vendor. Your User Key is found in your Metrc User Profile under the 'API Keys' section.

**Which Base URL should I use?**
You must use the API URL corresponding to your state (e.g., https://api-ca.metrc.com for California).

**Is my regulatory data secure?**
Absolutely. Your token is encrypted at rest and injected securely at runtime.