npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pipeworx/mcp-ca-debtwatch

v0.1.2

Published

ca-debtwatch — California municipal bond issuance (CDIAC / DebtWatch)

Readme

@pipeworx/ca-debtwatch

California municipal bond issuance — every state and local government bond, note, certificate of participation and Mello-Roos special-tax deal reported to the California Debt and Investment Advisory Commission (CDIAC) since 1984, at issue level: principal, sale date, debt type, purpose, ratings, interest cost, issuance fees and the underwriter, municipal advisor and bond counsel on the deal.

Part of Pipeworx — an MCP gateway connecting AI agents to 1683+ live data sources.

This is primary-market issuance, not the secondary trade tape. It carries no MSRB/EMMA content and no CUSIP dependency — CDIAC publishes it as California public data.

Tools

  • ca_debt_search_issues(...) — search 76,000+ California issues by issuer, county, debt type, purpose, tax status, ESG label, sale date and principal amount. The workhorse.
  • ca_debt_issue(cdiac_number) — full detail for one issue, including issuance costs broken out by participant (underwriter takedown, advisor fee, bond and disclosure counsel fees, trustee fee, rating agency fee) and any Annual Debt Transparency Report rows filed against it in later years.
  • ca_debt_issuer_profile(issuer) — one issuer's borrowing history: total principal, issue count, date range, breakdown by debt type and purpose, largest and most recent issues.
  • ca_debt_statewide_totals() — the state treasurer's headline totals (debt issued YTD, local debt issued YTD, proposed but unsold, recent long-term volume).
  • ca_debt_filter_options(field?) — the exact wording CDIAC uses for each enumerated filter.
  • ca_debt_resolve_issuer(name) — partial name → the exact issuer names CDIAC uses.

Auth

Keyless. No registration, no key, no quota published.

Data sources

  • https://debtwatch.treasurer.ca.gov/env.json — the API base the SPA itself reads. Resolved once per isolate rather than hardcoded, with a fallback to the current value.
  • PUT /api/dataset/issues/search — issuance search. PUT, not GET or POST.
  • GET /api/dataset/issues — column metadata, including the accepted values for every enumerated filter.
  • GET /api/dataset/issues/element/Issuer/search?q=&pageNumber=N — issuer typeahead (7,600+ issuers). Paginates at ten and ignores every page-size parameter (pageSize, take, limit all no-op) while reporting the true count in totalValues; only pageNumber works. Reading page one alone makes "san diego" look like 10 issuers when it is 47, and makes an exact name that sorts onto a later page (San Diego Unified Port District) come back as ambiguous with candidates that do not contain it. This pack pages, bounded, and reports when it stopped early.
  • GET /api/report/issuance-detail-with-history/{cdiacNumber} — single-issue detail plus later ADTR filings.
  • GET /api/fast-stat — headline statewide totals.

Things worth knowing before you touch this

  • A malformed filter is an empty HTTP 500, not a 400. No body, no validation message. Filters are keyed by column id with a type discriminator, decoded from the SPA bundle: StringOneOf / StringContainsOneOf (options: []), DateBetween / DateOnOrAfter / DateOnOrBefore / DateEqualTo (minimum / maximum / exactly), NumberBetween / NumberGreaterThanOrEqualTo / NumberLessThanOrEqualTo, BooleanEqualTo (exactly). Anything else is a 500.
  • IssuerCounty is the multi-value column and needs StringContainsOneOf; sending StringOneOf against it matches nothing without erroring.
  • Text filters are exact-match on CDIAC's spelling, and a near-miss returns a clean zero-row 200 rather than an error — Los Angeles is a different issuer from Los Angeles Unified School District. Every enum argument in this pack is resolved against the upstream's own option list first, and every issuer argument through the typeahead endpoint, so a caller naming things the way a person would still gets rows. An argument that cannot be resolved is answered with candidates rather than dropped.
  • There is no values endpoint per filter. The option lists live inline in GET /api/dataset/issues, under columns[].filter.values.all, for columns whose strategy is AllAtOnce. High-cardinality columns are ByAsyncSearchOnly and only reachable through the element/{col}/search typeahead.
  • SaleDate carries future dates for proposed issues, so a descending sort surfaces deals that have not happened yet. sold_status separates them.
  • Scope is California only. There is no national equivalent on a free path — MSRB/EMMA's terms bar building a redistributable database from it.

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "ca-debtwatch": {
      "url": "https://gateway.pipeworx.io/ca-debtwatch/mcp"
    }
  }
}

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/ca-debtwatch/mcp returns the tools in the table above plus the shared Pipeworx meta-tools — ask_pipeworx, discover_tools, search_within, remember/recall and the rest of the gateway-wide set. So the tool count you see is larger than this table: a single-pack endpoint currently lists roughly 30 shared tools alongside the pack's own. The connection's initialize response states its exact scope, and is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a scoped connection answer a question this pack does not cover — via ask_pipeworx, which routes across the whole catalog — without you adding a second MCP server. There is currently no way to mount a pack endpoint without them; if the extra schemas cost you more context than the routing is worth, connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

Both URLs reach the same gateway and the same 1683+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one.

No MCP client? Call it over HTTP

curl -X POST https://gateway.pipeworx.io/v1/tools/ca_debt_search_issues \
  -H 'Content-Type: application/json' \
  -d '{"issuer":"Los Angeles Unified School District","limit":5}'

No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/ca_debt_search_issues. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.

Standalone (no gateway account)

This package also runs as a local stdio MCP server — no Pipeworx account, no gateway round-trip:

{
  "mcpServers": {
    "ca-debtwatch": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-ca-debtwatch"]
    }
  }
}

Or run it directly to confirm it starts:

npx -y @pipeworx/mcp-ca-debtwatch

It speaks MCP over stdin/stdout and answers initialize/tools/list/tools/call for only this pack's tools — none of the shared meta-tools the gateway connection above adds. Same source, same tools, no ask_pipeworx routing.

Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:

ask_pipeworx({ question: "your question about Ca Debtwatch data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT