# mcp-sam-gov

Connects AI agents to US federal and local public procurement records, spending data, and vendor checks. Runs without costly data subscriptions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: cliwant
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cliwant/mcp-sam-gov
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-sam-gov

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SAM_GOV_API_KEY`, `CENSUS_API_KEY`, `FRED_API_KEY`, `BEA_API_KEY`, `BLS_API_KEY`, `DOL_API_KEY`, `DATA_GOV_API_KEY`, `NVD_API_KEY`, `OPENFDA_API_KEY`, `SOCRATA_APP_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values. 9 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
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-gov
```
Replace <…> with your own values. 9 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-gov
```
Replace <…> with your own values. 9 more environment variables are in the server README

## When to use it
- 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
- Extract the SOW and contracting officer details for notice ID 5ef3db5d.
- Screen this vendor across OFAC sanctions and EPA compliance records.

## Similar
- [USASpending.gov](https://affpapa.org/en/nevibecode/mcp/usaspendinggov.md) — MCP server · ★ 27
- [tam-sam-som-calculator](https://affpapa.org/en/nevibecode/skills/tam-sam-som-calculator.md) — skill · 2300 installs
- [Boletín Claro](https://affpapa.org/en/nevibecode/mcp/boletin-claro.md) — MCP server
- [Environmental Compliance](https://affpapa.org/en/nevibecode/mcp/environmental-compliance.md) — MCP server · ★ 6
- [TrueSource](https://affpapa.org/en/nevibecode/mcp/truesource.md) — MCP server · ★ 573
- [mcp](https://affpapa.org/en/nevibecode/mcp/licinexus-mcp.md) — MCP server · ★ 81

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
