Content
# SAM.gov MCP Server
MCP (Model Context Protocol) server for searching federal procurement opportunities, registered entities, and assistance listings on SAM.gov.
Built for Mail Processing Associates (MPA) — includes an MPA-specific procurement scan tool that searches across printing/mailing NAICS codes with relevance scoring and Florida prioritization.
## Tools
| Tool | Description |
|------|-------------|
| `search_opportunities` | Search federal contract opportunities by keyword, NAICS, state, set-aside, date range, etc. |
| `get_opportunity_description` | Get full description text for a specific opportunity by notice ID |
| `search_entities` | Look up SAM-registered businesses by name, UEI, CAGE, NAICS, state, business type |
| `mpa_procurement_scan` | MPA-optimized scan across 6 NAICS codes, 10 keywords, and 2 PSC codes with relevance scoring |
| `search_assistance_listings` | Search federal grants and assistance programs (formerly CFDA) |
## Prerequisites
1. **SAM.gov account** — Register at [sam.gov](https://sam.gov)
2. **API key** — Get your Public API Key from [sam.gov/profile/details](https://sam.gov/profile/details)
3. **Node.js 18+**
### API Rate Limits
| Account Type | Daily Limit |
|-------------|-------------|
| Non-federal, no SAM role | 10 requests/day |
| Non-federal with SAM role | 1,000 requests/day |
| Federal user | 1,000 requests/day |
| Non-federal system account | 1,000 requests/day |
| Federal system account | 10,000 requests/day |
> **Recommendation**: If you're running automated scans, get a System Account for the 1,000/day limit.
## Setup
### 1. Install
```bash
cd sam-gov-mcp
npm install
```
### 2. Set your API key
```bash
export SAM_GOV_API_KEY="your-api-key-here"
```
### 3. Add to Claude Desktop
Edit your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on Mac, or `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
```json
{
"mcpServers": {
"sam-gov": {
"command": "node",
"args": ["C:\\path\\to\\sam-gov-mcp\\src\\index.js"],
"env": {
"SAM_GOV_API_KEY": "your-api-key-here"
}
}
}
}
```
### 4. Add to Claude Code CLI
```bash
claude mcp add sam-gov node /path/to/sam-gov-mcp/src/index.js -e SAM_GOV_API_KEY=your-api-key-here
```
## Usage Examples
### Search for printing opportunities in Florida
```
Use search_opportunities with naics_code "323111" and state "FL"
```
### Run the full MPA procurement scan
```
Use mpa_procurement_scan with days_back 14 and states "FL"
```
### Look up a competitor
```
Use search_entities with legal_business_name "Novitex Government Solutions"
```
### Find SDVOSB printing companies
```
Use search_entities with naics_code "323111" and business_type "2X" and state "FL"
```
## MPA NAICS Codes
| Code | Description |
|------|-------------|
| 323111 | Commercial Printing (except Screen and Books) |
| 323120 | Support Activities for Printing |
| 561431 | Private Mail Centers / Mailing Services |
| 561410 | Document Preparation Services |
| 323110 | Commercial Lithographic Printing |
| 541860 | Direct Mail Advertising |
## License
MIT