Vinkius
OpenTHC logo
Vinkius
Vinkius runs on LangChain

How to Use the OpenTHC MCP in LangChain

Run multi-step cannabis compliance chains in LangChain to audit inventory, trace plants, and verify lab results without manual entry.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

OpenTHC MCP on Cursor AI Code Editor MCP Client OpenTHC MCP on Claude Desktop App MCP Integration OpenTHC MCP on OpenAI Agents SDK MCP Compatible OpenTHC MCP on Visual Studio Code MCP Extension Client OpenTHC MCP on GitHub Copilot AI Agent MCP Integration OpenTHC MCP on Google Gemini AI MCP Integration OpenTHC MCP on Lovable AI Development MCP Client OpenTHC MCP on Mistral AI Agents MCP Compatible OpenTHC MCP on Amazon AWS Bedrock MCP Support
MCP Servers — Included with Plan
Vinkius runs on LangChain

Connect OpenTHC MCP to LangChain

Create your Vinkius account to connect OpenTHC to LangChain — we handle the hosting, security, and runtime updates so you don't have to. No server setup required.

GDPR Included with Plan

Key Capabilities

Chain compliance checks with LangChain

`list_licenses` pulls active state permits so your LangChain agent can verify regulatory standing before touching any inventory. Your workflow chains this output directly into `list_inventory` to ensure you only move compliant stock. This chain-of-custody automation stops state compliance mismatches before they hit the state registry. By feeding these outputs into your next chain link, you eliminate manual data entry. LangSmith tracks every tool execution, giving you full visibility into API latency and token usage during compliance audits.

Track seed-to-sale lineage in LangChain

`list_plants` tracks active cultivation batches to monitor growth stages and room locations across your facility. A LangChain ReAct agent uses this tool to cross-reference physical plant counts with digital compliance records automatically. This keeps your physical-to-digital inventory parity at 100% without human intervention. The agent passes plant IDs straight to `list_sections` to verify room capacities. If a room is full, the chain halts, preventing regulatory infractions before you move a single pot.

Auto-verify B2B transfers using this MCP Server

`list_b2b_transactions` retrieves incoming and outgoing transfer manifests to reconcile shipments against physical arrivals. Your LangChain agent runs this check hourly to flag quantity discrepancies. This stops shipping errors from triggering state audits. The agent couples this with `list_lab_results` to confirm every incoming batch has a passing Certificate of Analysis. You never accept a transfer of un-tested cannabis products again.

Setup guide

Set up OpenTHC MCP in LangChain

Prerequisites

  • Python 3.10+ installed
  • langchain-mcp-adapters + langgraph packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChain BaseTool objects.

  2. 2

    Connect via HTTP transport

    Use MultiServerMCPClient with "transport": "http" pointing to your Vinkius endpoint. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Create a ReAct agent

    Pass the discovered tools to create_react_agent() from LangGraph. The agent automatically routes OpenTHC tool calls through the MCP protocol.

  4. 4

    Run with any LLM

    Swap ChatOpenAI for ChatAnthropic, ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.

agent.py
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI

async with MultiServerMCPClient({
    "openthc-mcp": {
        "transport": "http",
        "url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
    }
}) as client:
    tools = client.get_tools()

    agent = create_react_agent(
        ChatOpenAI(model="gpt-4o"),
        tools,
    )
    result = await agent.ainvoke({
        "messages": "List recent OpenTHC transactions"
    })
    print(result["messages"][-1].content)

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by OpenTHC. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about OpenTHC MCP in LangChain

Spin up the connection using `MultiServerMCPClient` pointed to your Vinkius endpoint. Call `client.get_tools()` to extract the tools and pass them directly to your LangGraph agent constructor. This lets your agent call OpenTHC compliance endpoints dynamically.
Yes, because the ReAct framework natively supports multi-step reasoning loops. Your agent calls `list_inventory` to find un-tested lots, then passes those IDs to `list_lab_samples` in the next loop. This setup handles complex compliance workflows without hardcoded logic.
LangChain chains manage rate limits through built-in retry logic and LangSmith tracing. You monitor latency and token costs for every call to `list_b2c_transactions` or `list_plants`. This prevents your agent from hitting state database walls during peak dispensary hours.
Absolutely. Mix these compliance tools with over 500 existing LangChain integrations, like SQL databases or shipping APIs. This lets you build chains that pull a B2B transfer from `list_b2b_transactions` and update your internal ERP simultaneously.
Vinkius runs this server inside an isolated V8 sandbox, meaning your private cannabis license numbers and retail transaction logs never touch public servers. All communication with OpenTHC occurs over encrypted channels. Ephemeral execution ensures your API tokens are wiped from memory immediately after each query.

Start using the OpenTHC MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 12 tools

We've already built the connector for OpenTHC. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 12 tools are live and waiting. You're up and running in seconds.

Vinkius runs on Claude Claude
Vinkius runs on ChatGPT ChatGPT
Vinkius runs on Cursor Cursor
Vinkius runs on Gemini Gemini
Vinkius runs on Windsurf Windsurf
Vinkius runs on VS Code VS Code
Vinkius runs on JetBrains JetBrains
Vinkius runs on Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.