2,500+ MCP servers ready to use
Vinkius

OpenTHC MCP Server for LlamaIndex 12 tools — connect in under 2 minutes

Built by Vinkius GDPR 12 Tools Framework

LlamaIndex specializes in data-aware AI agents that connect LLMs to structured and unstructured sources. Add OpenTHC as an MCP tool provider through Vinkius and your agents can query, analyze, and act on live data alongside your existing indexes.

Vinkius supports streamable HTTP and SSE.

python
import asyncio
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

async def main():
    # Your Vinkius token. get it at cloud.vinkius.com
    mcp_client = BasicMCPClient("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
    mcp_tool_spec = McpToolSpec(client=mcp_client)
    tools = await mcp_tool_spec.to_tool_list_async()

    agent = FunctionAgent(
        tools=tools,
        llm=OpenAI(model="gpt-4o"),
        system_prompt=(
            "You are an assistant with access to OpenTHC. "
            "You have 12 tools available."
        ),
    )

    response = await agent.run(
        "What tools are available in OpenTHC?"
    )
    print(response)

asyncio.run(main())
OpenTHC
Fully ManagedVinkius Servers
60%Token savings
High SecurityEnterprise-grade
IAMAccess control
EU AI ActCompliant
DLPData protection
V8 IsolateSandboxed
Ed25519Audit chain
<40msKill switch
Stream every event to Splunk, Datadog, or your own webhook in real-time

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure

About OpenTHC MCP Server

Connect your OpenTHC Cannabis Regulatory Compliance Engine to any AI agent and take full control of your seed-to-sale workflows through natural conversation.

LlamaIndex agents combine OpenTHC tool responses with indexed documents for comprehensive, grounded answers. Connect 12 tools through Vinkius and query live data alongside vector stores and SQL databases in a single turn. ideal for hybrid search, data enrichment, and analytical workflows.

What you can do

  • Company & License Management — List all registered companies and verify active cannabis licenses for compliance assurance
  • Cultivation Tracking — Query all active plants in cultivation with growth stages, strain varieties, and facility room locations
  • Inventory Control — Fetch complete inventory ledger including harvested material, work-in-progress, finished goods, and destruction candidates
  • Laboratory Testing — Access lab samples and Certificates of Analysis (CoA) with full potency, terpene, and contaminant test results
  • B2B Transfers — Monitor incoming and outgoing wholesale transfer orders with manifests, bills of lading, and fulfillment status
  • Retail Sales — Retrieve point-of-sale B2C transaction history for daily reporting, tax verification, and purchase limit enforcement
  • Product Catalog — Browse your complete cannabis product catalog with THC/CBD percentages, SKU data, and regulatory classifications
  • Facility Organization — List cultivation rooms, processing areas, and operational zones for spatial inventory and workflow planning

The OpenTHC MCP Server exposes 12 tools through the Vinkius. Connect it to LlamaIndex in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.

How to Connect OpenTHC to LlamaIndex via MCP

Follow these steps to integrate the OpenTHC MCP Server with LlamaIndex.

01

Install dependencies

Run pip install llama-index-tools-mcp llama-index-llms-openai

02

Replace the token

Replace [YOUR_TOKEN_HERE] with your Vinkius token

03

Run the agent

Save to agent.py and run: python agent.py

04

Explore tools

The agent discovers 12 tools from OpenTHC

Why Use LlamaIndex with the OpenTHC MCP Server

LlamaIndex provides unique advantages when paired with OpenTHC through the Model Context Protocol.

01

Data-first architecture: LlamaIndex agents combine OpenTHC tool responses with indexed documents for comprehensive, grounded answers

02

Query pipeline framework lets you chain OpenTHC tool calls with transformations, filters, and re-rankers in a typed pipeline

03

Multi-source reasoning: agents can query OpenTHC, a vector store, and a SQL database in a single turn and synthesize results

04

Observability integrations show exactly what OpenTHC tools were called, what data was returned, and how it influenced the final answer

OpenTHC + LlamaIndex Use Cases

Practical scenarios where LlamaIndex combined with the OpenTHC MCP Server delivers measurable value.

01

Hybrid search: combine OpenTHC real-time data with embedded document indexes for answers that are both current and comprehensive

02

Data enrichment: query OpenTHC to augment indexed data with live information before generating user-facing responses

03

Knowledge base agents: build agents that maintain and update knowledge bases by periodically querying OpenTHC for fresh data

04

Analytical workflows: chain OpenTHC queries with LlamaIndex's data connectors to build multi-source analytical reports

OpenTHC MCP Tools for LlamaIndex (12)

These 12 tools become available when you connect OpenTHC to LlamaIndex via MCP:

01

list_b2b_transactions

Each B2B transaction record contains the transfer ID, direction (incoming/outgoing), counterparty company, transfer status (draft, committed, received, rejected), creation date, expected fulfillment date, line items with quantities, and attached manifests or bills of lading. Essential for supply chain orchestration, logistics planning, and regulatory transfer documentation. AI agents use this to track shipment status, verify received quantities, and prepare compliance reports. List all B2B transfer transactions (incoming and outgoing)

02

list_b2c_transactions

Each transaction includes the sale ID, customer information (if recorded), sale date, line items with products and quantities, total amount, tax breakdown, dispensary location, and inventory deduction confirmations. Critical for daily sales reporting, tax calculation verification, inventory reconciliation, and regulatory sales limit enforcement. AI agents should query this to analyze sales patterns, verify compliance with purchase limits, and prepare end-of-day reports. List all retail B2C sales transactions

03

list_companies

Use this to understand which organizations are part of your regulatory network, including license holders, cultivators, processors, distributors, and retailers. Each company record contains legal identification data, registration status, and associated license information. Essential for multi-company operations and B2B transaction verification. List all companies registered in the OpenTHC compliance engine

04

list_contacts

Each contact includes company affiliation, contact type (B2B partner, regulatory agency, logistics provider), communication details, and relationship status. Use this to identify verified trading partners before creating B2B transfer orders or compliance documentation. List all business contacts in the OpenTHC network

05

list_inventory

Each inventory item displays the lot number, item type, quantity with unit of measurement, storage location, creation date, chain of custody history, and compliance status. Fundamental for stock reconciliation, audit preparation, transfer order creation, and regulatory reporting. AI agents should query this before fulfilling orders or conducting inventory audits. List all inventory items with quantities and locations

06

list_lab_results

Each result includes the lab result ID, linked sample, testing laboratory accreditation, full analytical results (THC/CBD potency, terpene profile, contaminant levels), pass/fail determination, and the official CoA document reference. Critical for regulatory compliance, product labeling accuracy, retail menu display, and consumer transparency. AI agents should reference this to verify product safety before sale or transfer. List all laboratory test results and certificates of analysis

07

list_lab_samples

Each sample contains the sample ID, linked inventory lot, sample type (flower, edible, concentrate), test panel requested (potency, pesticides, heavy metals, mycotoxins, microbials, residual solvents), submission date, testing laboratory, and current analysis status. Essential for quality assurance workflows, batch release decisions, and compliance with mandatory testing regulations. AI agents should check this to determine if a batch has pending or cleared lab results. List all laboratory samples submitted for testing

08

list_licenses

Each license contains the license type, expiration dates, regulatory conditions, and approval status. Critical for compliance verification — AI agents should check this before initiating any regulated activity to ensure the proper license is active and valid for the intended operation. List all cannabis licenses associated with your account

09

list_plants

Each plant record contains the unique plant ID (POP/PIP tags), growth stage (vegetative, flowering, harvesting), strain/variety, location within the facility (room, rack, shelf), planting date, and estimated harvest window. Critical for cultivation management, compliance reporting, and seed-to-sale traceability. AI agents use this to monitor crop health, predict harvest timelines, and ensure regulatory plant count limits are respected. List all cannabis plants in active cultivation

10

list_products

Each product entry contains the product name, type classification, SKU, potency information (THC/CBD percentages), package sizes, and regulatory tags. Essential for retail operations, menu generation, and B2B sales order creation. AI agents should reference this when checking product availability or creating sales transactions. List all cannabis products in your inventory catalog

11

list_sections

Each section entry includes the section ID, name, purpose classification (vegetation room, flowering room, drying room, processing area, retail floor, warehouse), environmental parameters, and capacity limits. Essential for spatial inventory tracking, cultivation workflow organization, facility compliance inspections, and operational planning. AI agents use this to assign plants to specific rooms during cultivation activities, locate inventory within the facility, and generate room-level production reports. List all facility sections and cultivation areas

12

list_varieties

Each variety record contains the variety ID, strain name (e.g., Blue Dream, OG Kush, Sour Diesel), genetics type (Type I - THC dominant, Type II - Mixed THC/CBD, Type III - CBD dominant), breeder information, and associated cultivation characteristics. Fundamental for cultivation planning, product labeling, genetic tracking, and regulatory strain registration. AI agents reference this when creating new plant records, generating product labels, or analyzing strain performance metrics. List all cannabis varieties (strains) in the system

Example Prompts for OpenTHC in LlamaIndex

Ready-to-use prompts you can give your LlamaIndex agent to start working with OpenTHC immediately.

01

"List all our active cannabis licenses and verify which ones are expiring soon."

02

"Show me all plants currently in flowering stage in Room 3 and estimate harvest readiness."

03

"Check inventory levels for all THC-dominant flower products and show me pending lab results."

Troubleshooting OpenTHC MCP Server with LlamaIndex

Common issues when connecting OpenTHC to LlamaIndex through the Vinkius, and how to resolve them.

01

BasicMCPClient not found

Install: pip install llama-index-tools-mcp

OpenTHC + LlamaIndex FAQ

Common questions about integrating OpenTHC MCP Server with LlamaIndex.

01

How does LlamaIndex connect to MCP servers?

Use the MCP client adapter to create a connection. LlamaIndex discovers all tools and wraps them as query engine tools compatible with any LlamaIndex agent.
02

Can I combine MCP tools with vector stores?

Yes. LlamaIndex agents can query OpenTHC tools and vector store indexes in the same turn, combining real-time and embedded data for grounded responses.
03

Does LlamaIndex support async MCP calls?

Yes. LlamaIndex's async agent framework supports concurrent MCP tool calls for high-throughput data processing pipelines.

Connect OpenTHC to LlamaIndex

Get your token, paste the configuration, and start using 12 tools in under 2 minutes. No API key management needed.