GovData Docs

Set up Claude Code

Connect Claude Code to GovData and query UK Government data from your terminal.

Before you start

  1. Create a GovData account (free)
  2. Go to your console and create an agent
  3. Copy the agent's API key — it starts with gd_live_ or gd_test_

1.Add the GovData MCP server

Run this command to add GovData to your current project:

claude mcp add govdata \\
  --transport streamable-http \\
  "https://mcp.govdata.dev/mcp" \\
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual API key.

Add globally (optional)

To make GovData available in all projects, add the --scope user flag:

claude mcp add govdata \\
  --transport streamable-http \\
  --scope user \\
  "https://mcp.govdata.dev/mcp" \\
  --header "Authorization: Bearer YOUR_API_KEY"

2.Try it out

Start Claude Code and ask a question:

claude
> Calculate take-home pay for a £55,000 salary in England

Claude will call the calculate_take_home_pay tool and return a full payslip-style breakdown.

What's next?

  • MCP Reference — see all available tools, resources, and prompts
  • Quick Start — learn about the REST API for programmatic access