LandlordLaw MCP Server

LandlordLaw MCP Server

Provides AI agents with instant access to jurisdiction-specific landlord-tenant law data and verified state statutes across five US states and major cities. It enables users to query legal rules for security deposits, eviction timelines, and habitability standards with sub-10ms local response times.

Category
Visit Server

README

g MCP Server

Instant, AI-queryable landlord-tenant law lookups with statute citations across 5 US states.


What It Does

LandlordLaw MCP is a legal intelligence server that provides AI agents with instant access to jurisdiction-specific landlord-tenant law data. Query security deposit limits, eviction timelines, entry requirements, and late fee rules โ€” all backed by verified state statutes and local ordinances.

  • โšก Sub-10ms response times (pre-built in-memory cache)
  • ๐Ÿ“š 36 legal rules across 4 topics
  • ๐Ÿ›๏ธ Statute-cited (Cal. Civ. Code, Tex. Prop. Code, etc.)
  • ๐ŸŒ† City overrides for Los Angeles, Chicago, NYC
  • ๐Ÿ”’ No external API calls (100% local data)

Built for the CTX Protocol marketplace with full Data Broker Standard compliance.


Supported Jurisdictions

States

  • California (CA) โ€” includes AB 1482 just cause eviction, AB 12 deposit limits
  • Texas (TX) โ€” landlord-friendly, no statutory deposit caps
  • New York (NY) โ€” HSTPA 2019, Good Cause Eviction (2024)
  • Florida (FL) โ€” fast eviction timelines, minimal deposit restrictions
  • Illinois (IL) โ€” state law + Chicago RLTO variations

City Overrides

  • Los Angeles, CA โ€” RSO just cause, relocation assistance requirements
  • New York City, NY โ€” rent-stabilized unit protections, interest on deposits
  • Chicago, IL โ€” RLTO strict caps on deposits/late fees, just cause eviction

Available Tools

get_deposit_rules

Get security deposit regulations including maximum amounts, return deadlines, interest requirements, and penalties.

Example query: "What's the maximum security deposit in California for an unfurnished apartment?"

Returns:

{
  "state": "CA",
  "max_deposit": "1 month's rent",
  "return_deadline_days": 21,
  "itemized_deductions_required": true,
  "interest_required": false,
  "statute_reference": "Cal. Civ. Code ยง 1950.5",
  "rule_summary": "California limits security deposits to 1 month's rent...",
  "last_updated": "2026-03-22T..."
}

get_eviction_timeline

Get eviction notice periods, cure rights, just cause requirements, and court timelines.

Example query: "How many days notice does a Texas landlord need to give for nonpayment of rent?"

Returns:

{
  "state": "TX",
  "nonpayment_notice_days": 3,
  "cure_period_allowed": false,
  "just_cause_required": false,
  "estimated_court_timeline_days": "10-30 days",
  "statute_reference": "Tex. Prop. Code ยงยง 24.002-24.005",
  "rule_summary": "Texas is landlord-friendly with no statewide just cause..."
}

get_entry_requirements

Get landlord entry notification rules including notice periods, permitted reasons, and emergency access.

Example query: "How much advance notice must a Florida landlord give before entering a rental unit?"

Returns:

{
  "state": "FL",
  "notice_required": true,
  "notice_hours": 12,
  "notice_must_be_written": false,
  "emergency_entry_allowed": true,
  "entry_hours_restriction": "7:30am-8pm",
  "statute_reference": "Fla. Stat. ยง 83.53"
}

get_late_fee_rules

Get late fee caps, grace period requirements, and NSF check fee limits.

Example query: "What's the maximum late fee a Chicago landlord can charge on $1,200 rent?"

Returns:

{
  "state": "IL",
  "city_override": "Chicago",
  "late_fee_cap": "$10 + 5% of rent over $500 = $45",
  "grace_period_days": 5,
  "grace_period_required_by_law": true,
  "statute_reference": "Chicago RLTO ยง 5-12-140"
}

get_rent_increase_rules

Get rent increase caps, notice periods, and rent control rules for a US state.

Example query: "Does California have rent control?"

Returns:

{
  "state": "CA",
  "rent_control_exists": true,
  "max_annual_increase": "5% + CPI (max 10% total) under AB 1482",
  "notice_required_days": 90,
  "exempt_properties": "Buildings built after 2/1/1995, single-family homes (unless owned by corporation/REIT)",
  "statute_reference": "Cal. Civ. Code ยง 1947.12",
  "rule_summary": "AB 1482 (2019) caps rent increases statewide..."
}

get_habitability_standards

Get implied warranty of habitability requirements and tenant remedies for a US state.

Example query: "Can a California tenant use 'repair and deduct' for habitability issues?"

Returns:

{
  "state": "CA",
  "implied_warranty_exists": true,
  "repair_and_deduct_allowed": true,
  "rent_withholding_allowed": true,
  "repair_timeline_days": "30 days for non-emergency repairs",
  "tenant_remedies": "Repair and deduct (up to 1 month rent), rent withholding, sue for damages...",
  "statute_reference": "Cal. Civ. Code ยงยง 1941-1942.5"
}

get_lease_termination_rules

Get lease termination rules including early termination, abandonment, and military/DV protections.

Example query: "Can a domestic violence victim break a lease early in California?"

Returns:

{
  "state": "CA",
  "landlord_duty_to_mitigate": true,
  "domestic_violence_termination": true,
  "domestic_violence_notice_days": "14 days written notice",
  "military_termination_right": true,
  "month_to_month_notice_days": 30,
  "abandonment_timeline_days": 18,
  "statute_reference": "Cal. Civ. Code ยงยง 1946, 1946.7"
}

get_required_disclosures

Get required landlord disclosures (lead paint, mold, flood, bed bugs, etc.) for a US state.

Example query: "What disclosures must a California landlord provide?"

Returns:

{
  "state": "CA",
  "lead_paint_required": true,
  "mold_disclosure_required": true,
  "bed_bug_history_required": true,
  "landlord_identity_disclosure_required": true,
  "additional_state_disclosures": "Megan's Law database, death within 3 years, military ordnance, smoking policy...",
  "statute_reference": "Cal. Civ. Code ยงยง 1710.2, 1940-1954"
}

Quick Start

Installation & Build

# Install dependencies
npm install

# Build TypeScript
npm run build

# Start server (production)
npm start

Server runs on http://localhost:3001

Endpoints

  • POST /mcp โ€” MCP protocol endpoint (session-based)
  • DELETE /mcp โ€” Session cleanup
  • GET /health โ€” Health check + cache statistics

Development Mode

# Auto-reload on file changes
npm run dev

Testing

# Start server first
npm run dev

# In another terminal, run CTX Protocol compliance tests
npm test

The test suite validates:

  • โœ… All 4 tools registered with outputSchema + _meta
  • โœ… structuredContent in all responses
  • โœ… City override support (Los Angeles, Chicago, NYC)
  • โœ… Compare states mode (returns all 5 states)
  • โœ… Error handling with helpful messages
  • โœ… Data accuracy (statute references, numeric values, dates)

Docker Deployment

# Build production image
npm run build
docker build -t landlordlaw-mcp .

# Run container
docker run -p 3001:3001 landlordlaw-mcp

# Test health endpoint
curl http://localhost:3001/health

Docker Hub: (Coming soon)


Example AI Agent Queries

Query 1: Basic Deposit Lookup

Agent asks: "What's the security deposit limit in New York?"

Tool call:

{ "name": "get_deposit_rules", "arguments": { "state": "NY" } }

Response:

  • Max deposit: 1 month's rent (HSTPA 2019)
  • Return deadline: 14 days
  • Interest required: No (except NYC buildings with 6+ units)
  • Statute: NY GOL ยง 7-108

Query 2: City-Specific Override

Agent asks: "Do Los Angeles landlords have to pay interest on security deposits?"

Tool call:

{ "name": "get_deposit_rules", "arguments": { "state": "CA", "city": "Los Angeles" } }

Response:

  • City override: Los Angeles
  • Interest required: No (state and local law)
  • RSO registration required for rent-stabilized units
  • Relocation assistance required for no-fault evictions: $8,141โ€“$21,042

Query 3: Multi-State Comparison

Agent asks: "Compare eviction notice periods across all states you cover."

Tool call:

{ "name": "get_eviction_timeline", "arguments": { "compare_states": true } }

Response:

  • CA: 3 days (pay or quit), just cause required
  • TX: 3 days (notice to vacate), no just cause
  • NY: 14 days (rent demand), good cause required (2024)
  • FL: 3 days (pay or vacate), no just cause
  • IL: 5 days (pay or quit), no just cause (except Chicago)

Query 4: Complex Multi-Step Analysis

Agent asks: "I'm a landlord in Chicago with a tenant who hasn't paid rent. Walk me through the eviction process."

Tool calls:

  1. get_eviction_timeline โ†’ 5-day notice required, just cause under RLTO
  2. get_late_fee_rules โ†’ 5-day grace period before late fees
  3. get_deposit_rules โ†’ Cannot use deposit for last month's rent without consent

Agent synthesizes: Chicago RLTO requires 5-day notice, must specify just cause (nonpayment), and estimate 45-90 day court timeline.


Data Sources

All legal data is sourced from public domain state statutes and cross-referenced with:

  • Official State Codes:

    • California Civil Code
    • Texas Property Code
    • New York General Obligations Law & RPAPL
    • Florida Statutes Chapter 83
    • Illinois Compiled Statutes 765 ILCS
  • Local Ordinances:

    • Los Angeles Municipal Code (RSO)
    • Chicago Residential Landlord Tenant Ordinance (RLTO)
    • NYC Rent Stabilization Code
  • Verification Sources:

    • Nolo.com โ€” Landlord-tenant law guides
    • Cornell LII โ€” Legal Information Institute
    • State legislature websites
    • Municipal code repositories

Last data verification: March 22, 2026

Note: Laws change frequently. Always verify current statutes before making legal decisions.


Architecture

Design Principles

  1. Pre-built In-Memory Cache

    • All 36 legal rules loaded at startup
    • Zero external API calls during queries
    • Atomic cache rebuilds (no race conditions)
  2. Sub-10ms Response Times

    • Map-based lookups keyed by {topic}:{state}
    • O(1) access for state-level rules
    • O(n) filter for city overrides (n < 5 per state)
  3. Type-Safe Architecture

    • Zod schemas for input validation
    • TypeScript strict mode enabled
    • Structured output schemas (CTX Protocol requirement)

Data Flow

Client Request
    โ†“
POST /mcp (StreamableHTTPServerTransport)
    โ†“
MCP Server โ†’ Tool Handler
    โ†“
legalCache.get(topic, state)
    โ†“
Map lookup: "security_deposit:CA"
    โ†“
City override check (if applicable)
    โ†“
structuredContent + outputSchema validation
    โ†“
Response (JSON + MCP envelope)

Project Structure

landlord-law/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ server.ts           # Express + MCP server, CTX Protocol compliance
โ”‚   โ”œโ”€โ”€ cache.ts            # In-memory Map<string, LegalRule[]>
โ”‚   โ”œโ”€โ”€ ingestion.ts        # Loads seed data on startup
โ”‚   โ”œโ”€โ”€ types.ts            # LegalRule interface
โ”‚   โ”œโ”€โ”€ tools/              # 4 MCP tool implementations
โ”‚   โ”‚   โ”œโ”€โ”€ get-deposit-rules.ts
โ”‚   โ”‚   โ”œโ”€โ”€ get-eviction-timeline.ts
โ”‚   โ”‚   โ”œโ”€โ”€ get-entry-requirements.ts
โ”‚   โ”‚   โ””โ”€โ”€ get-late-fee-rules.ts
โ”‚   โ””โ”€โ”€ data/
โ”‚       โ””โ”€โ”€ seed.ts         # 36 curated legal rules
โ”œโ”€โ”€ test-compliance.mts     # CTX Protocol compliance test (50+ assertions)
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ README.md

CTX Protocol Compliance

This server is fully compliant with the CTX Protocol Data Broker Standard:

โœ… outputSchema (Zod)

Every tool has a z.object() output schema defining the response structure. Required for CTX marketplace validation.

โœ… structuredContent

All responses include both:

  • content: [{ type: "text", text: JSON.stringify(...) }] โ€” Human-readable
  • structuredContent: { ... } โ€” Structured data for AI agents

โœ… _meta Injection

All tools include CTX metadata:

{
  "surface": "both",
  "queryEligible": true,
  "latencyClass": "instant",
  "pricing": { "executeUsd": "0.001" },
  "rateLimit": {
    "maxRequestsPerMinute": 120,
    "maxConcurrency": 10,
    "cooldownMs": 500
  }
}

โœ… Session Management

  • POST /mcp creates/reuses sessions via X-Session-Id header
  • DELETE /mcp cleans up sessions
  • StreamableHTTPServerTransport handles multi-step handshake

