Integrations Guide
MCP tools, embeddable widget, API patterns, and third-party connections
Integrations Guide
Formul8 provides several integration points for connecting its capabilities to your existing tools and workflows. This guide covers MCP tools for AI code editors, the embeddable knowledge widget, API integration patterns, and third-party connections.
MCP Tools for Cursor and Claude Desktop
Formul8 provides a Model Context Protocol (MCP) server that exposes 65+ METRC cannabis tracking tools to AI code editors like Cursor and Claude Desktop. This allows you to query and interact with METRC data directly from your development environment.
What Is MCP?
The Model Context Protocol is a standard for connecting AI assistants to external tools and data sources. When you connect Formul8's MCP server to Cursor or Claude Desktop, the AI assistant gains the ability to call METRC API operations on your behalf.
Available Tools (65+)
The MCP server provides tools across all major METRC API categories:
| Category | Example Tools | Count |
|---|---|---|
| Facilities | List facilities, get facility details | 3 |
| Packages | List active/on-hold/inactive packages, create package, adjust package | 12 |
| Plants | List vegetative/flowering plants, create planting, change growth phase | 10 |
| Plant Batches | List batches, create batch, destroy plants | 8 |
| Strains | List strains, create strain, update strain | 4 |
| Harvests | List harvests, create harvest packages, finish harvest | 6 |
| Transfers | List incoming/outgoing transfers, get transfer details | 8 |
| Sales | List sales receipts, create sales receipt | 5 |
| Lab Results | Get lab results for package, list testing labs | 3 |
| Items | List items, create item | 4 |
| Compliance | Needs-attention analysis, audit-ready check, FIFO analysis | 2+ |
Analysis Skills
Beyond raw METRC API access, the MCP server includes 12 analysis skills that provide higher-level intelligence:
| Skill | What It Does |
|---|---|
| needs-attention | Identifies packages, plants, and transfers that require immediate action |
| audit-ready | Evaluates whether your facility data is audit-ready and flags gaps |
| fifo | Analyzes inventory for FIFO (First In, First Out) compliance |
| inventory-snapshot | Provides a comprehensive inventory summary at a point in time |
| transfer-summary | Summarizes transfer activity over a date range |
| package-history | Traces the full lifecycle of a specific package |
| compliance-check | Runs a series of compliance validations against current data |
| yield-analysis | Calculates yield metrics from harvest data |
| sales-analysis | Summarizes sales patterns and trends |
| strain-performance | Compares strain performance across harvests |
| waste-report | Analyzes waste and destruction records |
| expiration-tracker | Identifies packages approaching lab test expiration |
Connecting to Cursor
- Open Cursor settings
- Navigate to the MCP servers configuration
- Add the Formul8 MCP server:
{
"mcpServers": {
"formul8-metrc": {
"command": "npx",
"args": ["-y", "formul8-metrc-mcp"],
"env": {
"METRC_VENDOR_API_KEY": "your-vendor-key",
"METRC_USER_API_KEY": "your-user-key"
}
}
}
}- Restart Cursor to activate the MCP connection
- The AI assistant can now call METRC tools when you ask questions about your cannabis data
Connecting to Claude Desktop
- Open Claude Desktop settings
- Navigate to MCP server configuration
- Add the server configuration (same format as Cursor above)
- Restart Claude Desktop
Example MCP Interactions
Once connected, you can ask your AI assistant questions like:
- "List all active packages in my facility"
- "Are there any packages that need attention?"
- "Run an audit-ready check on my facility"
- "Show me the FIFO analysis for my flower inventory"
- "What is the yield analysis for my last 5 harvests?"
The AI assistant calls the appropriate MCP tools behind the scenes and presents the results in a readable format.
Vercel Edge API
The MCP server is also available as an HTTP API for custom integrations:
Base URL: https://metrc-mcp.vercel.app
| Endpoint | Method | Purpose |
|---|---|---|
/api/mcp | POST | MCP protocol endpoint for tool calls |
/api/chat | POST | Chat interface for natural language queries |
/api/health | GET | Health check with tool count |
Embeddable Knowledge Widget
The Future4200 knowledge widget (formul8future.js) can be embedded in your own website or application to provide AI-powered answers from the Future4200 knowledge base.
What It Does
The widget adds a chat bubble to your website. When a user clicks it, a chat panel opens where they can ask cannabis-related questions. Answers are sourced from 7,061 Future4200 forum threads with citations.
Embedding the Widget
Add the following script tag to your HTML:
<script src="https://future.formul8.ai/formul8future.js"></script>The widget initializes automatically and places a chat bubble in the bottom-right corner of the page.
Customization
The widget supports configuration options passed as data attributes or through a JavaScript initialization call:
<script
src="https://future.formul8.ai/formul8future.js"
data-position="bottom-right"
data-theme="dark"
></script>Widget API
The widget communicates with the Future4200 knowledge API:
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/api/chat | POST | Optional API key | Chat with Future4200 context and citations |
/v1/chat/completions | POST | Optional API key | OpenAI-compatible chat adapter |
/api/threads | GET | Optional API key | Search Future4200 threads directly |
API Integration Patterns
OpenAI-Compatible Integration
Formul8's API follows the OpenAI Chat Completions format, making it compatible with any tool or library that supports the OpenAI API. See the API Reference for full details.
Drop-in replacement pattern:
If your application already uses the OpenAI API, you can switch to Formul8 by changing the base URL and API key:
# Before: OpenAI
client = OpenAI(api_key="sk-...")
# After: Formul8
client = OpenAI(
api_key="YOUR_FORMUL8_API_KEY",
base_url="https://chat.formul8.ai/v1"
)All other code — message formatting, streaming, response parsing — remains the same.
Webhook Integration
The Dashboard (users.formul8.ai) processes Stripe webhooks for subscription events. If you need to integrate subscription changes into your own systems, you can configure Stripe webhooks in your Stripe dashboard to forward events to your own endpoints alongside Formul8's.
Key Stripe events handled:
checkout.session.completed— New subscription createdcustomer.subscription.updated— Plan upgrade/downgradecustomer.subscription.deleted— Subscription cancelledinvoice.payment_succeeded— Payment processedinvoice.payment_failed— Payment failed
Health Monitoring
All Formul8 services expose health endpoints for monitoring:
| Service | Health URL | Auth |
|---|---|---|
| Backend Gateway | https://chat.formul8.ai/health | None |
| Dashboard | https://users.formul8.ai/api/health | None |
| MCP Server | https://metrc-mcp.vercel.app/api/health | None |
You can integrate these into your own monitoring systems (Datadog, PagerDuty, etc.) to track Formul8 service availability.
Integration with Cannabis Systems
Metrc Track-and-Trace
Formul8 integrates with Metrc through two pathways:
- Metrc Dashboard (metrc.formul8.ai) — Full UI dashboard with AI Copilot for interactive use
- MCP Tools — 65+ tools for programmatic access via Cursor, Claude Desktop, or the HTTP API
Both pathways require Metrc vendor and user API keys, configured at the account level.
POS Systems
The Command Center supports CSV import from common cannabis POS systems:
- Dutchie
- Treez
- Flowhub
Export sales data from your POS system as CSV and import it into the Command Center for cross-facility analytics.
ERP and Accounting
Financial data can be imported into the Command Center via CSV for integration with:
- QuickBooks
- Sage
- Custom ERP systems
Coming Soon
| Integration | Status | Expected |
|---|---|---|
| Document upload and storage | Coming soon | TBD |
| Google Drive integration | Coming soon | TBD |
| BioTrack track-and-trace | Planned | TBD |
Future4200 Knowledge API
The Future4200 knowledge base is available through a standalone API for custom integrations.
Base URL: https://future.formul8.ai
Search Threads
curl https://future.formul8.ai/api/threads?q=winterization+ethanolReturns matching threads from the 7,061-thread corpus with relevance scores.
Chat with Context
curl -X POST https://future.formul8.ai/api/chat \
-H "Content-Type: application/json" \
-d '{
"message": "What is the best winterization technique for crude ethanol extract?"
}'Returns an AI-generated answer with citations from relevant Future4200 threads.
OpenAI-Compatible
curl -X POST https://future.formul8.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "future4200",
"messages": [
{"role": "user", "content": "How do I troubleshoot a vacuum oven?"}
]
}'Rate Limits for Integrations
| Service | Limit |
|---|---|
| Backend API (authenticated) | Per-tier limits (see Pricing & Plans) |
| Backend API (anonymous) | 500 messages per day per IP |
| Future4200 API | 100 requests per hour per IP |
| MCP Server | Governed by METRC API rate limits |
Next Steps
- API Reference — Full endpoint documentation with code examples
- Metrc Dashboard Guide — Interactive Metrc access
- Agent Catalog — Understand what you can query through the API
Last updated: 2026-02-18