ai newsDo., 22. Okt.
EilmeldungNVIDIA Unveils Minerva to Bring End-to-End Observability for AI Factories

Give Your AI Agent Live Federal Contract Data with the Apify MCP Server

By Loomwise Language models don't know what SAM.gov posted this morning. Ask one for "open small-business set-asides for janitorial work in Virginia" and you'll get a confident guess or a request to go look yourself. The Model Context Protocol (MCP) fixes this by giving the agent a tool it can call

dev.toDonnerstag 16:04 · 22.10.3 Min. Lesezeit
Bild: dev.to

Language models don't know what SAM.gov posted this morning. Ask one for "open small-business set-asides for janitorial work in Virginia" and you'll get a confident guess or a request to go look yourself. The Model Context Protocol (MCP) fixes this by giving the agent a tool it can call for live data.

This tutorial connects an MCP client to the Apify MCP server, loads a single tool that reads SAM.gov's public daily opportunities extract, and covers prompts, cost limits and scheduling. The setup follows Apify's MCP documentation as of October 2026 (docs.apify.com/mcp).

The hosted server lives at https://mcp.apify.com and uses Streamable HTTP. The recommended sign-in is OAuth: on first connect your browser opens, you sign in to Apify and approve access, and no token is stored in the client config.

Load only what the agent needs instead of the default tool set. Apify's docs recommend listing tools explicitly in production, so behavior doesn't change when defaults do.

{ "mcpServers": { "apify": { "type": "http", "url": "https://mcp.apify.com/?tools=fetch-actor-details,loomwise/federal-opportunities" } } } Enter fullscreen mode Exit fullscreen mode The tools query parameter does the work here:

Other ways to connect (all from Apify's docs):

Restart the client and confirm the tools appear.

Try a prompt that maps cleanly onto the tool's filters:

Find open SAM.gov solicitations posted in the last 7 days for NAICS 238220 (plumbing/HVAC contractors) with a Service-Disabled Veteran-Owned Small Business set-aside, performed in Texas or Oklahoma. Keep it to 50 results. Show title, agency, response deadline (with timezone) and the SAM.gov link, sorted by deadline.

{ "naicsCodes": [ "238220" ], "setAsideTypes": [ "SDVOSBC" ], "placeOfPerformanceStates": [ "TX", "OK" ], "noticeTypes": [ "Solicitation", "Combined Synopsis/Solicitation" ], "postedWithinDays": 7, "excludeExpired": true, "maxResults": 50 } Enter fullscreen mode Exit fullscreen mode Read the rows with get-dataset-items and give you a table. Each row has the same fields you'd get in a spreadsheet export: id, source, title, solicitationNumber, agency / subAgency / office, noticeType, naicsCode, classificationCode, setAsideCode / setAside, postedDate, responseDeadline (with timezone offset), archiveDate, popCity / popState / popZip / popCountry, link, and a descriptionSnippet with emails and phone numbers removed. Contact names aren't included.

Grant-only fields ( fundingInstrument, assistanceListings, awardCeiling, awardFloor ) are null for contracts.

This Actor is pay-per-event: $2 per 1,000 results plus Apify's small Actor-start fee. A 50-row answer costs about ten cents. To keep an agent from running up a bill:

If you only want an agent to find the right Actor and explain its inputs, without running anything, connect with only the discovery tools:

https://mcp.apify.com?tools=search-actors,fetch-actor-details,search-apify-docs,fetch-apify-docs Enter fullscreen mode Exit fullscreen mode According to Apify's docs, this works with no API token. Running Actors and reading storage always need authentication. search-actors ranking follows factors similar to Apify's Actor quality score, so a search like "SAM.gov contract opportunities" may return several options. Have the agent compare them with fetch-actor-details.

A chat answer is a one-off. To get the same answer every morning, either:

Disclosure: we built the tool used here, the SAM.gov Contract Opportunities Scraper & Feed on Apify ($2 per 1,000 results). The MCP setup above works the same way for any Actor in Apify Store.

Quelle: dev.to (dev.to). Original öffnen