mcp-sam-gov — Claude Code MCP server: what it does, how to install
Connects AI agents to US federal and local public procurement records, spending data, and vendor checks. Runs without costly data subscriptions.
claude mcp add --env SAM_GOV_API_KEY=<SAM_GOV_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --transport stdio mcp-sam-gov -- npx -y @cliwant/mcp-sam-govWhat mcp-sam-gov does
The server connects 153 tools to 54 public data feeds across federal and local levels. It pulls solicitations from SAM.gov, spending records from USAspending, and municipal bid boards. Your assistant can inspect statements of work and pull procurement officer contacts directly.
Out of 153 tools, 148 require zero registration or credentials. It fetches open records right after you run npx. Only four data endpoints, like FRED and BEA, ask for a free personal key.
Built-in validation guards stop models from guessing invalid NAICS codes or agency titles. Without setting up the optional API keys in your environment, economic indicators from Census and FRED will remain unreachable.
What it helps with
- search active SAM.gov solicitations by NAICS category
- inspect statements of work and procurement officer contact details
- vet suppliers against OFAC sanctions and SAM exclusion lists
- audit agency spending history and prior contract wins via USAspending
Example prompts for the agent
- Extract the SOW and contracting officer details for notice ID 5ef3db5d.
- Screen this vendor across OFAC sanctions and EPA compliance records.
How to install mcp-sam-gov
Platform CLI
claude mcp add --env SAM_GOV_API_KEY=<SAM_GOV_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --transport stdio mcp-sam-gov -- npx -y @cliwant/mcp-sam-govReplace <…> with your own values. 9 more environment variables are in the server README
Platform CLI
codex mcp add mcp-sam-gov --env SAM_GOV_API_KEY=<SAM_GOV_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> -- npx -y @cliwant/mcp-sam-govReplace <…> with your own values. 9 more environment variables are in the server README
Config file
{
"mcpServers": {
"mcp-sam-gov": {
"command": "npx",
"args": [
"-y",
"@cliwant/mcp-sam-gov"
],
"env": {
"SAM_GOV_API_KEY": "<SAM_GOV_API_KEY>",
"CENSUS_API_KEY": "<CENSUS_API_KEY>",
"FRED_API_KEY": "<FRED_API_KEY>",
"BEA_API_KEY": "<BEA_API_KEY>",
"BLS_API_KEY": "<BLS_API_KEY>"
}
}
}
}Replace <…> with your own values. 9 more environment variables are in the server README
Config file
{
"servers": {
"mcp-sam-gov": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cliwant/mcp-sam-gov"
],
"env": {
"SAM_GOV_API_KEY": "<SAM_GOV_API_KEY>",
"CENSUS_API_KEY": "<CENSUS_API_KEY>",
"FRED_API_KEY": "<FRED_API_KEY>",
"BEA_API_KEY": "<BEA_API_KEY>",
"BLS_API_KEY": "<BLS_API_KEY>"
}
}
}
}Replace <…> with your own values. 9 more environment variables are in the server README
Platform CLI
gemini mcp add -e SAM_GOV_API_KEY=<SAM_GOV_API_KEY> -e CENSUS_API_KEY=<CENSUS_API_KEY> -e FRED_API_KEY=<FRED_API_KEY> -e BEA_API_KEY=<BEA_API_KEY> -e BLS_API_KEY=<BLS_API_KEY> mcp-sam-gov npx -y @cliwant/mcp-sam-govReplace <…> with your own values. 9 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-sam-gov
How do I install mcp-sam-gov in Claude Code?
Run `claude mcp add --env SAM_GOV_API_KEY=<SAM_GOV_API_KEY> --env CENSUS_API_KEY=<CENSUS_API_KEY> --env FRED_API_KEY=<FRED_API_KEY> --env BEA_API_KEY=<BEA_API_KEY> --env BLS_API_KEY=<BLS_API_KEY> --transport stdio mcp-sam-gov -- npx -y @cliwant/mcp-sam-gov` in your terminal.
What does mcp-sam-gov do?
It exposes 54 public US government databases to your AI coding agent, covering federal contracts, regulatory updates, litigation, and vendor background checks.
Are API keys strictly required?
No keys or signups are needed for 148 of the 153 tools. Only four specialized feeds, including BEA, FRED, and Census, demand a free access key.