Skip to main content
Glama
varnent

DistroKid CSV MCP

by varnent

DistroKid CSV MCP (unofficial) — v0.2.0 candidate

A read-only, local stdio MCP server for authorized royalty CSV exports. Not affiliated with DistroKid; does not log in, access accounts, contact a remote API, or deploy a service.

Quick start

Requires Node.js 20+.

npm ci --ignore-scripts
npm run check
npm test
mkdir -p data
cp examples/sample-earnings.csv data/report.csv
DISTROKID_CSV_DIR="$(pwd)/data" npm start

Connect using an MCP client that supports local stdio servers. The server exposes list_reports and report_summary.

Related MCP server: Amazon FBA Ops MCP Server

v0.2 changes

  • Earnings and quantities use integer-backed decimal calculations, with up to 12 fractional places and 24 total digits per input. Output totals are decimal strings to avoid precision loss in JSON. This is an intentional change from v0.1 numeric output.

  • Currency is required for nonempty reports. Provide a Currency, Currency Code, or Payment Currency CSV column, or pass the optional currency parameter to report_summary. Mixed currencies and conflicting codes are rejected. Codes must be three letters; the implementation does not verify an authoritative ISO 4217 list or perform exchange conversion.

  • Detects supported header aliases and rejects duplicate or ambiguous columns. Schema detection currently recognizes a generic royalty CSV; it does not claim to identify specific DistroKid export versions.

  • Retains basename-only paths, symlink escape protection, 5 MiB file limit, 50,000 row limit, and no raw row responses.

  • CI checks Node 20 and 22, JavaScript syntax, tests, and high-severity dependency advisories. Dependency installation uses the committed package-lock.json with npm ci --ignore-scripts for reproducibility.

CSV headers

Artist: Artist, Artist Name. Title: Title, Track, Track Title, Song, Song Title. Store: Store, Service, Platform, Streaming Service. Earnings (required): Earnings, Amount, Net Earnings, Royalty, Royalties, Total Earned. Quantity: Quantity, Streams, Plays, Units. Date: Date, Sale Date, Report Date, Month. Currency: Currency, Currency Code, Payment Currency.

No normalization of dates or unit types is attempted. Earnings must be nonblank decimal values. An optional leading sign, then an optional dollar sign, and correctly grouped thousands separators are supported (for example, -$1,234.50). Internal whitespace, misplaced symbols, and malformed grouping are rejected. Blank optional quantities are treated as zero; explicit currency remains mandatory because a dollar sign alone is ambiguous. Review the source export's units and accounting definitions.

Security and limitations

No credentials, OAuth, network listener, hosted MCP endpoint, deployment, or access to real artist data. Do not commit sensitive CSV files. The data/ directory and .env are gitignored. Only process exports you are authorized to use. Files are loaded in memory after size checks; avoid sharing the data directory with untrusted local processes. Not yet financial-grade reconciliation, multi-user hosting, or an installable ChatGPT app.

Roadmap

  • Validate against redacted real export headers, add fixtures for versioned schemas.

  • Add precise date filtering, currency code allowlist, and financial reconciliation tests.

  • Pin GitHub Actions to reviewed commit SHAs.

  • Design a separate HTTPS MCP service with user authorization and tenant isolation, without deploying it.

MIT licensed. See LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for YNAB that provides tools for budgets, accounts, categories, transactions, and financial summaries via HTTP or stdio.
    1
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A local MCP server that enables querying Amazon Selling Partner API for profitability analysis (revenue, fees, COGS, net margin) and inventory alerts (FBA stock levels and low-stock warnings) using read-only operations.
    9
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP-compatible clients to query a local MoneyWiz SQLite database through a permanently read-only, local-first interface with Decimal-safe per-currency results for accounts, transactions, categories, payees, tags, budgets, scheduled transactions, and cashflow summaries.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A local, read-only MCP server that reconciles Stripe payouts against bank deposits and QuickBooks or Xero books against bank statements month by month from existing CSV exports, reporting what does not tie with the likely reason. It accepts file paths only, requires no account or bank linking, and writes nothing.
    MIT