metaxisdata

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0

README

Language / 语言: English | 中文

Metaxisdata

Metaxisdata is a self-hosted data governance and metadata platform. It connects to MySQL/TiDB and PostgreSQL instances, syncs their schemas into a searchable metadata registry, and derives table- and column-level lineage from SQL definitions and ingested OpenLineage events.

Features

  • Metadata registry — Sync the schemas of your instances into one searchable registry. Every table and column carries its DDL and a history of what changed.
  • Table and column lineage — Lineage is analyzed from view, materialized-view, and manual SQL, precise down to the column. Expand the graph by depth, or follow a single column's trail.
  • OpenLineage — Ingest run events, map namespaces, and issue API keys. Browse jobs, datasets, and events, with links back to Airflow.
  • SQL explanation — LLM-assisted explanation of a SQL statement, scoped to the metadata you select, with caching.
  • Access control and audit — Users, groups, named roles, and an access-policy editor. Audited operations are recorded in an audit log that is kept forever.
  • Agent integration — The mxd CLI (cli/README.md) gives an agent one JSON document per command, stable exit codes, and device login. With MCP enabled, the registry is also available as read-only tools behind an OAuth 2.1 authorization server (docs/mcp.md).

Quick start

You need Docker and a PostgreSQL database the container can reach. Images are published to GHCR for linux/amd64 and linux/arm64:

docker run -d --name metaxisdata \
  -p 8083:8083 \
  -e PG_URL='postgres://user:password@db-host:5432/metaxisdata?sslmode=disable' \
  ghcr.io/ranxy/metaxisdata:latest

Without Docker at hand, every release also publishes the same server as static binaries for five platforms — download one from GitHub Releases and run it directly; the deploy guide's Get the server section shows how.

Open http://<host>:8083 and:

  1. Create the first account. It becomes the workspace administrator.
  2. Add an instance and sync its schema.

Optional next steps:

  • Close self-service signup. Turn on Disallow self-service signup in Settings → General, so only administrators can create users.
  • Serve HTTPS. The container serves plain HTTP by design. Terminate HTTPS in a reverse proxy in front of it, and set METAXISDATA_TRUSTED_PROXIES to the proxy's address so the audit log records clients instead of the proxy.
  • Protect stored credentials. Set METAXISDATA_ENCRYPTION_KEY so a database dump alone cannot decrypt the credentials stored for your instances — and keep that key safe: losing it leaves the stored credentials unreadable.
  • Connect MCP clients. Enable the MCP endpoint in Settings → General — it requires the workspace external URL — then follow docs/mcp.md.

The complete deployment guide — every environment variable, the health and version endpoints, the prebuilt binary, and building the image or the binary yourself — is docs/deploy.md.

Trying it locally

docker-compose.yml starts PostgreSQL and the server together, so one command is enough to look at a built image on your own machine:

make docker-up      # build the image, then start PostgreSQL + the server on http://localhost:8083
make docker-down    # stop both; the compose data volume is kept

Open http://localhost:8083 and create the first account. The stack makes taking a build for a spin easy — published port, hardcoded development password — and is not meant for production. Details and caveats are in docs/local-trial.md.

Screenshots

Metadata browser — the table list of a synced database, with row counts, sizes, columns, and indexes.

Table and column lineage — a table's upstream and downstream edges, expanded down to per-column trails.

How it works

  • One Go server binary serves the ConnectRPC API and the frontend — a Vue 3 single-page application embedded in the image — on port 8083. When MCP is enabled, the MCP endpoint is served on the same port.
  • PostgreSQL is the only external dependency. The schema migrates itself on startup, so a fresh database needs nothing but a connection URL.
  • Background runners sync schemas, analyze and validate lineage, and run maintenance tasks.

Development

# Backend — requires PG_URL; port 8083 matches the Vite proxy
PG_URL='postgres://dev:dev@localhost:5432/metaxisdata?sslmode=disable' go run ./backend/bin/server/main.go --debug

# Frontend — Node 24+, Vite on :3000, proxying API, OAuth, and MCP routes to the backend
pnpm --dir frontend install
pnpm --dir frontend dev

# Build
make build           # dev profile
make build-release   # release profile
make build-embed     # release profile with the SPA embedded in the binary
make build-cli       # the mxd client, ./build/mxd

A build without the embed tag serves a placeholder page instead of the SPA: run the Vite dev server, or build with make build-embed.