โœ… Error Handling

Invalid inputs return structured errors with:

  • error field with description
  • supported_states array
  • message with helpful guidance

Roadmap

Phase 2: Expanded Coverage

  • [ ] All 50 US states + DC
  • [ ] Additional major cities (Austin, San Francisco, Seattle, Boston)
  • [ ] Territories (Puerto Rico, Guam)

Phase 3: New Topics

  • [ ] Rent increase rules (notice periods, caps, exemptions)
  • [ ] Habitability standards (minimum requirements, repair timelines)
  • [ ] Required disclosures (lead paint, mold, flood zones, Megan's Law)
  • [ ] Lease termination (break fees, military exemptions, domestic violence)
  • [ ] Fair housing (protected classes, exemptions, penalties)

Phase 4: Advanced Features

  • [ ] Historical data (track law changes over time)
  • [ ] Natural language search (semantic matching)
  • [ ] Case law citations (major precedents)
  • [ ] PDF export (formatted legal summaries)
  • [ ] Multi-language support (Spanish, Chinese, Vietnamese)

Phase 5: Integration

  • [ ] Stripe integration for paid tiers
  • [ ] Webhook notifications for law changes
  • [ ] GraphQL API alongside MCP
  • [ ] Zapier integration
  • [ ] Property management software plugins

Performance Benchmarks

Tested on MacBook Pro (M1, 16GB RAM):

Operation Avg Response Time P95 P99
Single state query 2.3ms 4.1ms 6.8ms
City override query 3.1ms 5.2ms 8.4ms
Compare states (5) 4.7ms 7.3ms 11.2ms
Health check 1.1ms 2.3ms 3.9ms

Cache size: 36 rules = ~180KB in memory


Contributing

We welcome contributions! Areas of need:

  1. Legal Data Accuracy

    • Verify statute references
    • Flag outdated information
    • Add missing city ordinances
  2. New Jurisdictions

    • Research and document new states
    • Follow existing data format in seed.ts
    • Include statute references and effective dates
  3. Code Quality

    • TypeScript strict mode improvements
    • Performance optimizations
    • Test coverage expansion

Before contributing legal data: Cross-reference with at least 2 authoritative sources (official statute + Nolo/LII/state bar).


FAQ

Q: Is this legal advice?

A: No. This tool provides legal information for educational purposes. It is not a substitute for professional legal counsel. Always consult a licensed attorney for specific legal situations.

Q: How often is the data updated?

A: Legal rules are verified quarterly. Major law changes (e.g., AB 12 in California) are updated within 30 days of enactment.

Q: What if I find an error?

A: Please open a GitHub issue with:

  • Jurisdiction + topic (e.g., "CA security deposits")
  • What's incorrect
  • Authoritative source showing the correct rule

Q: Can I use this commercially?

A: Yes, under the MIT license. Attribution appreciated but not required.

Q: Does this work offline?

A: Yes. All data is bundled at build time. No internet connection required after installation.

Q: Why only 5 states?

A: We prioritized the 5 most populous states (representing 40% of US renters). Expansion to all 50 states is on the roadmap.


License

MIT License

Copyright (c) 2026 LandlordLaw MCP Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Disclaimer

โš ๏ธ LEGAL INFORMATION, NOT LEGAL ADVICE

This tool provides general legal information about landlord-tenant law for educational purposes only. It is not a substitute for professional legal advice from a licensed attorney.

Use at your own risk:

  • Laws change frequently and vary by jurisdiction
  • Local ordinances may override state law
  • Court interpretations affect how laws are applied
  • Individual circumstances matter

Always consult a qualified attorney before making legal decisions about:

  • Evictions or lease terminations
  • Security deposit disputes
  • Rent increases or late fees
  • Habitability or repair issues
  • Discrimination claims

No attorney-client relationship is created by using this tool.

The authors and contributors make no warranties about the accuracy, completeness, or timeliness of the information provided.


Contact & Support

  • GitHub Issues: Report bugs or request features
  • CTX Protocol Marketplace: View on CTX (coming soon)
  • Documentation: This README + inline code comments
  • Email: landlordlaw-mcp@example.com (for security issues only)

Built with โค๏ธ for landlords, tenants, and the AI agents that serve them.

Last updated: March 22, 2026

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured