An MCP server for querying cannabis datasets in DuckDB

An MCP server for querying cannabis datasets in DuckDB

dank-mcp•byagentdank

dank-mcp is a Model Context Protocol server that exposes a single SQL query tool over a locked-down, read-only DuckDB database, with support for downloading prebuilt cannabis dataset snapshots.

License: MIT License•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Registers a single query MCP tool that takes an SQL string and returns CSV results.
  • •Opens DuckDB read-only and disables external access so only pure SQL over local data is permitted.
  • •Can download prebuilt DuckDB snapshots from the AgentDank dank-data catalog, verifying the SHA-256 checksum before installing.
  • •Can point at any DuckDB file via the --db option.

BEST FOR

  • •LLM hosts such as Claude Desktop that need to answer questions over curated cannabis datasets.
  • •Users who want read-only SQL access to a local DuckDB file through an MCP tool.

ABOUT DANK-MCP

An MCP server for querying cannabis datasets in DuckDB is cataloged as an MCP server attributed to agentdank. dank-mcp is a Model Context Protocol server that exposes a single SQL query tool over a locked-down, read-only DuckDB database, with support for downloading prebuilt cannabis dataset snapshots. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for An MCP server for querying cannabis datasets in DuckDB are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What MCP tool does dank-mcp expose?

It exposes a single query tool that accepts a sql string argument and returns CSV.

Is the DuckDB opened safely?

The server opens DuckDB read-only with access_mode=read_only and sets enable_external_access=false so a generic SQL tool is safe.

Which datasets are available today?

Today the only dataset is us/ct, fetched from the dank-data repository.

Upstream README

View this exact version on GitHub

README.md · b84d92b03674 · Fetched 2026-11-13 10:41:13 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

AgentDank:    dank-mcp

dank-mcp is a Model Context Protocol (MCP) server for querying cannabis datasets. It is brought to you by AgentDank for educational and legal purposes.

[!NOTE] Status: under refactor. dank-mcp is being reworked toward a generic, declarative dataset-binding architecture (see Notes on Design). You can bootstrap a dataset via --fetch <id>, which downloads a prebuilt snapshot from dank-data. Today the only dataset is us/ct.


Snapshots of cannabis datasets are curated at the AgentDank dank-data repository; you can point dank-mcp at any DuckDB file via --db.

Installation

While we'd like to have pre-built binaries and Homebrew packages, we're having an issue with that right now. So the preferred way to install is using go install or building from source:

$ go install github.com/AgentDank/dank-mcp@latest

It will be installed in your $GOPATH/bin directory, which is often ~/go/bin.

Using with LLMs

To use this dank-mcp MCP server, you must configure your host program to use it. We will illustrate with Claude Desktop. We must find the dank-mcp program on our system; the example below shows where dank-mcp is installed with my go install.

The following configuration JSON (also in the repo as mcp-config.json) sets this up:

{
    "mcpServers": {
      "dank": {
        "command": "~/go/bin/dank-mcp",
        "args": [
          "--root", "~"
        ]
      }
    }
  }

Claude Desktop

Using Claude Desktop, you can follow their configuration tutorial but substitute the configuration above. With that in place, you can ask Claude questions and it will use the dank-mcp server.

Ollama and mcphost

I'm currently having issues with this working well, but leaving instructions for those interested.

For local inferencing, there are MCP hosts that support Ollama. You can use any Ollama LLM that supports "Tools". We experimented with mcphost, authored by the developer of the mcp-go library that performed the heavy lifting for us.

Here's how to install and run it with the configuration above, stored in mcp-config.json:

$ go install github.com/mark3labs/mcphost@latest
$ ollama pull llama3.3
$ mcphost -m ollama:llama3.3 --config mcp-config.json
...chat away...

Loading Data

dank-mcp can download a prebuilt DuckDB snapshot from the AgentDank dank-data repo:

$ dank-mcp --list                     # show available datasets
$ dank-mcp --fetch us/ct              # download and serve
$ dank-mcp --fetch us/ct --fetch-only # download and exit
$ dank-mcp --fetch us/ct --force      # force re-download

Downloads are cached at .dank/cache/<id>/dank-data.duckdb under --root (or the current directory). The cache is re-used for 7 days before a new download happens; use --force to override.

The snapshot's SHA-256 is verified against the catalog before install, and the local file is atomically replaced via rename — there's no window where a torn file is visible.

Command Line Usage

Here is the command-line help:

usage: ./bin/dank-mcp [opts]

      --db string         DuckDB data file to use, use ':memory:' for in-memory. Default is '.dank/dank-mcp.duckdb' under --root
      --fetch string      Dataset id to download from dank-data (e.g., us/ct)
      --fetch-only        Download only; do not start the MCP server
      --force             Force re-download even if cache is fresh (requires --fetch)
  -h, --help              Show help
      --list              List datasets from the dank-data catalog and exit
  -l, --log-file string   Log file destination (or MCP_LOG_FILE envvar). Default is stderr
  -j, --log-json          Log in JSON (default is plaintext)
      --root string       Set root location of '.dank' dir (Default: current dir)
      --sse               Use SSE Transport (default is STDIO transport)
      --sse-host string   host:port to listen to SSE connections
  -v, --verbose           Verbose logging

The server currently registers a single MCP tool, query, which takes a sql string argument and returns CSV. The DuckDB is opened read-only and further locked down via SET enable_external_access=false, so only pure SQL over local data is permitted.

Building

Building is performed with task:

$ task
task: [build] go build -o bin/dank-mcp

Notes on Design

dank-mcp is being reworked around a small set of ideas:

  1. Locked-down read-only DuckDB — the server opens DuckDB with access_mode=read_only and applies SET enable_external_access=false so exposing a generic SQL tool is safe.
  2. Generic query MCP tool — rather than hand-rolling per-dataset tools, dank-mcp exposes one query(sql) tool that runs against whatever DuckDB you point it at.
  3. Declarative dataset bindings (in progress) — pkg/dank defines a Registrar interface and JSON-taggable Binding / ResourceQuery / ToolQuery structs. The intent is that new datasets can be added as config-driven bindings rather than bespoke Go code.

The previous surface bundled a Connecticut cannabis brands dataset directly into the binary. That code has been removed; datasets will be re-introduced via the binding mechanism above.

If all you want is SQL access to a DuckDB file, MotherDuck's mcp-server-motherduck is a more general-purpose alternative. The goal of dank-mcp is to bundle cannabis-specific prompts, resources, and tools on top of that.


Contribution and Conduct

Pull requests and issues are welcome. Or fork it. You do you.

Either way, obey our Code of Conduct. Be shady, but don't be a jerk.

Credits and License

Copyright (c) 2025 Neomantra Corp. Authored by Evan Wies for AgentDank.

Released under the MIT License, see LICENSE.txt.


Made with :herb: and :fire: by the team behind AgentDank.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for An MCP server for querying cannabis datasets in DuckDB from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/dank-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage