Search SAM.gov contract opportunities (read-only). Bring your own free SAM.gov API key.
An MCP server that lets AI assistants (Claude Desktop, Cursor, and other MCP clients) search SAM.gov contract opportunities through the public SAM.gov Get Opportunities API.
SAM_API_KEY. The key is never logged and is redacted from errors and returned links.Get a free API key: sign in at sam.gov → Account Details → API Key.
Install. Claude Code:
claude mcp add sam-gov -e SAM_API_KEY=your-key-here -- npx -y @itcustomsolution/sam-gov-mcp
Or run it directly: SAM_API_KEY=your-key-here npx -y @itcustomsolution/sam-gov-mcp
Add it to your MCP client. Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"sam-gov": {
"command": "npx",
"args": ["-y", "@itcustomsolution/sam-gov-mcp"],
"env": { "SAM_API_KEY": "your-key-here" }
}
}
}
Ask: "Find small-business set-aside opportunities for NAICS 541512 posted in the last 30 days in Maryland."
| Tool | What it does | Inputs |
|---|---|---|
search_opportunities | Search notices | posted_from, posted_to (optional, default last 30 days; YYYY-MM-DD or MM/DD/YYYY, max 1-year range), keywords (title), naics, set_aside, state, limit (1–100, default 10), offset |
get_opportunity | Full JSON for one notice | notice_id (looks back 1 year) |
list_set_aside_codes | Set-aside codes and meanings | none |
Search results are summarized to: noticeId, title, solicitationNumber, agency, postedDate, responseDeadline, type, setAside, naics, state, uiLink.
api_key query parameter, so it travels in the request URL to api.sam.gov over HTTPS. The server redacts it from errors, links, and returned JSON, but anything that logs full URLs (an HTTP proxy, for example) would see it.npm install
npm test # vitest, HTTP fully mocked, no key needed
npm run build
Never commit a real key. .env is git-ignored.
MIT © IT Custom Solution
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @itcustomsolution/sam-gov-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-itcustomsolution-sam-gov-mcp": {
"command": "npx",
"args": [
"-y",
"@itcustomsolution/sam-gov-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@itcustomsolution/sam-gov-mcpnpmio.github.itcustomsolution/sam-gov-mcp works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.