What Kentucky Code does
The Kentucky Code MCP server gives AI agents access to Kentucky Revised Statutes (KRS) data. It supports exact statute lookup, topic-oriented full-text search, and retrieval of the current text for a matched section. Results can include the section catchline, statutory text, effective date, and the statute's legislative history line.
The Kentucky Code MCP server is intended for research involving Kentucky state law. It belongs in the Legal category and can help an agent locate relevant provisions before a developer or legal professional reviews the underlying source.
How it works
The service uses the Kentucky Legislative Research Commission's search endpoint for both citation and topic queries. Citation searches can accept formats such as 507.020, KRS 383.580, or § 507.020. Topic searches examine the body of statutory text rather than only section titles, so a search term can find a relevant provision even when the catchline does not contain that term.
After a match is found, the service obtains the section's PDF from the Kentucky legislature website and extracts its text. A statute's history is read from the section's History: line. The Kentucky Code MCP server uses the search result to resolve the legislature's opaque section identifier, avoiding a separate chapter-index lookup.
Setup and configuration
No API key, account, signup, or environment variable is required. For a hosted MCP connection, configure an MCP client with:
{
"mcpServers": {
"kentucky-code": {
"url": "https://gateway.pipeworx.io/kentucky-code/mcp"
}
}
}
The package also runs locally over stdio with npx -y @pipeworx/mcp-kentucky-code. The local mode exposes only this pack's tools. The hosted endpoint also lists shared Pipeworx gateway tools, while both modes use the same underlying Kentucky data tools.
Tools and capabilities
ky_statute(citation) returns the current text and metadata for a KRS section.
ky_search(query, limit?) searches statutory body text and returns matching citations and catchlines.
- A citation returned by
ky_search can be passed to ky_statute for the complete section text.
- Repealed sections can still return text, with a type label identifying their status.
- Chapter or division headings are identified as non-section rows rather than treated as statutes.
Limitations and notes
The service does not provide prior versions of a statute as they existed before a particular amendment. When a historical version is unavailable, the result reports that limitation through historical_versions instead of presenting an incomplete result as current historical text.
The source provides statutory text in per-section PDFs rather than HTML pages, so extraction depends on the PDF text available from the legislature. Division and chapter headings do not have statutory text; the tool reports them as not_a_section. The integration is independent and unofficial, and it is not affiliated with, endorsed by, or published by the Kentucky legislature.