AI Integration

Connect AI agents and LLM applications to CannMenus data.

CannMenus provides multiple integration paths for AI applications, from simple REST API calls to full agentic workflows via MCP.


llms.txt — AI-Readable Documentation

Following the llms.txt convention, CannMenus provides machine-readable documentation optimized for LLM context windows:

  • Name
    /.well-known/llms.txt
    Type
    GET
    Description

    Concise overview — endpoints, auth, critical rules. Include this in your LLM's system prompt for basic API awareness.

    curl https://api.cannmenus.com/.well-known/llms.txt
    
  • Name
    /.well-known/llms-full.txt
    Type
    GET
    Description

    Detailed instructions — data semantics, common pitfalls, response field explanations, MCP tool catalog. Use for AI agents that need deep API knowledge.

    curl https://api.cannmenus.com/.well-known/llms-full.txt
    

Usage in LLM Applications

Include the llms.txt content in your system prompt:

import requests

# Fetch API instructions for your LLM
instructions = requests.get("https://api.cannmenus.com/.well-known/llms-full.txt").text

# Include in system prompt
messages = [
    {"role": "system", "content": f"You have access to the CannMenus API.\n\n{instructions}"},
    {"role": "user", "content": "Find the top vape brands in California"}
]

MCP Server — Model Context Protocol

For AI agents that support MCP, CannMenus provides an MCP server:

Combined endpoint:   https://api.cannmenus.com/mcp/          (auto-filtered to your entitlements)
Cannabis only:       https://api.cannmenus.com/mcp/cannabis  (cannabis menu / sales / company tools)
BevAlc only:         https://api.cannmenus.com/mcp/bevalc    (bev/alc retail analytics — requires HEMP_BEVERAGE_DATA)
Wholesale only:      https://api.cannmenus.com/mcp/wholesale (requires WHOLESYNC subscription)

Auth: OAuth 2.0 (Claude.ai, ChatGPT) or Bearer token (Claude Desktop/Code)
Transport: Streamable HTTP

Tools

Pick a single structured tool over fan-outs: most common questions map to one tool call. For the tool-selection table and the current tool catalog, see MCP Server Setup → Available Tools.

Deals are available through the MCP tools retail_menu_deals, product_deals, and deal_history; the REST API has no deals endpoint. App developers calling the deal tools from a backend should start with Deals & Promotions.

Pagination: see Pagination → MCP Tool Pagination for cursor mechanics, the cursor cap, and the aggregates-first rule for split-mode tools.

Setup with Claude

See MCP Setup Guide for connecting Claude Desktop or Claude.ai to the CannMenus MCP server.


REST API

For simpler integrations, use the REST API directly:

# Search products
curl "https://api.cannmenus.com/v2/products?states=California&category=Flower&per_page=200&recreational=true" \
  -H "X-Token: YOUR_API_KEY"

# Find retailers
curl "https://api.cannmenus.com/v1/retailers?states=California&search=MedMen" \
  -H "X-Token: YOUR_API_KEY"

See Products and Retailers for full endpoint documentation.


OpenAPI Spec

The full OpenAPI 3.0 spec is available for code generation and client libraries:

curl https://api.cannmenus.com/openapi.json

Interactive documentation (Redoc): api.cannmenus.com/redoc