SAM.gov Opportunities MCP server
This server lets an AI assistant search U.S. federal contract opportunities on SAM.gov and look up individual notices, using your own Apify token.
Search opportunities (
search_opportunities): active SAM.gov notices, newest first, with agency, deadline, NAICS, PSC, set-aside, place of performance, contact and link.Filter by keyword: free-text words in title/description (e.g. "roof repair").
Filter by codes: NAICS and PSC codes or prefixes (
541512,2362,Z2).Filter by set-aside: SBA, SBP, 8A, 8AN, HZC, SDVOSBC, WOSB, EDWOSB, VSA, ISBEE, IEE, LAS, NONE, or friendly names like "HUBZone".
Filter by agency and state: agency/department names and two-letter place-of-performance states.
Filter by notice type: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Award Notice, Justification, Intent to Bundle, Sale of Surplus Property.
Filter by timing:
posted_since(default last 7 days),deadline_within_days(1–365), andopen_for_response_onlyto drop awards/non-open notices.Control output:
max_results(default 25, max 200) anddetailcompact vs full (description, all contacts, attachment links).Get one opportunity (
get_opportunity): by notice ID, sam.gov/opp URL, or solicitation number; a solicitation number returns all related notices, including the award winner and amount.See award details: awardee name, UEI, CAGE, award number, amount and date on award notices.
Cost awareness: $0.003 per returned notice, with per-call spending caps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAM.gov Opportunities MCP server Find small-business janitorial contracts in Colorado posted this week."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SAM.gov Opportunities MCP server
This MCP server lets an AI assistant (Claude Desktop, Cursor, VS Code, Claude Code or any other MCP client) search U.S. federal contract opportunities on SAM.gov: solicitations, sources sought, presolicitations and award notices.
Each call runs the Apify actor cleandatalabs/samgov-opportunities under your own Apify token. You don't need a SAM.gov API key and there is no 10-requests-per-day limit.
Not a developer? If you'd rather have a person watch a SAM.gov search for you, Clean Data Labs offers a free hand-checked sample: one search, the last 7 days, up to 10 notices.
Tools
Tool | What it does |
| Searches active notices, newest first. Filters: |
| Fetches one notice by notice ID, |
| Monitor mode: give a stable |
Compact rows include the notice ID, title, solicitation number, type, department, agency and office, posted and deadline dates, NAICS, PSC, set-aside, place of performance, primary contact, attachment count, award fields (amount, date, awardee name, UEI, CAGE, award number), monitor change fields (change_type, changed_fields, change_summary, text_diff, previous values), optional attachment_archive / attachments_archived when the actor archived files, and the SAM.gov link. detail: "full" adds the description, all contacts and attachment links.
search_opportunities and get_opportunity are read-only. what_changed_since_last_check stores its memory (a samgov-monitor-state key-value record) in your own Apify account.
Related MCP server: Government Contracts MCP
Cost
The actor charges $0.003 per returned notice (25 results cost $0.075), billed to the Apify account that owns the token. Apify's free plan includes $5 of monthly credit. Each tool call carries a spending cap: the lower of max_results × $0.003 and SAMGOV_MAX_CHARGE_USD (default $0.30). Each result reports estimated_cost_usd.
Install
You need uv (for uvx), or Python 3.10+ with pip, and an Apify API token from Console > Settings > API & Integrations.
Claude Desktop / Cursor / any client with an mcpServers config
{
"mcpServers": {
"samgov": {
"command": "uvx",
"args": ["samgov-opportunities-mcp"],
"env": { "APIFY_TOKEN": "apify_api_..." }
}
}
}Claude Code
claude mcp add samgov --env APIFY_TOKEN=apify_api_... -- uvx samgov-opportunities-mcpVS Code (.vscode/mcp.json)
{
"inputs": [{ "type": "promptString", "id": "apify-token", "description": "Apify API token", "password": true }],
"servers": {
"samgov": { "type": "stdio", "command": "uvx", "args": ["samgov-opportunities-mcp"],
"env": { "APIFY_TOKEN": "${input:apify-token}" } }
}
}From source
git clone https://github.com/clean-data-labs-org/samgov-opportunities-mcp && cd samgov-opportunities-mcp
pip install -e .
APIFY_TOKEN=apify_api_... samgov-opportunities-mcp # speaks MCP over stdioConfiguration
Env var | Default | Meaning |
| (required) | Your Apify API token. Runs are billed to this account. |
|
| Spending cap per tool call. |
|
| Actor build tag or number to run. |
Actor 0.3.7 (on latest): monitor rows include change_summary and text_diff, and every row carries set_aside / set_aside_description. Attachment archiving is opt-in on the actor via downloadAttachments: true (files land in a persistent KV store with sha256 dedupe; rows get attachment_archive[] / attachments_archived). This MCP package does not yet expose a download_attachments tool flag; set it only if you call the actor directly.
Example prompts
"Find small-business set-aside janitorial contracts in Colorado posted this week."
"Any VA construction solicitations under NAICS 2362 due in the next 30 days?"
"Who won solicitation FA813226Q0061, and for how much?"
"What changed since last check in my construction-co watch (NAICS 236220, Colorado)?"
"Show me HUBZone IT services opportunities (NAICS 5415) from the Army since 2026-11-01."
No-install alternative: Apify's hosted MCP server
To skip installing anything, point your client at Apify's hosted server and limit it to this actor:
{ "mcpServers": { "samgov": { "url": "https://mcp.apify.com/?tools=cleandatalabs/samgov-opportunities" } } }It signs you in with OAuth, or you can send Authorization: Bearer <APIFY_TOKEN>. It exposes the actor as one generic tool with every raw actor input, plus run and dataset helper tools. This package instead offers three focused tools with typed filters, compact output and a per-call spending cap.
Development
pip install -e ".[test]"
pytest # offline tests over a real MCP stdio session
SAMGOV_LIVE=1 APIFY_TOKEN=... pytest # adds a live search + get (about $0.01)
npx @modelcontextprotocol/inspector -e APIFY_TOKEN=... -- samgov-opportunities-mcpData source and disclaimer
The data comes from public SAM.gov notices. This project is not affiliated with or endorsed by the U.S. General Services Administration or SAM.gov. Always confirm deadlines and requirements on the official notice before you bid.
License
MIT
Available Tools
2 toolsget_opportunityARead-onlyIdempotent
Get one SAM.gov opportunity by notice ID, URL or solicitation number. A solicitation number returns all of its notices (for example the solicitation, its amendments and the award notice with the winner and amount).
Inputs: id (required), detail. Returns: object
search_opportunitiesBRead-only
Search active SAM.gov federal contract opportunities. Returns notices newest first, with agency, deadline, NAICS, PSC, set-aside, place of performance, primary contact and SAM.gov link (award notices also include the awardee and amount).
Inputs: detail, states, agencies, keywords, +8 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: search_opportunities performs discovery across active notices, while get_opportunity retrieves a specific notice or full solicitation history. An agent can easily choose between search and direct lookup without overlap.
Both names follow the same verb_noun convention (get_opportunity, search_opportunities), with natural singular/plural agreement matching what each returns. There are no mixed styles or cryptic abbreviations.
Two tools is thin but well matched to a focused read-only search-and-retrieve integration; each earns its place. A slightly larger surface with helper/reference tools could be justified, but nothing here feels redundant.
The core workflow—find opportunities and inspect a specific notice or full solicitation lifecycle—is covered, including amendments and awards via get_opportunity. Gaps include no explicit document/attachment retrieval or reference-data lookups, and search is limited to active opportunities.
Maintenance
Related MCP Connectors
Search US grants + federal contracts (Grants.gov + SAM.gov) from any LLM.
Search U.S. federal contract opportunities (RFPs, bids, awards) from SAM.gov official data.
US government data as clean JSON for AI agents: SAM.gov contract opportunities, USAspending awards, Grants.gov grants, House STOCK Act trades, and SEC EDGAR filings (Form 4 insider trades, 8-K events, 13F holdings, 13D/G stakes, XBRL fundamentals, 10-K/10-Q sections). 19 read-only tools. Data is as fresh as each source publishes; congressional trades lag up to 45 days and report dollar ranges (House only). Free tier, no card.
Web search, page extraction and open US government bids for AI agents, paid per call via x402.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables research of federal contract awards, market opportunities, and competitive landscapes using the USASpending.gov API. It provides specialized tools for AI agents to analyze government spending trends, identify incumbents, and search contractor details.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to search and analyze federal government contract opportunities and awards from SAM.gov and USASpending.gov, with tools for contract search, detail, agency spending, and trending sectors.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search federal contracts, analyze agency spending, track competitor wins, and monitor small business set-aside opportunities using SAM.gov, USASpending.gov, and FPDS data.1-
- AlicenseAqualityBmaintenanceEnables AI agents to search and retrieve US government contracts, look up NAICS codes, list indexed states, and score contract fit for a business profile. Provides access to live state and local procurement data through natural language without raw HTTP.762 npmMIT