
SAM.gov
io.github.1102tools由 GitHub 账号 1102tools 发布v0.4.1更新于 Oct 27, 2026
SAM.gov entity registration, exclusions, opportunities, contract awards. 15 tools.
概览
本地 MCP 服务器,以 20 个工具提供 SAM.gov 联邦采购数据:实体注册、排除名单、招标机会、合同授予和分包。
- 可以做什么
- 按 UEI、CAGE、名称、NAICS 或业务类型查询和搜索实体注册,并获取陈述与认证及诚信记录
- 按 UEI、名称、分类、机构或日期核查排除(禁入)记录
- 搜索合同机会并获取完整公告描述
- 搜索合同授予记录、按 PIID 查询修改记录、查找已删除的授予记录
- 搜索联邦组织层级并逐级展开下属机构,解析 PSC 代码
- 搜索 FFATA 分包合同与赠款子奖励报告
- 适用场景
- 适合联邦采购相关调研:审查供应商资质、核查是否被禁入、查找招标与预留项目、追溯授予历史或梳理机构层级。当助手需要实时 SAM.gov 数据而非通用网页搜索时值得添加。
- 运行要求
- 以 Python 包形式本地运行(uvx 或 pip),通过 stdio 连接桌面客户端。需要免费的 SAM.gov API 密钥,放在 SAM_API_KEY 环境变量中,密钥每 90 天过期。每日请求上限依账户类型为 10 至 10,000 次。需要访问 SAM.gov API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 SAM.gov,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
sam-gov-mcp
[price: free] [license: MIT] [tools: 20] [regression tests]
Free, open-source MCP server for SAM.gov entity registration, exclusion/debarment, contract opportunity, contract award, federal hierarchy, and FFATA subaward data.
Overview, demo video and hosted setup: https://1102tools.com/mcp/sam-gov
Two editions: hosted, with 6 keyless tools for contract opportunities, public entity registrations, and exclusions, and local, the full 20 tools with a free SAM.gov key. See Local or hosted.
Regression tests, including live checks against the SAM.gov APIs. The October 2026 releases were also checked with realistic contracting questions against official SAM.gov records. See testing.md.
Local or hosted
SAM.gov comes in two editions. Hosted is the only one with no key.
Compare local and hosted · Matching prompts
Hosted edition: 6 tools, no key
The hosted edition finds and reads contract opportunities, public entity registrations, and exclusions. It serves copies of the files that SAM.gov publishes for public download, so it needs no API key and no local setup. Opportunities and exclusions are published daily; public entity registrations are published monthly. The service checks opportunities every two hours and public entity and exclusion files every four hours, with an extra check after the usual exclusions publication time. Refreshes remain subject to the existing operating budgets; unchanged files write no rows. The date shown in each result identifies the file actually loaded; publication does not guarantee an immediate refresh. During an unfinished refresh, the affected public tool reports that data is refreshing and asks you to retry.
Older notices can appear when they remain active, including notices posted in earlier fiscal years. This is not a complete historical archive; archived notices and attachments are not included (results link to the notice on sam.gov). Pair it with the USAspending MCP for broader award history.
Every entity and exclusion answer includes its source file name and date. Entities that opted out of public display are not included in the hosted public mirror; a missing result does not establish that an entity is unregistered. Confirm current registration status on SAM.gov before relying on a registration result. Exclusion results are a dated public-file check; verify material findings on SAM.gov.
An active registration does not establish current SBA certification. Public 8(a) codes can remain after the recorded certification exit date; check certificationExitDate and confirm current certification with SBA.
Local full edition: when you need more
The full edition has everything in hosted, plus contract awards, subawards, reps and certs, and past terminations and legal proceedings.
The full edition is local only. Give your AI this page's link and ask it to set it up, or start at Installation. It needs your own free SAM.gov key, and that key's daily limit applies; see Authentication.
What it does
Exposes seven SAM.gov REST APIs plus a credential-readiness check as 20 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
Federal Hierarchy (v1)
search_federal_organizations- Search the FH for departments, agencies, sub-agencies, offices (filter by FH org id, name, type, status, agency code, CGAC)get_organization_hierarchy- Walk the children of a federal organization
Acquisition Subaward Reporting (FFATA subcontracts)
search_acquisition_subawards- Search FFATA subcontract reports (prime/sub relationships, agency, dates, status)
Assistance Subaward Reporting (FFATA grant subawards)
search_assistance_subawards- Search FFATA grant subaward reports (FAIN, prime award key, agency, dates)
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 personal API key by signing in and following the Public API Key instructions at SAM.gov Help.
Important: SAM.gov API keys expire every 90 days. Use SAM.gov Help to verify or regenerate the key and update your env var. This server returns a clear actionable error on 401/403 with regeneration instructions.
Installation
Via uvx
Via pip
From source
Configuration
Use the configuration below as the server definition and adapt its placement to your compatible MCP client. For practical requests using this source, see the prompt library.
The --refresh-package flag tells uv to check PyPI for a newer release each time your client launches the server, so fixes arrive automatically; without it, uv keeps serving whatever version it first cached. It adds a moment of network time at startup, so raise your platform's MCP startup timeout if it enforces a short one.
Restart the client and the tools appear.
Example prompts
Once configured, these examples illustrate the server's advanced standalone use. The maintained MCP-oriented request library contains the broader collection:
- "Run a vendor responsibility check on [UEI] for registration status and exclusions, then pull FAPIIS integrity records separately; the one-pass check does not include those."
- "Pull [COMPANY]'s registration status, socioeconomic categories, and any exclusions. If SAM returns multiple registrations for one UEI, say so and list them before picking one."
- "Get [COMPANY]'s FAR 52.212-3 and DFARS 252.204-7016 answers from their reps and certs (summary mode), and flag anything a contracting officer would want to read in full text."
- "How far back does [COMPANY]'s federal award history actually go? Check contract awards decade by decade, FY1970 forward; volumes thin out before 1980, so read single-digit years as archival traces, not gaps."
- "Find active 8(a)-certified firms (SBA-certified, not self-designated) in [STATE] under NAICS [NAICS]."
- "Search sources sought notices from the last 30 days under NAICS [NAICS], response deadlines sorted soonest first."
- "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 exclusions for [NAME]: give me classification (Firm, Individual, Vessel), excluding agency, and whether each record is active."
- "Search contract awards for [COMPANY] in fiscal year 2026, then look up all modifications for the biggest PIID you find."
- "Show me deleted contract award records for Department of Defense this fiscal year."
- "Find the Federal Hierarchy ID for the Department of the Treasury and walk one level of children."
- "Show me FFATA subcontracts on prime PIID [PIID], and total the subaward amounts."
- "Pull all subawards reported under grant FAIN [FAIN]."
- "List the agency-level orgs in CGAC 075 (HHS)."
Design notes
- Authentication via env var only.
SAM_API_KEYis read from the environment on every call. The key never enters the model's conversation context. - 90-day expiration awareness. 401/403 errors are translated into an actionable regeneration message with the current SAM.gov Help link.
- 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. - Federal Hierarchy quirks baked in.
- Lowercase
totalrecordsandorglistkeys (rest of SAM.gov uses camelCase); normalizer preserves both - Default response is ACTIVE-only; passing
status=ACTIVEis a no-op vs. the unfiltered call. PassINACTIVEto expand to retired orgs - Real
fhorgtypevalues look likeDepartment/Ind. Agency, but the API also accepts shorthand (DEPARTMENT, AGENCY) with case-insensitive matching
- Lowercase
- Subaward Reporting quirks baked in.
- Dates use ISO
yyyy-MM-dd(NOTMM/dd/yyyylike Contract Awards). Mixing them raises a clear pre-network validation error - Pagination uses
pageNumber/pageSize(NOTpage/sizeorlimit/offset) - Live audit (April 2026) found three documented parameter casings are silently ignored:
PIIDis dropped (use lowercasepiid),referencedIdvPIIDis dropped (usereferencedIDVPIID), andreferencedIDVAgencyIDis dropped (usereferencedIDVAgencyId). Wire-level names are now correct in the server
- Dates use ISO
Part of
federal-contracting-mcps: monorepo of 9 MCP servers for federal contracting data. Pair these sources with the MCP prompt library.
License
MIT
来源:servers/sam-gov-mcp/readme.md,提交 7ff19f1
工具
0版本历史
1- v0.4.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分