Base URL:

MCP integration

Use the PolicyEngine API as an MCP server for AI assistants like Claude.

What is MCP?

The Model Context Protocol (MCP) is a standard for AI assistants to interact with external tools and data sources. The PolicyEngine API exposes all endpoints as MCP tools at /mcp, allowing AI assistants to calculate taxes and benefits, run economic impact analyses, and query policy data.

Add to Claude Code

Run this command:

claude mcp add --transport http policyengine https://v2.api.policyengine.org/mcp/

Add to Claude Desktop

Add this to your claude_desktop_config.json file:

{
  "mcpServers": {
    "policyengine": {
      "type": "url",
      "url": "https://v2.api.policyengine.org/mcp/"
    }
  }
}

Available tools

All API endpoints are exposed as MCP tools. Key capabilities include:

  • household_calculate — calculate taxes and benefits for a household
  • household_impact — compare baseline vs reform policy impact
  • analysis_economic_impact — run population-wide economic analysis
  • policies_list / policies_create — manage policy reforms
  • variables_list / parameters_list — query tax-benefit system metadata
  • datasets_list — list available population datasets

Example prompts

Once connected, you can ask Claude things like:

"Calculate the net income for a UK household with two adults earning £40,000 and £30,000"
"What would happen to this household's benefits if we increased the personal allowance to £15,000?"
"List all the parameters related to child benefit"