rcw-mcp
An MCP server for the Revised Code of Washington (RCW) that enables retrieving full statutory text by citation, searching for citations by partial reference, and finding bills that affect a given citation.
README
chaimp-mcp-rcw
A small Model Context Protocol (MCP) server for the Revised Code of Washington (RCW) — Washington State statutes. Built as a learning project: a stdio MCP server in TypeScript that Claude Code (or any MCP client) can call.
Tools
| Tool | What it does | Source |
|---|---|---|
get_section |
Full text of an RCW section by cite (e.g. 9A.36.021) — caption, statutory text, history/notes |
scrapes app.leg.wa.gov/RCW HTML |
search |
Find RCW citations matching a partial cite (e.g. 9A.36 → 9A.36.011, 9A.36.021, …) |
lawdoccitelookup.leg.wa.gov JSON API |
cite_affected |
Bills in a biennium that amend/affect a cite | wslwebservices.leg.wa.gov SOAP service |
Note on search
Washington exposes no public full-text RCW search API. search matches
citations, not keywords — "assault" returns nothing, "9A.36" returns the
sections in that chapter. Use it to discover cites, then pass them to get_section.
Data sources (all public, read-only, no keys)
- Section text:
https://app.leg.wa.gov/RCW/default.aspx?cite=<CITE>(HTML, parsed with cheerio) - Cite lookup:
https://lawdoccitelookup.leg.wa.gov/v1/rcw/<query>/<limit>(JSON) - Affecting bills:
https://wslwebservices.leg.wa.gov/rcwciteaffectedservice.asmxoperationGetLegislationAffectingRcwCite(SOAP 1.1)
Setup
git clone https://github.com/RetiredOnMyTerms/rcw-mcp.git
cd rcw-mcp
npm install
npm run typecheck # tsc --noEmit
npm run smoke # hit all three data sources, print results
Add to Claude Code
Run these from the repo root — $(pwd) / $(Get-Location) fills in the
absolute path, so nothing is machine-specific.
Run source directly with tsx (no build step):
# macOS / Linux / Git Bash
claude mcp add rcw --scope user -- npx tsx "$(pwd)/src/index.ts"
# Windows PowerShell
claude mcp add rcw --scope user -- npx tsx "$(Get-Location)\src\index.ts"
Or build and point at the compiled output:
npm run build
claude mcp add rcw --scope user -- node "$(pwd)/dist/index.js"
See INSTALL.md for full details and other MCP clients.
Then in a Claude Code session:
- "Get RCW 9A.36.021" →
get_section - "What RCW sections are in chapter 42.56?" →
search - "What bills in 2007-08 affected RCW 9A.36.021?" →
cite_affected
Inspect standalone
npm run inspector # opens the MCP Inspector against the server
Layout
src/
index.ts MCP bootstrap: registers the 3 tools, stdio transport
http.ts fetch wrapper (User-Agent, timeout, normalized errors, SOAP POST)
cache.ts in-memory TTL cache
tools/
getSection.ts scrape + parse a section page (cheerio)
search.ts cite-lookup JSON client
citeAffected.ts SOAP call + XML parse (fast-xml-parser)
scripts/
smoke.ts direct end-to-end test of all three tools
Notes / limitations
- Scraper selectors track the current
app.leg.wa.govmarkup; if the site changes,get_sectionreturns an honest error rather than garbage. get_sectioncaches parsed sections in memory for 1 hour (process lifetime).- All statute content is © the State of Washington; this tool only fetches and formats public pages.
License
MIT © James Whelan. Covers this tool's code only — RCW statutory text is a work of the State of Washington.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.