rcw-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rcw-mcpShow me RCW 9A.36.021"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Full text of an RCW section by cite (e.g. | scrapes |
| Find RCW citations matching a partial cite (e.g. |
|
| Bills in a biennium that amend/affect a cite |
|
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.
Related MCP server: cpl-mcp
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 resultsAdd 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 serverLayout
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 toolsNotes / 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.
Available Tools
3 toolscite_affectedBills affecting an RCW citeA
List bills in a biennium that amend or affect a given RCW citation, via the Washington State Legislature SOAP web service. Biennium format is "2025-26" (defaults to the current biennium, 2025-26).
| Name | Required | Description | Default |
|---|---|---|---|
| cite | Yes | RCW cite, e.g. 9A.36.021 (or a chapter 9A.36) | |
| biennium | No | Biennium like "2025-26"; defaults to current |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden for behavioral disclosure. It adds context about the SOAP web service and the biennium default, but doesn't describe output format, error behavior, or any side effects. The read-only nature is implied by 'List,' so a score of 3 reflects the partial but not comprehensive disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary function, and adds only the essential detail about the biennium format and default. Every sentence is purposeful with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with only 2 parameters and no output schema, the description adequately covers its purpose, the default biennium, and the external service. It lacks explicit detail on return values, but the tool's simplicity and the absence of an output schema keep the score at 4 rather than lower.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides descriptions for both parameters (cite and biennium) with examples and default behavior. The description's mention of biennium format and default adds nothing beyond the schema, so with 100% schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'List' and identifies the target resource as 'bills in a biennium that amend or affect a given RCW citation,' clearly distinguishing this from sibling tools like get_section and search. The purpose is immediately evident.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the tool's context (RCW citation, biennium) and provides the default biennium behavior, but it doesn't explicitly state when to use this tool over siblings or mention exclusions. This is clear context without explicit alternatives, matching a score of 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sectionGet RCW sectionA
Return the full text of a Revised Code of Washington (RCW) section by its citation, e.g. 9A.36.021. Includes the caption, statutory text, and history/notes. Source: app.leg.wa.gov.
| Name | Required | Description | Default |
|---|---|---|---|
| cite | Yes | Section-level RCW cite, e.g. 9A.36.021 or 42.56.070 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It discloses that the tool returns full text, includes caption and history/notes, and indicates the data source (app.leg.wa.gov). It does not describe error handling or latency, but for a simple read operation, this is sufficient transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action ('Return the full text...'), followed by specifics on included content and the source. There is no redundant or filler information; every sentence contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers the essential information: what it does, what the return contains, and the data source. It does not specify the exact return format (e.g., plain text vs HTML) or error behavior, but for the tool's simplicity, this is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes the 'cite' parameter with examples, and the description also includes an example citation. Since schema description coverage is 100%, the parameter meaning is fully documented. The description adds marginal value by integrating the cite format into the context, but does not go beyond the schema's detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns the full text of an RCW section by citation, with specific examples like 9A.36.021. It explicitly lists included components (caption, statutory text, history/notes), distinguishing it from sibling tools such as search and cite_affected by focusing on retrieving a known section's full text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: use this when you have a section citation and need the full text. It does not explicitly mention alternatives, but the sibling tool names imply search is for finding sections and cite_affected for affected citations. No exclusions are stated, but the purpose is unambiguous enough for an agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchSearch RCW citationsA
Find RCW citations matching a partial citation string (e.g. "9A.36" -> 9A.36.011, 9A.36.021, ...). NOTE: this matches CITATIONS, not keywords — free-text words like "assault" return no results, because there is no public full-text RCW search API. Feed results into get_section.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max cites to return (default 10) | |
| query | Yes | Partial or full RCW cite, e.g. "9A.36" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description takes on full responsibility for behavioral disclosure. It clearly reveals a non-obvious constraint: the tool matches only citations, not keywords, because there is no public full-text API. The example output format ('9A.36.011, 9A.36.021') also sets expectations for what the tool returns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: the main purpose is stated first, followed by the critical caveat and a practical next-step instruction. Every sentence contributes useful information with no filler or redundant restatement of the tool name or schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple search tool with no output schema and only two well-documented parameters, the description is remarkably complete. It covers the tool's scope, its built-in limitation, an example of expected behavior, and how to use its results with get_section. There are no obvious missing behavioral or usage details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents both parameters (query and limit) with clear descriptions, so a baseline of 3 is appropriate. The description adds extra semantic value by emphasizing that the query must be a citation string, not a keyword, and by illustrating the kind of partial match intended with an example mapping.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Find RCW citations matching a partial citation string'—a specific verb and resource—making the tool's purpose unmistakable. It also distinguishes itself from siblings by explicitly stating it matches citations, not keywords, and by instructing to feed results into get_section.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage guidance: it tells the agent when to use the tool (partial citation lookup) and, critically, when not to use it ('free-text words like "assault" return no results'). It also provides a follow-up action ('Feed results into get_section'), which is helpful for correct tool selection and chaining.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.1- First observed
cite_affected - First observed
get_section - First observed
search
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_section retrieves full text, search finds citations by partial citation string, and cite_affected lists bills affecting a citation. There is no overlap between these functions, and the descriptions explicitly warn about search's limitation to citations, reducing ambiguity.
The naming conventions are inconsistent: 'get_section' follows a verb_noun pattern, 'search' is a bare verb, and 'cite_affected' uses an awkward compound that doesn't clearly convey its purpose. This mixed style makes the tool set feel less predictable and cohesive.
With only 3 tools, the server is on the thin side, but for a niche domain like RCW legal references, this count is reasonable. The tools cover the core workflows of finding a section, retrieving its text, and checking related bills, so the count feels appropriate for the scope.
The set provides essential retrieval and citation lookup, but notable gaps exist: there is no keyword search, no browsing of titles or chapters, and legislative history is limited to bills affecting a specific citation. While the description notes an API constraint, the surface is still somewhat incomplete for broad legal research.
Maintenance
Related MCP Connectors
An MCP server that provides congressional transcripts
MCP server for US nursing facility search and ownership lookup (NursingHomeDatabase).
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Related MCP Servers
AlicenseAqualityAmaintenanceMCP server for Vaquill legal research API. Covers US federal + 50-state law (USC, CFR, state legislation, CourtListener case law)257MIT- FlicenseAqualityDmaintenanceMCP server that wraps the NY Senate OpenLegislation API to look up and search the New York Criminal Procedure Law by citation or keyword.2-
- AlicenseAqualityAmaintenanceAn MCP server for accessing Turkish legislation (laws, regulations, decrees) via the Adalet Bakanligi API, providing search, full-text retrieval, and structured citations.5Apache 2.0
- AlicenseAqualityAmaintenanceMCP server for Australia's Federal Register of Legislation. Enables searching and fetching Commonwealth Acts with verifiable citations.3Apache 2.0