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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。