PermitFlow MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PermitFlow MCPrank my active permits by risk and give me today's action plan"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PermitFlow MCP: Portfolio Permitting Intelligence & Readiness Server
Disclaimer: This is an independent educational prototype inspired by PermitFlow's publicly described construction permitting workflow. It is built strictly for demonstration and assignment purposes, does not connect to PermitFlow's private production systems, and requires no proprietary credentials.
π Instructor Presentation & Live Demo: For the complete 5-minute presentation script, exact copy-paste prompts, RAG document explanations, expected tool outputs, and Q&A cheat sheet, see
PRESENTATION_GUIDE.md.
π The Core Value Proposition: Portfolio-Level Intelligence
In commercial and residential construction, permitting coordinators typically monitor dozens of active permits across multiple municipalities (City of Phoenix, Tempe, Scottsdale, Mesa, Chandler).
Standard tools only answer single-permit lookup questions:
"Is permit P-1042 ready?"
PermitFlow MCP delivers Portfolio-Level Intelligence, allowing project managers, general contractors, and developers to analyze all permits simultaneously:
"Which permits need attention first, why, and what should the team do today?"
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PORTFOLIO INTELLIGENCE β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ€
β π¨ Multi-Factor Risk Ranking β Composite 0β100 risk scoring by β
β β deadlines, AHJ comments, and lapses β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β π Evidence-Backed Reasoning β Every rank explained with citations β
β β from examiners and checklists β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β β‘ Day-over-Day Change Alerts β Detects overnight status transitions, β
β β new comments, and newly expired docs β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β π‘ Systemic Bottleneck Mining β Surfaces portfolio-wide failure trendsβ
β β (e.g. 30% blocked by insurance certs) β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β π Daily Executive Action Plan β Role-assigned task matrix for today's β
β β permit coordinators and engineers β
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββRelated MCP server: GroundTruth MCP Server
π System Architecture
flowchart TB
subgraph ClientLayer [MCP Host / AI Agent Layer]
Claude[Claude Desktop / Claude Code]
Cursor[Cursor IDE]
Inspector[MCP Inspector]
end
subgraph ServerLayer [PermitFlow FastMCP Server]
FastMCP[FastMCP Core Engine]
subgraph Tools [MCP Tools (10 Tools)]
T_Portfolio[Portfolio Tools: Priorities, Briefing, Changes, Bottlenecks]
T_Readiness[Readiness Tools: Readiness Check, Missing Docs, Blockers, Runbooks]
T_RAG[RAG Search: search_permit_requirements]
end
subgraph Resources [MCP Resources (9 URIs)]
R_Portfolio[portfolio://summary, priorities, daily-action-plan, systemic-bottlenecks, changes]
R_Permit[permit://{id}, project://{id}, requirements://{jur}/{type}, runbook://...]
end
subgraph Prompts [MCP Prompts (4 Workflows)]
P_Standup[daily_standup_briefing]
P_Audit[permit_readiness_audit]
P_Resubmit[resubmission_strategy]
P_Risk[portfolio_risk_review]
end
end
subgraph ServiceLayer [Intelligence & Business Logic]
PortService[PortfolioService]
ReadService[ReadinessService]
PermitService[PermitService]
Retriever[Dual RAG Retriever: FAISS + BM25 Fallback]
end
subgraph DataLayer [Data & Knowledge Assets]
MockData[(Mock Permit DB: Permits, Comments, Inspections, Projects, Snapshots)]
Knowledge[(Regulatory Corpus: Building, Electrical, Mechanical, Guidelines)]
end
ClientLayer <-->|JSON-RPC / stdio or SSE| FastMCP
FastMCP --> Tools
FastMCP --> Resources
FastMCP --> Prompts
Tools --> PortService
Tools --> ReadService
Tools --> Retriever
Resources --> PortService
Resources --> ReadService
Resources --> PermitService
PortService --> ReadService
PortService --> PermitService
ReadService --> PermitService
PermitService --> MockData
Retriever --> Knowledgeβ‘ Quickstart with uv (Recommended Package Manager)
This project is built and optimized for the uv package manager. uv installs dependencies 10β100Γ faster than pip and handles virtual environment isolation without manual overhead.
1. Install uv (if not already installed)
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"2. Clone and Setup Environment
git clone https://github.com/example/PermitFlow-MCP.git
cd PermitFlow-MCP
# Create a virtual environment using uv
uv venv
# Synchronize all runtime and dev dependencies
uv sync --all-extras3. Run the MCP Server Locally
# Start server using stdio transport (default for Claude Desktop / Cursor)
uv run permitflow-mcp
# Or start server over SSE transport
uv run permitflow-mcp --transport sse --port 80004. Run the Test Suite
uv run pytest -v5. Build Document Embeddings (Optional RAG Ingestion)
uv run python scripts/ingest_documents.py(Note: The server features a resilient in-memory semantic fallback retriever that operates out-of-the-box even before building the offline FAISS index.)
π Connecting to MCP Clients
Claude Desktop Configuration
Open your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the permitflow-mcp server:
{
"mcpServers": {
"permitflow-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/PermitFlow-MCP",
"run",
"permitflow-mcp"
]
}
}
}Windows path example:
{
"mcpServers": {
"permitflow-mcp": {
"command": "uv",
"args": [
"--directory",
"D:\\PermitFlow-MCP",
"run",
"permitflow-mcp"
]
}
}
}Testing with MCP Inspector
You can test every tool, resource, and prompt interactively via the official web UI:
npx @modelcontextprotocol/inspector uv run permitflow-mcpπ Complete MCP Tool Inventory
A. Portfolio-Level Intelligence Tools
Tool Name | Description | Key Arguments |
| Ranks all active permits by risk score (0β100) using deadlines, examiner comments, and lapses. Explains each ranking with evidence and next steps. |
|
| Generates the morning executive briefing with portfolio health score, overnight changes, and role-assigned action matrix. | None |
| Detects day-over-day changes across the portfolio (status transitions, new examiner comments, expired certificates). |
|
| Surfaces cross-cutting failure trends across multiple projects (e.g. insurance lapses, structural equipment support stamps). | None |
B. Single-Permit Readiness & Analysis Tools
Tool Name | Description | Key Arguments |
| Comprehensive readiness audit for a single permit (0β100 score, missing files, blockers, examiner comments). |
|
| Detailed report on missing, expired, rejected, or outdated document versions. |
|
| Semantic RAG search over municipal code and requirement guidelines. |
|
| Root-cause analysis explaining why an application is blocked with citation evidence and recommended fix. |
|
| Prioritized step-by-step resubmission runbook ordered by critical/high/medium priority. |
|
| Quick lookup of project details, dates, document counts, and reviewer notes. |
|
| Updates permit status (e.g. approved, submitted) and persists change to live database. |
|
| Marks an examiner comment as resolved, unblocking readiness and dropping risk points. |
|
π¦ MCP Resources & Prompts
Resources (Read-Only Context)
portfolio://summaryβ Executive portfolio health KPIs and tier breakdown.portfolio://prioritiesβ Complete ranked list of permits ordered by urgency.portfolio://daily-action-planβ Today's prioritized tasks for managers and coordinators.portfolio://systemic-bottlenecksβ Cross-cutting failure patterns and strategic fixes.portfolio://changesβ Delta report of changes since the previous day's snapshot.permit://{permit_id}β Complete structured permit record with documents and review comments.project://{project_id}β Project overview with all associated active permits.requirements://{jurisdiction}/{permit_type}β Municipal requirements for jurisdiction and trade.runbook://permit-resubmission/{permit_id}β JSON checklist for resubmission filing.
Prompts (Structured LLM Workflows)
daily_standup_briefingβ Runs the morning team standup agenda with role assignments.permit_readiness_auditβ Rigorous pre-filing audit of a single permit application.resubmission_strategyβ Plans tactical comment-by-comment response packet for rejected permits.portfolio_risk_reviewβ Executive quarterly/monthly review of portfolio schedule exposure.
π Sample Execution Outputs
1. Portfolio Priorities Output (analyze_portfolio_priorities)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PERMITFLOW PORTFOLIO RISK & PRIORITY RANKING β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
As of: 2026-07-06
Permits Analyzed: 10
Risk Breakdown: π¨ CRITICAL: 3 | β HIGH: 2 | βΉ MEDIUM: 2 | β LOW: 3
Executive Summary: Analyzed 10 permits across the portfolio. Found 3 CRITICAL
and 2 HIGH risk permits requiring immediate manager intervention. Top priority
permits are: P-1042 (Phoenix Commercial Plaza), P-1003 (Maple Heights Apartments).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
RANKED PERMIT ACTION HIERARCHY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
#1 β P-1042 β Phoenix Commercial Plaza [MECHANICAL]
Status: REVISION_REQUIRED | Jurisdiction: City of Phoenix
Risk Score: 100/100 β π¨ [CRITICAL RISK]
Target Date: 2026-07-01 (OVERDUE by 5 days)
Key Drivers: Past deadline by 5 days, 1 critical AHJ comment(s), 3 missing document(s)
βΊ NEXT STEP: Upload required document: HVAC Equipment Schedule
Risk Evidence & Factors:
β’ (+30 pts) Overdue Target Date: Target completion date was 2026-07-01 (5 days overdue).
β’ (+25 pts) Critical AHJ Comments: 1 critical comment(s) from plans examiners.
[Evidence: AHJ Comment CMT-401 β "The submitted HVAC design does not demonstrate compliance with ASHRAE 90.1-2019..."]
β’ (+20 pts) Missing Required Documents: 3 mandatory document(s) not submitted.
β’ (+15 pts) Formal Rejection History: Permit was previously rejected 1 time(s).
#2 β P-1003 β Maple Heights Apartments [ELECTRICAL]
Status: REJECTED | Jurisdiction: City of Tempe
Risk Score: 95/100 β π¨ [CRITICAL RISK]
Target Date: 2026-05-01 (OVERDUE by 66 days)
Key Drivers: Past deadline by 66 days, 1 critical AHJ comment(s), Prior rejection on record
βΊ NEXT STEP: Address authority comment: Electrical load calculations do not comply with NEC 2023...2. Systemic Bottlenecks Analysis (analyze_systemic_bottlenecks)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PORTFOLIO SYSTEMIC BOTTLENECKS ANALYSIS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Permits Evaluated: 10
Bottlenecks Found: 4 cross-cutting failure modes identified
[1] GENERAL LIABILITY INSURANCE CERTIFICATE LAPSES & GAPS
Category: Insurance Compliance
Portfolio Impact: 30.0% of active portfolio (3 permits)
Affected Permits: P-1002, P-1042, P-1070
Affected Projects:Phoenix Commercial Plaza, Maple Heights Apartments
Jurisdictions: City of Phoenix, City of Tempe
Root Cause: Contractors upload certificates without tracking 1-year expirations.
βΊ RECOMMENDED FIX: Deploy automated 60-day advance insurance renewal alerts.
[2] MISSING LICENSED PE STAMPED STRUCTURAL DRAWINGS FOR EQUIPMENT SUPPORTS
Category: Engineering Calculations
Portfolio Impact: 20.0% of active portfolio (2 permits)
Affected Permits: P-1002, P-1042
Affected Projects:Phoenix Commercial Plaza
Jurisdictions: City of Phoenix
Root Cause: Mechanical contractors submit equipment without coordinating PE roof support framing.
βΊ RECOMMENDED FIX: Require structural review ticket before submitting units >1,000 lbs.π Project Directory Structure
PermitFlow-MCP/
βββ .env.example # Sample environment configuration
βββ pyproject.toml # uv & PEP 621 packaging configuration
βββ README.md # Documentation and architecture guide
βββ documents/ # Municipal requirement guidelines (RAG corpus)
β βββ building_permit_requirements.txt
β βββ electrical_requirements.txt
β βββ hvac_requirements.txt
β βββ inspection_guidelines.txt
β βββ resubmission_guidelines.md
β βββ structural_requirements.txt
βββ mock_data/ # Realistic operational datasets
β βββ authority_comments.json # AHJ review comments and severities
β βββ inspections.json # On-site inspections and milestones
β βββ permits.json # Core permit database
β βββ portfolio_snapshots.json # Previous day portfolio state for diffs
β βββ previous_cases.json # Historical case studies and lessons learned
β βββ projects.json # Project and owner master records
β βββ submitted_documents.json # Document versions, statuses, and expiration dates
βββ scripts/
β βββ ingest_documents.py # Offline RAG ingestion runner
βββ src/
β βββ permitflow_mcp/
β βββ __init__.py
β βββ config.py # Pydantic Settings configuration
β βββ server.py # Main FastMCP server instance and CLI
β βββ models/
β β βββ __init__.py
β β βββ schemas.py # Pydantic models for readiness & portfolio intelligence
β βββ prompts/
β β βββ __init__.py
β β βββ permit_prompts.py # MCP Prompt workflows (standup, audit, strategy, review)
β βββ rag/
β β βββ __init__.py
β β βββ chunking.py # Document chunking with section awareness
β β βββ ingest.py # Sentence-transformers + FAISS vector ingestion
β β βββ retriever.py # Dual retriever: FAISS index + BM25 keyword fallback
β βββ resources/
β β βββ __init__.py
β β βββ permit_resources.py # Single-permit MCP resources
β β βββ portfolio_resources.py # Portfolio-level MCP resources
β βββ services/
β β βββ __init__.py
β β βββ permit_service.py # Data layer querying permits and projects
β β βββ portfolio_service.py # Core portfolio intelligence engine
β β βββ readiness_service.py # Single-permit readiness calculation engine
β β βββ token_service.py # Token usage tracker
β βββ tools/
β βββ __init__.py
β βββ permit_tools.py # Single-permit MCP tools
β βββ portfolio_tools.py # Portfolio-level intelligence MCP tools
βββ tests/
βββ __init__.py
βββ test_permit_service.py # Unit tests for data services
βββ test_portfolio_service.py # Unit tests for portfolio rankings, diffs, bottlenecks
βββ test_rag.py # Unit tests for chunking and retrieval
βββ test_readiness_service.py # Unit tests for readiness scoring
βββ test_tools.py # Unit tests for FastMCP tool executionπ Security & Safe Operations
Human-in-the-Loop Safeguard: Every tool response and prompt explicitly notes: "Human review and coordinator sign-off required prior to filing resubmissions."
Offline & Private: The prototype runs entirely in your local environment.
Zero Mock LLM Overhead: All portfolio intelligence algorithms, scoring models, and delta engines execute deterministically in Python with zero third-party API dependencies required to run the server.
π License
MIT License. See LICENSE for details.
This server cannot be deployed
Related MCP Connectors
Built-environment forecasts, public benchmarks, and permit or zoning readiness through remote MCP.
Public building permits, property assessments, parcels and development intelligence.
Building-permit verdicts by address, with cited records. SF, Seattle, Austin, NYC. Pay per call.
Fresh US building permits with contacts from official city APIs. Construction lead generation.
Related MCP Servers
- AlicenseAqualityDmaintenanceAI-powered property intelligence for instant zoning analysis, buildability assessments, ADU eligibility, flood risk, and development feasibility reports for any US address.51MIT
- AlicenseNot gradedqualityCmaintenanceProvides AI-powered subsurface scan analysis and plain-English bid drafting tools, helping certified technicians assess hazards and trades build estimates.MIT
- FlicenseNot gradedqualityFmaintenanceEnables municipal permit preflight checks for construction and renovation projects, returning evidence-linked, rule-version-aware results without using an LLM.-
- FlicenseNot gradedqualityBmaintenanceEnables 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.-