Get the FREE Ultimate OpenClaw Setup Guide →

metrc

METRC Cannabis Compliance Documentation MCP Server - Search 7,282 sections across 17 states via AI agents

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio samcorl-metrc-mcp-server docker run -i samcorl/metrc-mcp-server

How to use

This MCP server provides AI agents with searchable access to METRC cannabis compliance documentation across multiple states. It exposes tools such as search_metrc_docs for full-text search across the METRC documentation, get_metrc_endpoint to retrieve API endpoint documentation, and list_states to enumerate all states covered by the dataset. You can interact with the server using MCP-compatible clients or HTTP/JSON-RPC endpoints exposed by the container. Typical usage involves issuing tool calls to retrieve precise regulatory requirements, cross-state comparisons, or endpoint details during AI-assisted conversations. For example, you can query for package labeling requirements in a state, or fetch an API endpoint description to integrate METRC data into your assistant’s responses.

To use the tools, send a JSON-RPC payload specifying the tool name and arguments. responses will include relevant passages, references, and, when applicable, links to the underlying METRC documentation. The server aims to keep results up-to-date and searchable in real time as you converse with your AI agent.

How to install

Prerequisites:

  • Docker installed on your host (Docker Desktop for Windows/macOS or Docker Engine for Linux)
  • Basic command-line knowledge
  1. Install Docker:

  2. Pull and run the METRC MCP server container: docker pull samcorl/metrc-mcp-server docker run -i --rm -p 8080:8080 samcorl/metrc-mcp-server

  3. Verify the server is running:

    • If the container exposes an HTTP/JSON-RPC endpoint, you can test with curl: curl -X POST http://localhost:8080/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list_states","params":{}}'
  4. Optional: customize environment or ports as needed. Refer to the container’s documentation for additional flags and configuration.

Notes:

  • If you prefer to run locally without Docker, this project can also be run with a compatible Ruby/Sinatra setup inside a container or VM, but Docker is the recommended method for consistency.

Additional notes

Tips and common issues:

  • Ensure Docker has enough memory allocated to handle full-text indexing and search; METRC documentation can be large.
  • If you encounter networking issues, verify that the container port (e.g., 8080) is accessible from your client and that any firewalls allow traffic.
  • The list_states tool may take a moment to respond if the dataset is being loaded for the first time.
  • Use the get_metrc_endpoint tool to obtain precise endpoint documentation before integrating METRC data into automated workflows.
  • If you need to import additional data, there is an import workflow visible in the container’s documentation; adjust volume mounts or data paths accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers