@pipeworx/alaska-code

Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/alaska-code’s. Install: one-click buttons

Connect to just the @pipeworx/alaska-code pack

https://gateway.pipeworx.io/alaska-code/mcp — only @pipeworx/alaska-code’s own tools, nothing else in the catalog.

No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.

Tools: 2

Alaska Statutes (Alaska Code) — current statutory text by citation, and topic/keyword search over official chapter catchlines, sourced live from www.akleg.gov.

Tools

  • ak_statute({citation}) — full text of one section by citation (e.g. "4.11.010" / "AS 04.11.010", alcohol-license requirements; "11.41.100", murder), with the official catchline and title/chapter context.
  • ak_search({query, limit?}) — topic/keyword search over the 942 live chapter catchlines across all 47 titles, e.g. "alcohol license", "murder". Not full-text search, and not section-level — akleg.gov exposes neither keylessly (see “Data sources”).

Auth

Keyless. No signup, no activation gate.

Data sources

https://www.akleg.gov/basis/statutes.asp — the Alaska State Legislature’s own public statute viewer. It is driven as a GET AJAX endpoint (the page’s own scripts/statutes.js calls it this way):

  • ?media=print&secStart={citation}&secEnd={citation} — statute text for the half-open citation range [secStart, secEnd). Citation shape is title.chapter.section, e.g. 4.11.010. ak_statute always requests a single section (secEnd = the next section number) and gets back exactly one statute div block with no preceding Article/Chapter heading markup.
  • ?media=js&type=TOC&title={N} — the chapter list (number + official catchline) for Title N. Baked once into src/ak-index-data.ts by scripts/bake-index.mjs (47 requests, one per title).

Verified live from both a laptop and a wrangler dev --remote Worker on the prod account on 2026-10-07 — identical byte lengths from both origins. Keyless, access-control-allow-origin: *.

The “not found” signal

A secStart/secEnd range that matches nothing — a nonexistent title, a nonexistent chapter, or a genuine gap number inside a real chapter — always comes back HTTP 200 with a zero-length body and no FirstSec/LastSec response headers (all three cases verified live). A real section returns a non-empty body. ak_statute branches on body length, not status code — a non-200 status, or a non-empty body that does not parse as a statute fragment, is thrown loud (httpError / a parse-error Error), never folded into found: false.

Not the same wall as Arkansas or Mississippi

Both of those states’ own legislature sites link their code out to lexisnexis.com/hottopics/<state>code/, which redirects to an advance.lexis.com/container?config=... SPA shell requiring a Lexis session — confirmed live and at the edge (same destination host, same 3,696-byte shell, for both states). Alaska’s own site serves the statute text itself, server-side, with no redirect to any third-party platform.

Two capabilities available, two not

  • Citation lookup — ak_statute.
  • Topic/keyword search — ak_search, over official CHAPTER catchlines only (942 of them). akleg.gov’s type=TOC call returns "No Sections" for a dotted (title.chapter) argument rather than a per-section listing (verified live) — unlike Idaho, there is no section-level catchline feed to bake.
  • Amendment history — NOT AVAILABLE. Unlike Idaho, the statute fragment this endpoint returns carries no trailing history citation (checked against AS 11.41.100, a frequently amended section with multiple [Repealed, ...] sub-paragraphs and nothing after them).
  • Historical version (text as it read before an amendment) — NOT AVAILABLE, for the same reason as idaho-code and north-dakota-code: Session Laws are organized by session chapter number, not by Code citation.

Encoding

akleg.gov declares charset=ISO-8859-1 and means it literally — the one non-ASCII byte observed in testing (0xA7, the section sign § in a "[Repealed, § 44 ch 102 SLA 1980.]" note) decodes correctly as Latin-1. src/index.ts decodes the raw response bytes with TextDecoder('iso-8859-1'), not UTF-8.

Baked index refresh

src/ak-index-data.ts is GENERATED by scripts/bake-index.mjs from the 47 title TOC pages (942 chapters captured, ~70KB raw — small enough to stay a plain module import rather than going through the pack-baked-indexes.json / KV path south-dakota-code and idaho-code use for multi-MB tables). Re-run it after a legislative session’s codification pass:

node scripts/bake-index.mjs > src/ak-index-data.ts

Tools

  • ak_statute — Get the FULL TEXT of a section of the Alaska Statutes (Alaska Code) by citation. “4.11.010” (AS 04.11.010) is alcohol-license requirements; “11.41.100” (AS 11.41.100) is murder in the first degree. Ac
  • ak_search — Search the Alaska Statutes BY TOPIC or keyword rather than citation — “alcohol license”, “murder”, “child custody”. Matches against the Alaska Legislature’s own official CHAPTER catchlines (942 of the

Tools

  • ak_search — Search the Alaska Statutes BY TOPIC or keyword rather than citation — alcohol license , murder , child custody . Matches against the Alaska Legislature's own official CHAPTER catchlines (942 of them,
  • ak_statute — Get the FULL TEXT of a section of the Alaska Statutes (Alaska Code) by citation. 4.11.010 (AS 04.11.010) is alcohol-license requirements; 11.41.100 (AS 11.41.100) is murder in the first degree. Accept

Regenerated from source · build October 7, 2026