go test ./... needs no database. The integration suites run the real server against PostgreSQL and MySQL behind the integration build tag, and skip when Docker is unavailable:

make test-integration-smoke
make test-integration

Development conventions, lint rules, and the full command set: AGENTS.md.

Tech stack

  • Backend: Go, PostgreSQL, ConnectRPC (gRPC/HTTP), Protobuf / buf
  • Frontend: Vue 3, TypeScript, Vite, Tailwind CSS, shadcn-vue
  • CLI: Go

Directories

Path Synopsis
backend
api/auth
Package auth handles the auth of gRPC server.
Package auth handles the auth of gRPC server.
api/oauth
Package oauth implements the deployment's OAuth 2.1 authorization server, which exists to authorize MCP clients: MCP clients discover it through the protected-resource metadata document, send the user through the authorization-code flow with PKCE, and then present the resulting audience-bound access token to the MCP endpoint.
Package oauth implements the deployment's OAuth 2.1 authorization server, which exists to authorize MCP clients: MCP clients discover it through the protected-resource metadata document, send the user through the authorization-code flow with PKCE, and then present the resulting audience-bound access token to the MCP endpoint.
bin/server command
common
Package common provides common libraries for the service.
Package common provides common libraries for the service.
common/crypto
Package crypto encrypts the credentials the server keeps in its own database: the instance and data source credentials, and the LLM provider API keys.
Package crypto encrypts the credentials the server keeps in its own database: the instance and data source credentials, and the LLM provider API keys.
common/permission
Package permission defines the metaxisdata permission catalog.
Package permission defines the metaxisdata permission catalog.
common/permission/gen command
Command gen regenerates permission_gen.go from permission.json.
Command gen regenerates permission_gen.go from permission.json.
common/version
Package version carries the server binary build metadata.
Package version carries the server binary build metadata.
component/audit
Package audit holds the audit-row primitives shared by the Connect interceptors and any other writer of audit records.
Package audit holds the audit-row primitives shared by the Connect interceptors and any other writer of audit records.
component/dbfactory
Package dbfactory includes the database driver factory.
Package dbfactory includes the database driver factory.
component/iam
Package iam implements the metaxisdata permission-check engine.
Package iam implements the metaxisdata permission-check engine.
component/llm
Package llm provides LLM client capabilities.
Package llm provides LLM client capabilities.
component/notification
Package notification delivers in-app messages to users: the outcome of a sync operation somebody asked for, and the failures a workspace administrator needs to see.
Package notification delivers in-app messages to users: the outcome of a sync operation somebody asked for, and the failures a workspace administrator needs to see.
generated-go/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
mcp
Package mcp is the MCP resource server: the read-only tool table served on /mcp, the adapters that make its authentication and authorization identical to the ConnectRPC path, and the guidance it publishes to clients.
Package mcp is the MCP resource server: the read-only tool table served on /mcp, the adapters that make its authentication and authorization identical to the ConnectRPC path, and the guidance it publishes to clients.
migrator
Package migrator applies and upgrades the metaxisdata metadata schema.
Package migrator applies and upgrades the metaxisdata metadata schema.
plugin/db
Package db provides the interfaces and libraries for database driver plugins.
Package db provides the interfaces and libraries for database driver plugins.
plugin/db/mssql
Package mssql is the plugin for MSSQL driver.
Package mssql is the plugin for MSSQL driver.
plugin/db/mysql
Package mysql is the plugin for MySQL driver.
Package mysql is the plugin for MySQL driver.
plugin/db/pg
Package pg is the plugin for PostgreSQL driver.
Package pg is the plugin for PostgreSQL driver.
plugin/db/starrocks
Package starrocks is the plugin for the StarRocks and Doris drivers.
Package starrocks is the plugin for the StarRocks and Doris drivers.
plugin/dmltarget
Package dmltarget answers one question about a DML statement: which table does it write?
Package dmltarget answers one question about a DML statement: which table does it write?
plugin/idp
Package idp is the plugin for Identity Provider.
Package idp is the plugin for Identity Provider.
plugin/idp/oauth2
Package oauth2 is the plugin for OAuth2 Identity Provider.
Package oauth2 is the plugin for OAuth2 Identity Provider.
plugin/lineage/algorithm
Package algorithm holds the parts of lineage analysis that do not depend on the SQL dialect: how a lineage edge is identified for deduplication, how a row-set predicate is attributed to the scope whose rows it decides, and how the arms of a set operation merge.
Package algorithm holds the parts of lineage analysis that do not depend on the SQL dialect: how a lineage edge is identified for deduplication, how a row-set predicate is attributed to the scope whose rows it decides, and how the arms of a set operation merge.
plugin/lineage/engines
Package engines assembles the SQL lineage analyzers this build supports.
Package engines assembles the SQL lineage analyzers this build supports.
plugin/lineage/mariadb
Package mariadb provides direct lineage analysis for MariaDB queries.
Package mariadb provides direct lineage analysis for MariaDB queries.
plugin/lineage/mysql
Package mysql provides direct lineage analysis for MySQL queries.
Package mysql provides direct lineage analysis for MySQL queries.
plugin/lineage/mysql/gen command
Command gen copies the shared MySQL-family analyzer body into the TiDB and MariaDB packages.
Command gen copies the shared MySQL-family analyzer body into the TiDB and MariaDB packages.
plugin/lineage/postgresql
Package postgresql provides direct lineage analysis for PostgreSQL queries.
Package postgresql provides direct lineage analysis for PostgreSQL queries.
plugin/lineage/starrocks
Package starrocks provides direct lineage analysis for StarRocks queries.
Package starrocks provides direct lineage analysis for StarRocks queries.
plugin/lineage/testutil
Package testutil provides common test utilities for lineage analysis tests.
Package testutil provides common test utilities for lineage analysis tests.
plugin/lineage/tidb
Package tidb provides direct lineage analysis for TiDB queries.
Package tidb provides direct lineage analysis for TiDB queries.
plugin/sqlsanitize
Package sqlsanitize turns one application SQL statement into the two forms the application-SQL ingest path keeps: a literal-free text that is safe to store, and a canonical form whose hash is the statement's deduplication key.
Package sqlsanitize turns one application SQL statement into the two forms the application-SQL ingest path keeps: a literal-free text that is safe to store, and a canonical form whose hash is the statement's deduplication key.
runner/lineageanalyzer
Package lineageanalyzer is a runner that analyzes SQL definitions to produce column-level lineage.
Package lineageanalyzer is a runner that analyzes SQL definitions to produce column-level lineage.
runner/lineagevalidation
Package lineagevalidation re-checks ingested lineage whose endpoints the metadata registry did not know when it was stored.
Package lineagevalidation re-checks ingested lineage whose endpoints the metadata registry did not know when it was stored.
runner/maintenance
Package maintenance runs the periodic housekeeping pass: it prunes rows that are already invisible (expired caches) or that a retention window explicitly bounds (the LLM debug log, OpenLineage runs).
Package maintenance runs the periodic housekeeping pass: it prunes rows that are already invisible (expired caches) or that a retention window explicitly bounds (the LLM debug log, OpenLineage runs).
runner/schemasync
Package schemasync is a runner that synchronize database schemas.
Package schemasync is a runner that synchronize database schemas.
test/integration/dockerutil
Package dockerutil centralizes how the integration harnesses decide whether a Docker-compatible container runtime is reachable.
Package dockerutil centralizes how the integration harnesses decide whether a Docker-compatible container runtime is reachable.
cli
Command mxd is a client for a metaxisdata server, built for agents: every command writes one JSON document to stdout and reports progress on stderr.
Command mxd is a client for a metaxisdata server, built for agents: every command writes one JSON document to stdout and reports progress on stderr.
authflow
Package authflow drives the device login: it asks the server for a request, tells the person where to approve it, and polls until the server has an answer.
Package authflow drives the device login: it asks the server for a request, tells the person where to approve it, and polls until the server has an answer.
client
Package client builds the ConnectRPC clients the CLI talks through and maps failures onto the exit codes an agent branches on.
Package client builds the ConnectRPC clients the CLI talks through and maps failures onto the exit codes an agent branches on.
cmd
Package cmd wires the mxd command tree.
Package cmd wires the mxd command tree.
config
Package config reads and writes the CLI's credentials file.
Package config reads and writes the CLI's credentials file.
env
Package env reads the METAXISDATA_* environment, which is where a project's analysis scopes come from.
Package env reads the METAXISDATA_* environment, which is where a project's analysis scopes come from.
output
Package output renders command results.
Package output renders command results.
skill
Package skill carries the agent-facing skill that ships inside the mxd binary.
Package skill carries the agent-facing skill that ships inside the mxd binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL