mcp · cli · python
Run a model your way.
Use the hosted tools in a supported AI client, install the shared CLI, or call the Python packages directly. Start with the quickest route that gives you the control you need. The public MCP endpoint itself needs no PolicyEngine account or API key; AI-client plan and workspace permissions still apply.
Connect in three steps.
The MCP endpoint is public; client eligibility still applies.
Copy the server URL
https://policyengine--policyengine-macro-mcp-serve.modal.run/mcpAdd a Claude connector
Open Settings → Connectors, add a custom connector, and paste the URL.
Add a ChatGPT connector
On an eligible ChatGPT web plan, enable Developer mode in Settings → Apps → Advanced Settings, create a custom app, and paste the URL. Workspace administrators may need to grant or publish access.
Ask a policy question
Try a US rate shock, a UK forecast, or a household reform in either country.
Terminal setup
claude mcp add --transport http policyengine-macro https://policyengine--policyengine-macro-mcp-serve.modal.run/mcpFor Codex CLI, register the same MCP endpoint:
codex mcp add policyengine-macro --url https://policyengine--policyengine-macro-mcp-serve.modal.run/mcpRun the shared CLI.
Install once, then choose a model command.
pip install "policyengine-macro[models] @ git+https://github.com/PolicyEngine/macro#subdirectory=integration"pe-macro frbus-shock --var rffintay_aerr --shock 1.0pe-macro forecastpe-macro household --country usUse a model package directly.
Choose a model for its install and API reference.
Long-run reform effects
Model work, saving, capital, and public finances over decades.
Open OG-UK setupNear-term UK fiscal effects
Trace tax and spending changes against the OBR baseline.
Open OBR setupUS monetary and fiscal shocks
Run frb-us impulse responses under a chosen policy rule.
Open frb-us setupUK forecasts and shock decomposition
Forecast GDP and inflation or explain what moved them.
Open SVAR setupUK and US household impacts
Calculate taxes, benefits, and reform effects.
Open PolicyEngine setup