Skip to main content
Glama
ChanghuLiu

projectpermit-mcp

by ChanghuLiu

ProjectPermit / BuildRequirements — Phase 0

ProjectPermit is an evidence-linked municipal permit preflight engine for construction and renovation projects. BuildRequirements is the deterministic rules engine inside it.

Phase 0 supports:

  • gatineau_qc

  • ottawa_on

  • 8 project families

  • address resolution using municipal GIS/geocoders

  • rule-version and overlay-aware results

  • official-source evidence on every rule result

  • a FastAPI endpoint and a standard MCP tool

  • x402-ready separation between the paid transport layer and the rules engine

The engine deliberately does not call an LLM. A calling agent normalizes natural-language scope into structured facts; BuildRequirements applies deterministic municipal rules.

Quick start

python -m venv .venv
source .venv/bin/activate
pip install -e .
uvicorn projectpermit.api:app --host 127.0.0.1 --port 8000

For MCP support:

pip install -e '.[mcp]'
projectpermit-mcp

projectpermit-mcp uses MCP Python SDK v2 Streamable HTTP, JSON responses, and stateless HTTP. It listens on 127.0.0.1:8001 by default. Override with PROJECTPERMIT_MCP_HOST and PROJECTPERMIT_MCP_PORT.

Run tests:

PYTHONPATH=src python -m unittest discover -s tests -v

Related MCP server: Canadian Building Code MCP Server

API

POST /v1/check-project-requirements

Example:

{
  "jurisdiction": "ottawa_on",
  "address": "110 Laurier Ave W, Ottawa, ON",
  "resolve_address": false,
  "project": {
    "family": "window_door",
    "action": "enlarge_existing_window",
    "structural_change": true
  }
}

The result is a preflight information package, not municipal authorization, legal advice, engineering certification, or building-code design approval.

Repository map

  • src/projectpermit/engine.py — deterministic rule engine

  • src/projectpermit/address.py — municipal address/GIS adapters

  • src/projectpermit/api.py — HTTP API

  • src/projectpermit/mcp_server.py — standard MCP server

  • data/golden_cases.json — deterministic regression corpus

  • data/source_manifest.json — official source registry/freshness metadata

  • schemas/ — public request/response schemas

  • docs/PHASE0_SPEC.md — product and engineering scope

  • docs/X402_ARCHITECTURE.md — payment/discovery design

Base Sepolia x402 smoke profile

A public-values-only testnet profile is provided at config/x402.base-sepolia.env.example. It targets Base Sepolia (eip155:84532) and the x402.org testnet facilitator. The receiving address is public; never put a private key or seed phrase in this repository.

set -a
source config/x402.base-sepolia.env.example
set +a
pip install -e '.[x402]'
uvicorn projectpermit.api:app --host 0.0.0.0 --port 8000

The protected resource is POST /v1/check-project-requirements. /health remains free for deployment monitoring.

Real paid smoke test

Run this only on your own machine. Keep the payer private key local; never paste or commit it.

python -m venv .venv-buyer
source .venv-buyer/bin/activate
pip install -e '.[buyer]'
export EVM_PRIVATE_KEY='0x...'
python scripts/x402_paid_smoke.py

The payer wallet must have enough Base Sepolia USDC for the $0.01 test payment. A successful run should return HTTP 200 and a decoded settlement response. The server itself never needs the payer private key.

Phase 0 safety boundary

Determinations intentionally use preflight language such as LIKELY_REQUIRED, LIKELY_NOT_REQUIRED, ADDITIONAL_REVIEW_REQUIRED, and MUNICIPAL_CONFIRMATION_REQUIRED where uncertainty exists. The engine should not be presented as a municipality, permit issuer, lawyer, architect, or engineer.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Professional building code compliance assistant that interfaces with municipal building codes, helping contractors and builders navigate complex regulatory requirements with precision.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    AI-powered property intelligence for instant zoning analysis, buildability assessments, ADU eligibility, flood risk, and development feasibility reports for any US address.
    5
    1
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChanghuLiu/projectpermit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server