MCP server for SAM.gov entity registration, exclusion, contract opportunity, and contract award data
Project description
sam-gov-mcp
MCP server for SAM.gov entity registration, exclusion/debarment, contract opportunity, and contract award data.
Requires a free SAM.gov API key. Works with any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Cline, Continue, Zed, etc.).
What it does
Exposes four SAM.gov REST APIs plus the PSC lookup as 15 MCP tools:
Entity Management (v3)
lookup_entity_by_uei- Single UEI lookup with configurable response sectionslookup_entity_by_cage- CAGE code lookupsearch_entities- Flexible entity search (NAICS, PSC, business type, state, name, etc.)get_entity_reps_and_certs- FAR/DFARS reps and certs (must be requested explicitly)get_entity_integrity_info- FAPIIS proceedings data
Exclusions (v4)
check_exclusion_by_uei- Single-UEI debarment checksearch_exclusions- Broader exclusion search by name, classification, program, agency, date
Contract Opportunities (v2)
search_opportunities- Search contract opportunities with full working filter setget_opportunity_description- Fetch the HTML description by notice ID
Contract Awards (v1) -- FPDS replacement
search_contract_awards- Search contract award records (vendor, agency, NAICS, dates, dollars, set-aside, etc.)lookup_award_by_piid- Look up all modifications for a single PIIDsearch_deleted_awards- Search deleted award records for audit trails
PSC Lookup
lookup_psc_code- Resolve a PSC code to its full recordsearch_psc_free_text- Free-text PSC discovery
Composite workflow
vendor_responsibility_check- One-shot FAR 9.104-1 check (entity + exclusions in a single tool call)
Authentication
Requires a SAM.gov API key set via the SAM_API_KEY environment variable.
Get a free key at sam.gov/profile/details under "Public API Key."
| Account Type | Daily Limit |
|---|---|
| Non-federal, no SAM role | 10/day |
| Non-federal with SAM role | 1,000/day |
| Federal personal | 1,000/day |
| Federal system account | 10,000/day |
Important: SAM.gov API keys expire every 90 days. Regenerate at the same profile page and update your env var. This server returns a clear actionable error on 401/403 with regeneration instructions.
Installation
Via uvx (recommended)
uvx sam-gov-mcp
Via pip
pip install sam-gov-mcp
From source
git clone https://github.com/1102tools/sam-gov-mcp.git
cd sam-gov-mcp
pip install -e .
Claude Desktop configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"sam-gov": {
"command": "uvx",
"args": ["sam-gov-mcp"],
"env": {
"SAM_API_KEY": "SAM-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
}
Restart Claude Desktop. The server appears in your MCP tools panel.
Example prompts
Once configured:
- "Look up Leidos Inc in SAM.gov by UEI QVZMH5JLF274. Check registration status, business types, and whether they have any active exclusions."
- "Find active SDVOSB firms in Virginia with primary NAICS 541512 that are currently registered in SAM."
- "Do a full responsibility check on UEI E1K4E4A29SU5 and tell me whether I can award."
- "Search for all sources sought notices posted in the last 30 days with NAICS 541512."
- "Show me SDVOSB set-aside solicitations for IT services posted this quarter."
- "Get the full description of notice ID [paste ID] and summarize the SOW."
- "Search active exclusions where the excluded party name starts with 'acme'."
- "Search contract awards for Booz Allen Hamilton in fiscal year 2026."
- "Look up all modifications for PIID W912BV22P0112."
- "Find all SDVOSB set-aside contract awards signed this year with NAICS 541512."
- "Show me deleted contract award records for Department of Defense."
Design notes
- Authentication via env var only.
SAM_API_KEYis read from the environment on every call. The key never enters Claude's conversation context. - 90-day expiration awareness. 401/403 errors are translated into an actionable "regenerate at sam.gov/profile/details" message with full context.
- API quirks baked in as safety rails.
- Entity Management hard cap of size=10 is enforced client-side with a clear error
- Exclusions uses
sizenotlimit(different from other SAM endpoints) - Country codes are validated as 3-character ISO alpha-3 (2-char codes return 0 silently)
- No
Accept: application/jsonheader is set (Exclusions returns 406 if present) - Bracket/tilde/exclamation characters are preserved in query strings for multi-value params
- Post-filtering for broken parameters. The Opportunities API silently ignores
deptnameandsubtierfilters.search_opportunitiesexposes anagency_keywordparameter that post-filters results by matchingfullParentPathNamesubstring. - includeSections defaults. Entity lookups default to
entityRegistration,coreData. Always includeentityRegistrationalongside any other section or the response has no identification.repsAndCertsandintegrityInformationrequire explicit tool calls (get_entity_reps_and_certs,get_entity_integrity_info) because evenincludeSections=Alldoesn't include them. - Contract Awards response normalization. The Contract Awards API returns different JSON wrapper shapes for populated vs. empty results. All tools normalize this to a consistent
{"awardSummary": [...], "totalRecords": int}shape. Error responses are plain text (not JSON), detected and raised as actionable errors. - Contract Awards pagination. Uses
limit/offset(NOTpage/sizelike Entity Management). Max limit is 100. Dates must be MM/dd/yyyy format with bracket ranges[MM/dd/yyyy,MM/dd/yyyy]. - Composite workflow.
vendor_responsibility_checkcollapses a typical FAR 9.104-1 check (entity registration + exclusion lookup) into one tool call, returning a structured flags list for downstream reasoning.
Companion skill
This MCP mirrors the sam-gov-api skill from 1102tools.com. The skill is markdown-based and runs in any Claude surface; the MCP wraps the same API surface as deterministic tool calls for agent workflows, automation, and Claude.ai web client use.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sam_gov_mcp-0.3.1.tar.gz.
File metadata
- Download URL: sam_gov_mcp-0.3.1.tar.gz
- Upload date:
- Size: 92.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e693ffbc37ba605326956ebb0129935de130bb7d4081ee97b8af087574af41b
|
|
| MD5 |
6676baabe94a8a9d41ed28f11437ce7c
|
|
| BLAKE2b-256 |
2b3162bf3f11801f40e1948d8a677341d0c56f889e616c77586c4290c5e0b0b0
|
Provenance
The following attestation bundles were made for sam_gov_mcp-0.3.1.tar.gz:
Publisher:
publish.yml on 1102tools/sam-gov-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sam_gov_mcp-0.3.1.tar.gz -
Subject digest:
7e693ffbc37ba605326956ebb0129935de130bb7d4081ee97b8af087574af41b - Sigstore transparency entry: 1339592130
- Sigstore integration time:
-
Permalink:
1102tools/sam-gov-mcp@a49a598260c2ec7d292a50679ae87d3cc254e0eb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/1102tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a49a598260c2ec7d292a50679ae87d3cc254e0eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file sam_gov_mcp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: sam_gov_mcp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f240e20fe993c3aacd7b35741d741c864a167664707f0a734117767689cb390
|
|
| MD5 |
693327f9675ad963fcdf17c880b07965
|
|
| BLAKE2b-256 |
f43aa53ec4468c6e4d5be26205cddf29cf8d44afcb471f4c4b7ec872bd0d671f
|
Provenance
The following attestation bundles were made for sam_gov_mcp-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on 1102tools/sam-gov-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sam_gov_mcp-0.3.1-py3-none-any.whl -
Subject digest:
6f240e20fe993c3aacd7b35741d741c864a167664707f0a734117767689cb390 - Sigstore transparency entry: 1339592131
- Sigstore integration time:
-
Permalink:
1102tools/sam-gov-mcp@a49a598260c2ec7d292a50679ae87d3cc254e0eb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/1102tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a49a598260c2ec7d292a50679ae87d3cc254e0eb -
Trigger Event:
push
-
Statement type: