by malloydata
Publisher is the open-source analytics engine for Malloy. It lets you define data models once — and use them everywhere.
# Add to your Claude Code skills
git clone https://github.com/malloydata/publisherpublisher is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by malloydata. Publisher is the open-source analytics engine for Malloy. It lets you define data models once — and use them everywhere. It has 136 GitHub stars.
publisher's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/malloydata/publisher" and add it to your Claude Code skills directory (see the Installation section above).
publisher is primarily written in TypeScript. It is open-source under malloydata on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh publisher against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Modeling, a query engine, materialization, access control, and an API — the pieces you used to assemble from five projects — ship as one server, built assuming the first builder or consumer is an agent.
Write down what your data means, in Malloy: the sources, the joins, the measures, who may see what. The open-source Malloy skills ship alongside, so an agent can do the writing — build the model, then the reports and data apps on top of it.
Publisher serves that model to every surface — over MCP to Claude, Cursor, Codex, or an agent you build; over REST to applications and BI tools. Agents compose queries against the model instead of writing SQL from scratch, so there is no wrong join, no invented column, no fan-out that double-counts but looks plausible — and the same question returns the same numbers tomorrow.
#(authorize) and #(access_filter) decide who may query and who sees what; discovery curation
decides what is even visible. Publisher is a microservice: run it locally with your own
permissions, or inside your cloud behind the gateway that authenticates your users and sets those
givens. The controls rely on that gateway (see operating model).#(materialize) annotation materializes an expensive source into a table and
#(rollup) rolls a measure up, rebuilt on demand or on a schedule.npx, Docker, or Compose, in minutes.Node.js 24 or newer (the server refuses to start on anything older and says so). Building from a clone also needs Bun 1.4.4+. The Docker image runs Publisher under Bun and needs neither.
npx @malloy-publisher/server@latest --port 4000
Open http://localhost:4000. Three example packages are bundled — storefront
(a complete ecommerce model), governed-analytics (access control), and
html-data-app (a no-build HTML data app) — all DuckDB-backed, no credentials
required. The first run fetches them from GitHub.
mkdir my-data && cd my-data
npm create @malloy-publisher/malloy-package@latest sales
npm start
This writes a package to ./sales — plus, in the current directory, a small workspace: start and
reset scripts, an MCP config, agent instructions, and the Malloy skills as files your agent can read.
npm start serves the package in watch mode, so edits take effect as you save. Keep the @latest:
without it npm may reuse a cached, older version. The finer points of npm create — caching, workspace
layout, the bare npx form — are in docs/scaffolding.md.
Agents: AGENTS.md sections 1 and 2 have the same steps plus the pitfalls around @latest,
the -- before --data, and reconnecting the MCP client after the server starts.
npm create @malloy-publisher/malloy-package@latest sales -- --data ./orders.csv
CSV, Parquet, JSON, newline-delimited JSON, or Excel .xlsx — DuckDB reads all of them in place. The
-- is required, and the path is relative to where you run the command. A seeded package starts
small: a row count and an overview, which is the moment to point an agent at it.
A package is just Malloy, so it is not limited to local files. Add a
connection — BigQuery, Snowflake, Postgres, Databricks, MotherDuck, and more —
and point the model at it; the same workspace serves a warehouse. Have the warehouse but no model yet?
Ask the agent what is in it: search_database_schema ranks a connection's tables against a
plain-English description and hands back the source: line for each. Ranking needs no API key; the
optional embedding-backed mode is in
docs/configuration.md.
Keep the server from Quick start running — or npm start from
Create a package. On startup it wrote a .mcp.json into the directory you ran it
in, pointing at the MCP port it bound. Open a second terminal, in that same directory, and start
the agent:
claude
Say yes when the agent asks to trust the folder, use the server it found, and approve the first tool call — the trust prompt is asked once per directory, and only interactively, so a headless run can't clear it. Then ask, in plain English:
"Use Malloy to explore the storefront sales data and chart revenue by category."
The agent discovers what exists (get_context), grounds itself in real source, view, and field
names, runs the query (execute_query), and answers from your model — no schema spelunking, no
hallucinated columns.
If the agent reports no Malloy tools, register the server for yourself instead of relying on that file:
claude mcp add --transport http malloy http://127.0.0.1:4040/mcp -s user
The server skips writing the file in some directories (a git working tree, your home directory, one
that already has a .mcp.json) and says so in its startup log. When it is written, why it can go
stale, and how to turn it off:
docs/configuration.md.
Cursor, VS Code, Codex, and Claude Desktop take the same endpoint — http://localhost:4040/mcp,
or whatever --mcp-port / PUBLISHER_MCP_PORT you set — through their own config; see
docs/ai-agents.md. An agent working unattended that started the server itself uses
the same loop over REST:
curl -s -X POST \
http://localhost:4000/api/v0/environments/examples/packages/storefront/models/storefront.malloy/query \
-H 'content-type: application/json' \
-d '{"query":"run: order_items -> by_category","compactJson":true}' | jq -r .result
The running server serves its full OpenAPI spec at http://localhost:4000/api-doc.yaml.
Operating model: a microservice behind your gateway. Publisher runs either locally with your own permissions, or inside your existing cloud behind the gateway or application that authenticates your users. The server, MCP and REST alike, is stateless