How I turned my government-data Actors into MCP tools Claude calls mid-task
Description and use
An automation recipe enabling Claude to query US government data via an MCP server that wraps Apify Actors, handling API keys, caps, and access restrictions.
Problem
Agents cannot directly access public government data sources because of API keys, rate limits, caps, and access restrictions, leading to incomplete or incorrect results.
Outcome
Agents can now reliably retrieve and use US government data via the MCP server, overcoming API key, rate limit, cap, and access barriers.
Workflow
- 1. Publish the desired Apify Actors (e.g., SAM.gov scraper, NPI scraper, permits scraper).
- 2. Create an MCP server (e.g., us‑govdata‑mcp) that defines each tool’s input schema with Zod and calls the Apify run‑sync‑get‑dataset‑items endpoint.
- 3. Deploy the server (MIT‑licensed, listed on Glama MCP directory).
- 4. Configure the MCP client (Claude Desktop, Claude Code, or Cursor) to point to the server URL.
- 5. In Claude, ask a question that requires government data (e.g., "find active cybersecurity solicitations set aside for small business").
- 6. Claude sends a tool call to the MCP server; the server validates input, runs the corresponding Actor, and returns the dataset items.
- 7. Claude presents the results to the user, optionally applying post‑processing or summarization.
Evidence
The official API wants a registered key. The search UI is not an API. The daily CSV extract runs roughly 240 MB, which is not a thing you hand a chat model mid‑conversation.
The server is an MIT‑licensed repo with its own README, listed on the Glama MCP directory.
- Record date: 2026-09-09T04:00:43.100Z