Skip to main content
Glama

PermitFlow MCP Server

Autonomous Portfolio Permitting Intelligence & Pre-Construction Engine

Python 3.11+ Package Manager Protocol Architecture License: ROHIX RB Watch Demo

Target Startup: PermitFlow (Y Combinator S22, Series B $54M)
Assignment: Build an MCP Server for a Real Startup (Individual)
Demo Video: Watch Demo on Google Drive


1. Company Name and Overview

PermitFlow (YC S22, Series B $54M raised) builds software that automates construction permitting for general contractors, commercial developers, and trade subcontractors. The platform streamlines municipal permit research, submittal preparation, and status tracking across US city building departments (AHJs).


Related MCP server: GroundTruth MCP Server

2. The Problem Your Server Solves

Municipal permitting is the primary driver of construction delays in the US (4 to 12 weeks of schedule delay per project). Today:

  • High Rejection Rate: Over 40% of permit packets are rejected due to missing exhibits, expired contractor insurance, or absent structural calculations, triggering $500 to $2,000 penalties.

  • Manual Comment Resolution: Resolving city examiner objections and writing legal response letters takes days of manual expeditor work.

  • Closed SaaS Island: PermitFlow is a closed web dashboard. Estimators and engineers working in Claude Desktop or Cursor cannot interact with permitting data or municipal codes.

Solution: This MCP server acts as an open AI co-pilot alongside PermitFlow, providing pre-flight readiness audits (0-100 GO / NO-GO), building code RAG, and automated PE-sealed response transmittal generation.


3. Tools, Resources, and Prompts

Tools (7 Core Intelligence Tools)

Tool

Role

Function

Rationale

get_daily_manager_briefing

Management

Health score (0-100), overnight deltas, standup task matrix.

Instant morning visibility across all active portfolio jobs.

intake_project_scope

Intake Agent

Parses SOW text, detects trades, flags Arizona PE structural triggers.

Automates project intake without manual data entry errors.

estimate_permit_fees_and_sla

Research Agent

Calculates itemized municipal fees and turnaround SLAs.

Provides accurate upfront budgeting and scheduling.

search_permit_requirements

Knowledge Engine

BM25 RAG over local codes (Phoenix PMC 301.5, IBC 1609.1, ASHRAE 90.1).

Delivers grounded legal citations without hallucinations.

check_permit_readiness

Submission Gate

Audits checklist, outputs 0-100 score and GO / NO-GO verdict.

Prevents non-compliant filings and expensive city rejection fees.

generate_formal_ahj_response_packet

Coordination

Resolves examiner comments into official PE-sealed transmittal letter.

Eliminates 2-3 days of manual response letter drafting.

verify_contractor_registration

Compliance

Verifies Arizona ROC license standing, Class B-1/CR-11, and $1M insurance.

Prevents administrative rejection from lapsed contractor insurance.

Resources (5 Live URI Streams)

URI

Data Provided

Why Chosen

portfolio://summary

Total active permits, health score, urgent blocker count.

Passive real-time operational context.

portfolio://priorities

Filtered list of critical and high-risk blocked permits.

Focuses attention on immediate project risks.

portfolio://daily-action-plan

Role-assigned tasks for coordinators, engineers, expediters.

Enforces daily operational alignment.

portfolio://systemic-bottlenecks

Cross-project root causes (insurance lapses, missing PE stamps).

Diagnoses systemic portfolio risks.

portfolio://changes

Day-over-day status transitions and new examiner comments.

Provides instant overnight delta awareness.

Prompts (4 Standardized Workflows)

  • daily_standup_briefing: Generates full morning meeting briefing with health metrics and action items.

  • triage_permit_blockers: Parameterized deep-dive to unblock a specific stuck permit (permit_id).

  • plan_resubmission_strategy: Formulates point-by-point technical defense for city plan-check rejections (permit_id).

  • audit_contractor_compliance: Regulatory audit for contractor ROC license and insurance standing (contractor_id).

Why Prompts: Standardizes prompt engineering so any team member gets consistent, senior-grade output with one click.


4. How to Run It

Setup

git clone https://github.com/rohitbagal1819/PermitFlow-MCP.git
cd PermitFlow-MCP
uv venv
uv sync

Run Server

  • Local STDIO (Claude / Cursor): uv run permitflow-mcp

  • Networked HTTP / SSE: uv run permitflow-mcp --transport sse --port 8000

