Skip to content
MCP server

Sam Gov MCP

Search SAM.gov federal contract opportunities, read-only, with your own free API key

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.1.3
Listing updated
today

Similar MCP servers

About Sam Gov MCP

Sam Gov MCP is an open-source MCP server for legal and government. It runs locally on your machine and is started by your AI client.

Every call is a single request to the SAM.gov Get Opportunities API, and the server is strict about what comes back. A reply that does not match the documented format, or a notice lookup that returns a different or ambiguous record, becomes a tool error instead of an empty or unrelated success. The API key is never logged and is redacted from errors and links.

Three tools are listed. search_opportunities filters by posted date range (up to one year, default 30 days), title keywords, NAICS code, set-aside, state and page size, returning one page per call with pagination details. get_opportunity fetches a notice by ID, and list_set_aside_codes explains set-aside codes. Results are summarised to fields such as title, agency, posted date, response deadline, set-aside, NAICS and a link.

A caveat from the README: an unrecognised key was observed to produce an empty 404, so a wrong key looks like zero results. Awards, entity lookup, attachment downloads and bid scoring are out of scope. It needs Node.js 22 and is MIT licensed.

Install

Run in a terminal

claude mcp add sam-gov-mcp --env SAM_API_KEY='<SAM_API_KEY>' -- npx -y @itcustomsolution/sam-gov-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sam-gov-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@itcustomsolution/sam-gov-mcp"
      ],
      "env": {
        "SAM_API_KEY": "<SAM_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sam-gov-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@itcustomsolution/sam-gov-mcp"
      ],
      "env": {
        "SAM_API_KEY": "<SAM_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "sam-gov-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@itcustomsolution/sam-gov-mcp"
      ],
      "env": {
        "SAM_API_KEY": "<SAM_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "sam-gov-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@itcustomsolution/sam-gov-mcp"
      ],
      "env": {
        "SAM_API_KEY": "<SAM_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "sam-gov-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@itcustomsolution/sam-gov-mcp"
      ],
      "env": {
        "SAM_API_KEY": "<SAM_API_KEY>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • SAM_API_KEYYour free SAM.gov API key (sam.gov > Account Details > API Key)Required

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

search_opportunities
Searches notices, one page per call, with date, keyword, NAICS, set-aside and state filters.
get_opportunity
Returns the notice record for one notice ID.
list_set_aside_codes
Lists set-aside codes and their meanings.

What it does

Opportunity search
Filter by dates, keywords, NAICS, set-aside and state.
Notice lookup
Fetch one notice by ID, as the API returns it.
Set-aside codes
List codes and their meanings.
Pagination info
Each page reports whether more results exist and the next offset.
Loud failures
Malformed or mismatched replies raise tool errors.
Key redaction
The API key never appears in logs, errors or links.

Good for

  • Find small-business set-aside notices for a NAICS code
  • Track new federal opportunities in one state
  • Look up a notice by its ID
  • Prepare a shortlist before manual bid review

Pricing

Open source

MIT licensed; needs a free SAM.gov API key

Sam Gov MCP FAQ

Do I need an API key?

Yes, a free SAM.gov key set as SAM_API_KEY.

Does it rank opportunities?

No. It returns what SAM.gov returns, summarised.

What is the date limit?

Searches need a posted-date range of one year or less.

Why do I get no results?

Check the key first; an unrecognised key was observed to return an empty reply.

Is Sam Gov MCP free?

Yes. Sam Gov MCP is open source, so you can use and self-host it for free.

How do I add Sam Gov MCP to Claude Code?

Run this command in your terminal: claude mcp add sam-gov-mcp --env SAM_API_KEY='<SAM_API_KEY>' -- npx -y @itcustomsolution/sam-gov-mcp

What are the best alternatives to Sam Gov MCP?

The closest alternatives to Sam Gov MCP are Cipo, Data Ny, Datos Gob Es, Datos Cl and Data Govt Nz.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers