What South Dakota Code does
The South Dakota Code MCP server exposes South Dakota Codified Laws through two focused tools. sd_statute retrieves the current text of a section such as 22-16-4, along with its official catchline and chapter and title context. When available, the response also separates the section's Source: line into a history field listing session laws that enacted or amended it.
sd_search finds sections and chapters by matching a query against official catchlines. Queries can cover subjects such as landlord issues or concealed pistol permits. The search covers the code's 71 titles, but it does not search the full wording of statutes.
This package is listed in the ⚖️ Legal category and is intended for questions about current South Dakota statutory provisions, citation discovery, and limited enactment or amendment context.
How it works
For a section lookup, the South Dakota Code MCP server makes a live, keyless request to the South Dakota Legislature's public statutes API. The API returns an HTML payload inside a JSON response; the package extracts the section content and related metadata. Repealed or transferred sections can include a disposition message, and the API's repeal flag is exposed as repealed.
Search works differently. Because the source site does not provide a whole-code search endpoint, the project builds an index from title-level table-of-contents responses. That index stores citations and official catchlines and is used at request time for ranking matches. A matching citation is then checked against the live API when the statute is requested. If the baked index and live source disagree, the response reports an index_live_mismatch reason rather than silently treating the entry as absent.
Setup and configuration
The South Dakota Code MCP server requires no API key or account. Use the hosted streamable HTTP endpoint in an MCP client:
{
"mcpServers": {
"south-dakota-code": {
"url": "https://gateway.pipeworx.io/south-dakota-code/mcp"
}
}
}
It can also run locally over stdio with the published npm package:
{
"mcpServers": {
"south-dakota-code": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-south-dakota-code"]
}
}
}
The hosted endpoint includes shared Pipeworx gateway tools in addition to the pack's own tools. The standalone process exposes only this package's tools. The hosted service can also be called through its HTTP tool endpoint.
Tools and capabilities
sd_statute(citation): Returns current text for one section-shaped citation, with catchline, title and chapter context, amendment or enactment history when published, and repeal disposition data when applicable.
sd_search(query, limit?): Searches official section and chapter catchlines across all 71 titles and returns matching citations.
- Live source retrieval: Section content is fetched per request rather than served from the baked search index.
- Amendment context: A section's published source line is separated into structured history entries.
Limitations and notes
The South Dakota Code MCP server returns the current online edition only. It cannot show what a section said before a particular amendment, and its history data identifies session laws without providing prior statutory text.
Search is catchline-based, not full-text. A term appearing only in the body of a section may not produce a result. The search index must be rebuilt after South Dakota recodifies or new session laws are incorporated; the documented refresh command is node scripts/bake-index.mjs > src/sd-index-data.ts. The integration is independent and unofficial, and is not affiliated with or endorsed by the South Dakota Legislature.