Client Config

  • Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "permitflow-mcp": {
      "command": "uv",
      "args": ["--directory", "d:\\PermitFlow-MCP", "run", "permitflow-mcp"]
    }
  }
}
  • Cursor IDE (Settings > Features > MCP): Add Command uv --directory "d:\PermitFlow-MCP" run permitflow-mcp


5. Host Comparison: What Differed Across Hosts

Dimension

Claude Desktop

Cursor IDE

Primary Strength

Executive standup reasoning, multi-tool chaining, and document drafting.

Technical engineering workflows and blueprint code integration.

Tool Invocation

Interactive UI confirmation prompts before executing tools.

Direct agent loop execution during coding/editing sessions.

Resources & Prompts

Full native UI support (portfolio:// attachments and slash prompts).

Tools supported directly; resources queried via programmatic tool calls.

Model Behavior

Claude 3.5 Sonnet handles complex nested schemas and auto-chains tools.

Requires explicit, concise tool descriptions to prevent parameter guessing.


6. Workflow: Where It Fits in the Company's Process

Pre-Construction Permitting Pipeline:

  1. Intake: Ingests subcontractor SOW, detects trades, checks PE structural stamp triggers (intake_project_scope).

  2. Budget & SLA: Projects city fees and review timelines (estimate_permit_fees_and_sla).

  3. Pre-Flight Gate: Audits package readiness (0-100 GO / NO-GO) and checks contractor $1M insurance (check_permit_readiness, verify_contractor_registration).

  4. City Submittal: Permit Coordinator files verified packet with city portal (Phoenix ProjectDox, Tempe Accela).

  5. Comment Resolution: If city examiners reject, system queries municipal RAG and auto-generates PE-sealed transmittal letter (generate_formal_ahj_response_packet).

  6. Human-in-the-Loop Sign-Off: Professional Engineer (PE) and Permit Coordinator must review and seal before final filing.

Local vs. Team: STDIO mode runs locally on workstations with zero latency. HTTP/SSE mode supports centralized team deployment across cloud workers.


7. Space: Token Counts Before vs. After

Approach

Context Load

Latency

Result

Raw Document Dumping (Full Code Corpus)

~28,450 tokens

High

Context bloat, hallucination risk

PermitFlow In-Memory BM25 RAG

~1,450 tokens

Sub-5ms

Grounded legal citations (PMC 301.5, IBC 1609)

Net Efficiency

94.9% Token Reduction

95% Faster

Zero hallucinations

Chunking Details: 500 words per chunk, 60-word overlap, 3.5x section-title weight boosting, returning top 3-5 governing sections.


8. Screenshots and Demo Video

Available Tools

7 tools
check_permit_readinessA

Pre-Submission Readiness Audit & Blocker Breakdown Gate.

Performs an exhaustive pre-filing audit of a single permit: calculates a composite 0–100 readiness score, categorizes risk (LOW, MEDIUM, HIGH, BLOCKED), identifies unverified/expired documents, open authority comments, and issues a Go/No-Go verdict.

Args: permit_id: Permit identifier (e.g., "P-1042").

Returns: Comprehensive readiness report with score, risk tier, blocker breakdown, and actions.

Inputs: permit_id (required). Returns: result

estimate_permit_fees_and_slaB

Municipal Permit Fee & Plan Review SLA Turnaround Calculator.

Estimates municipal application fees, plan check surcharges, technology fees, and review turnaround timelines across Phoenix, Scottsdale, Tempe, and Mesa.

Args: jurisdiction: Target city jurisdiction (e.g. "City of Phoenix", "City of Tempe"). permit_type: Trade type (e.g. "mechanical", "electrical", "building"). valuation: Declared construction valuation in USD.

Returns: Itemized municipal fee breakdown and estimated review turnaround SLA.

Inputs: valuation (required), permit_type (required), jurisdiction (required). Returns: result

generate_formal_ahj_response_packetA

Official Municipal Plan-Check Response Letter Generator (Rule 2).

Compiles a formal Comment-by-Comment Transmittal Letter resolving examiner objections with code citations, revision cloud references, and an explicit Human-in-the-Loop Professional Engineer (PE) verification gate before municipal upload.

Args: permit_id: Permit identifier (e.g. "P-1042").

Returns: Official city response transmittal letter ready for engineer stamp and filing.

Inputs: permit_id (required). Returns: result

get_daily_manager_briefingA

Generate the daily executive briefing and prioritized action plan for permit managers.

Synthesizes portfolio health, overnight status transitions, expiring contractor insurance, and provides an itemized task matrix with assigned roles, deadlines, and unblocking actions.

Use this tool during morning standups or management planning sessions when asked: "Give me today's permit briefing", "What should the team work on today?", or "What are our top permitting priorities?"

Returns: A formatted executive briefing with portfolio health score, key changes, systemic bottlenecks, and an itemized action task list.

Inputs: no named parameters. Returns: result

intake_project_scopeA

Autonomous Project Scope Ingestion Agent.

Parses unformatted contractor Scopes of Work (SOWs), determines municipal AHJ jurisdiction from the address, identifies required trade sub-permits, verifies commercial Arizona PE structural stamping thresholds, and scaffolds a draft permit.

Args: scope_description: Plain language contractor SOW (e.g. "Replace rooftop HVAC units and upgrade 400A panel"). address: Physical jobsite address (e.g. "4800 E Camelback Rd, Phoenix, AZ"). valuation: Estimated total construction valuation in USD. project_name: Optional development project name.

Returns: Structured intake summary with detected city, required trade permits, legal engineering stamp triggers, and mandatory submittal checklist.

Inputs: address (required), valuation (required), scope_description (required), project_name. Returns: result

search_permit_requirementsA

Section-Aware Municipal Building Code RAG Search (Rule 3).

Queries the local section-aware RAG engine of municipal building codes, local amendments, and technical guidelines (e.g. Phoenix Mechanical Code 301.5, ASHRAE 90.1, NEC 2023). Achieves ~82.9% context token reduction compared to raw manual dumping.

Args: query: Building code search query (e.g., "rooftop unit structural calculations Phoenix"). jurisdiction: Optional filter (e.g., "City of Phoenix"). permit_type: Optional trade filter (e.g., "mechanical", "electrical"). top_k: Number of relevant code sections to retrieve (default: 4).

Returns: Precise building code citations, section numbers, relevance scores, and excerpts.

Inputs: query (required), top_k, permit_type, jurisdiction. Returns: result

verify_contractor_registrationA

Contractor ROC License & General Liability Insurance Compliance Audit.

Audits Arizona Registrar of Contractors (ROC) standing, verifies trade classifications, and audits mandatory $1,000,000 General Liability Insurance policies, expiration dates, and municipal Additional Insured endorsements.

Args: contractor_name: Name of the general or specialty contractor (e.g. "Ironclad Construction"). jurisdiction: Target city jurisdiction (e.g. "City of Phoenix", "City of Tempe"). permit_type: Permitted trade type (e.g. "mechanical", "electrical", "building").

Returns: Structured compliance verification report with license and insurance status.

Inputs: permit_type (required), jurisdiction (required), contractor_name (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a clearly distinct phase of the permitting workflow: briefing (portfolio planning), intake (SOW parsing), fee estimation, code RAG search, readiness audit, AHJ response generation, and contractor compliance verification. There is no meaningful overlap in the resource or action targeted by any two tools.

    Naming Consistency5/5

    Every tool follows a consistent verb_noun snake_case pattern (get_daily_manager_briefing, intake_project_scope, estimate_permit_fees_and_sla, check_permit_readiness, etc.). No mixing of conventions or verb styles, making the set highly predictable.

    Tool Count5/5

    Seven tools is well-scoped for a permit-management assistant, with each tool earning its place by covering a discrete lifecycle step. There is no redundancy or filler.

    Completeness4/5

    The surface comprehensively covers the pre-submission lifecycle (intake, fees, code search, readiness, response, compliance, briefing), with a sensible human-in-the-loop gate. However, there is no explicit permit-list/create/update/status tracking or submission tool, so agents cannot persist or advance permit state directly.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Instant U.S. property intelligence for AI agents. Zoning, Buildability™ Score, ADU eligibility, flood risk, and more from 20+ government sources. Pay-as-you-go: $5 per analysis (prepaid credits). Free Score available at buildability.us. Get a key at buildability.us/api.
      5
      1
      MIT
    • F
      license
      Not graded
      quality
      F
      maintenance
      Enables municipal permit preflight checks for construction and renovation projects, returning evidence-linked, rule-version-aware results without using an LLM.
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables construction management supervision automation by parsing submitted documents and cross-verifying numerical values against real-time Korean national laws and KCSC construction standards, then generating CM review draft reports.
      -