Uses SQLite database for local storage and full-text search of Washington State legal documents, enabling fast offline access to RCW and WAC sections without external API calls.
Washington Law MCP Server
An MCP (Model Context Protocol) server that provides offline access to Washington State's Revised Code of Washington (RCW) and Washington Administrative Code (WAC) for AI agents.
Features
- Completely Offline: All law texts are stored locally in SQLite database
- Fast Access: Instant retrieval of any RCW or WAC section
- Full-Text Search: Search across all Washington laws using SQLite FTS5
- Comprehensive Coverage: Access to all RCW titles, chapters, and sections
- MCP Compatible: Works with any MCP-compatible AI client (Claude, etc.)
Architecture
The project consists of two main components:
- Data Collection Phase (one-time setup): Scrapers that download all RCW/WAC texts
- MCP Server (runtime): Serves law texts from local database with no external calls
Installation
Usage
Running the MCP Server
Testing with MCP Inspector
Configuring with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json
):
Available MCP Tools
get_rcw
Retrieve the full text of a specific RCW section.
- Parameters:
citation
(string): RCW citation (e.g., "46.61.502")
get_wac
Retrieve the full text of a specific WAC section.
- Parameters:
citation
(string): WAC citation (e.g., "296-24-12005")
search_laws
Search Washington laws by keywords or phrases.
- Parameters:
query
(string): Search termslimit
(number, optional): Max results (default: 20)
list_rcw_titles
List all RCW titles with section counts.
list_rcw_chapters
List all chapters within a specific RCW title.
- Parameters:
titleNum
(string): Title number (e.g., "46")
list_rcw_sections
List all sections within a specific RCW chapter.
- Parameters:
chapterNum
(string): Chapter number (e.g., "46.61")
get_statistics
Get database statistics including section counts and last update time.
Project Structure
Database Schema
The SQLite database contains:
- rcw table: Full text and metadata for all RCW sections
- wac table: Full text and metadata for all WAC sections
- rcw_fts / wac_fts: Full-text search indexes
- metadata table: Database version and update timestamps
- scraper_progress table: Tracks scraping progress
Updating the Database
To update the law database with the latest changes:
The scraper will update existing sections and add new ones.
Development
Notes
- Initial scraping takes several hours due to rate limiting (respectful crawling)
- Database size is approximately 200-500 MB after compression
- The server operates completely offline once data is scraped
- All database queries are read-only during MCP server operation
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides offline access to Washington State's Revised Code of Washington (RCW) and Washington Administrative Code (WAC) for AI agents. Enables fast retrieval, full-text search, and navigation of all Washington state laws through natural language queries.