civilpy.mcp package
Model Context Protocol servers shipped with civilpy.
civilpy.mcp.pw_server module
MCP server for the ODOT ProjectWise navigator.
Exposes the full-tree project model — classified document queries,
pw:// branch resources, tier-2 completion checks, review-round
summaries — so an assistant can ask “the geotech report”, “the Stage 2
comments”, “is this project missing anything for Stage 3?” without any
path knowledge. Addresses are the classified pw:// scheme from
pw_project, so folder renames and
consultant-parallel folders never change an answer.
Backends
SnapshotStore— the committed crawler recon JSONs (district_file_samples.json,closed_tree_samples.json). Works on any machine; document content is not available.LiveStore— the live datasource through the ProjectWise SDK (Windows + logged-in ProjectWise Explorer). Projects resolve through an explicit{pid: path}map (e.g. built from the crawler’spw_folder_index.json) or the canonical active-projects template.
Running
pip install civilpy[mcp] then:
civilpy-pw-mcp # snapshot mode
CIVILPY_PW_SNAPSHOT=/path/to/crawler_output civilpy-pw-mcp
The core functions (list_projects() … project_checklist())
are plain Python over a store — usable and testable without the mcp
package installed; only build_server()/main() require it.
- class civilpy.mcp.pw_server.LiveStore(path_map=None, datasource=None)[source]
Bases:
objectProjects resolved on the live datasource.
path_mapis{pid: full folder path}— build it from the crawler’spw_folder_index.json/co_pw_availability.csvso closed/sold/additional-root projects resolve too. Without a map entry the store falls back to the active-projects template, which needsdistrictandcountykwargs onget().
- class civilpy.mcp.pw_server.SnapshotStore(snapshot_dir, datasource=None)[source]
Bases:
objectProjects from the committed recon JSONs (see
pw_snapshot).
- civilpy.mcp.pw_server.build_server(store)[source]
A FastMCP server over
store(requirespip install civilpy[mcp]).
- civilpy.mcp.pw_server.describe_project(store, pid)[source]
Branch map of one project: the
pw://resources under it with document counts.
- civilpy.mcp.pw_server.main()[source]
Console entry point (
civilpy-pw-mcp).CIVILPY_PW_SNAPSHOTselects snapshot mode (a directory holding the crawler JSONs);CIVILPY_PW_PATHS(a json{pid: path}file) selects live mode with that path map.
- civilpy.mcp.pw_server.project_checklist(store, pid, stage=None)[source]
Tier-2 completion/absence findings for one project. With a
stage("sts", 1, 2, 3) the stage’s submittal-package deliverables (from the ODOT review checklists) are appended.
Module contents
civilpy’s Model Context Protocol servers.
civilpy.mcp.pw_server exposes the ODOT ProjectWise navigator
(project trees, classified document queries, completion checks, review
summaries) as MCP tools + pw:// resources, over either the live
datasource (on-box) or committed recon snapshots (anywhere).
The mcp SDK is an optional dependency: pip install civilpy[mcp].
Everything except the server loop itself works without it.