home / mcp / washington law mcp server

Washington Law MCP Server

MCP server for offline access to Washington State laws (RCW) and court rules

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ccchow-washington-law-mcp": {
      "command": "node",
      "args": [
        "/path/to/law_rule_mcp/dist/index.js"
      ]
    }
  }
}

This MCP server provides offline access to Washington State’s RCW and WAC texts, enabling instant retrieval and full-text search for AI agents without any external calls. It stores all law texts locally in a SQLite database and exposes a simple, MCP-compatible interface that you can query from your AI client or toolchain.

How to use

You run the server locally and connect your MCP client to it to retrieve RCW and WAC texts or to perform keyword searches. The server is fully offline once the data is scraped and stored in a local SQLite database.

Typical usage involves starting the MCP server and then issuing one of the available tool calls from your MCP client: get_rcw to fetch a specific RCW section, get_wac for a WAC section, or search_laws to find relevant provisions. You can also list RCW titles, chapters, and sections to browse the structure, and get_statistics to review database metrics.

How to install

Prerequisites: ensure you have Node.js and npm installed on your system.

1) Clone the project repository to your local machine.

2) Change into the project directory.

3) Install dependencies.

4) Initialize the database to create the local SQLite store.

5) Run the RCW data scraper to populate the database (this can take several hours).

6) Build the TypeScript code for runtime use.

7) Start the MCP server and connect with your MCP client.

# Clone the repository
git clone <repository-url>
cd law_rule_mcp

# Install dependencies
npm install

# Initialize the database
npm run init:db

# Scrape RCW data (this will take several hours)
npm run scrape:rcw

# Build the TypeScript code
npm run build

# Start the server
npm start

Configuration for MCP clients

To connect a client or tool to the MCP server, add the following local configuration. This example shows a local stdio server instance named washington_law.

{
  "mcpServers": {
    "washington_law": {
      "command": "node",
      "args": ["/path/to/law_rule_mcp/dist/index.js"]
    }
  }
}

Available tools

get_rcw

Retrieve the full text of a specific RCW section using a citation like 46.61.502.

get_wac

Retrieve the full text of a specific WAC section using a citation like 296-24-12005.

search_laws

Search Washington laws by keywords or phrases. You can specify a query and an optional limit for results.

list_rcw_titles

List all RCW titles with the number of sections in each title.

list_rcw_chapters

List all chapters within a specific RCW title by its title number.

list_rcw_sections

List all sections within a specific RCW chapter by its chapter number.

get_statistics

Provide database statistics including section counts and last update time.