Connect SAM.gov to Codex
Query SAM.gov directly from Codex. Arlet links the two through one MCP connection and takes care of API keys.
This server connects your AI client to SAM.gov, the US government's official system for contract opportunities and entity registrations, operated by the GSA.
Key features:
- search_opportunities: find active and past contract notices - solicitations, pre-solicitations, combined synopses, sources-sought and award notices - filtered by title keyword, NAICS code, procurement type, agency, place-of-performance state and posted-date range. The posted range defaults to the last 90 days and is capped at one year by the upstream API; dates are accepted in ISO form and converted to SAM.gov's MM/dd/yyyy automatically.
- search_entities: look up companies and organizations registered to do business with the US government, by legal name, 12-character UEI or 5-character CAGE code. Returns registration status and expiration, address, and identifiers.
The UEI returned by search_entities is the same identifier USAspending uses for award recipients, so the two servers join cleanly: find a company here, then pull its award history there. Division of labor with USASpending: SAM.gov is where notices are published (before and at award); USAspending is where actual spending is recorded.
Using the API requires a personal API key generated from your SAM.gov account's Account Details page (a login is required; keys are tied to the account's roles). Set it as SAM_GOV_API_KEY in your Arlet environment variables. Note the upstream gateway answers invalid keys with an empty 404 response; this server converts that into an actionable error message.
How to connect SAM.gov to Codex
- 1
In the Arlet dashboard, open Data tools, find SAM.gov, set the API key issued by SAM.gov and switch it on.
- 2
In your terminal, run codex mcp add arlet --url https://mcp.arlet.dev/mcp/ to add Arlet as an MCP server.
- 3
Codex detects OAuth support and opens your browser. Sign in with Google and click Allow on the consent screen.
- 4
Once connected, both the CLI and the IDE extension can call Arlet tools (the configuration is shared).
If the browser does not open, run codex mcp login arlet to redo the authentication.
