Skip to main content
Glama
SAM Procurement MCP

SAM Procurement MCP

by jfleish

SAM Procurement MCP

Local MCP server for federal procurement research. It provides 13 tools for SAM.gov opportunities, public USAspending awards, public entity lookups, and a private local notice pipeline.

  • Live SAM.gov opportunity and entity tools use your personal SAM.gov public API key.

  • USAspending award tools are public and need no key.

  • Demo mode uses fictional data, makes no network requests, and needs no key.

  • Nothing is hosted by this project; there is no telemetry, database, or embedded AI API.

Install with your client

Choose the path for the app you use. The server runs locally on your computer; there is no account to create and no hosted endpoint to trust.

Client

Fastest supported path

API key needed?

Claude Desktop

Download the Claude Desktop extension, open it, and enter the optional key in the setup dialog

No for USAspending; optional graphical field for SAM.gov

Cursor

Add SAM Procurement to Cursor

No for USAspending; run setup for SAM.gov

VS Code + Copilot

Install in VS Code

No for USAspending; run setup for SAM.gov

Codex CLI / IDE

Add with the command below

No for USAspending; run setup for SAM.gov

ChatGPT

No local-stdio install path; use Codex or a supported desktop client

No hosted ChatGPT connector is provided

The Claude Desktop extension is the closest to one-click: installation and optional secret entry are graphical. Cursor and VS Code links install the local npx configuration after a review prompt. They still require Node.js 20.19+ on the machine that runs the server. Custom URI links work only when the corresponding app is installed and allows link handling.

The Claude link points to the latest GitHub release asset. For v0.2.2, it downloads sam-procurement-mcp.mcpb directly from the published release.

Start immediately without an API key

USAspending award search, market analysis, and public entity lookups work without a SAM.gov key. After installation, ask your client:

Compare recent federal awards for NAICS 541512 in Virginia and identify the leading recipients.

Use demo mode for a completely offline walkthrough:

npx -y sam-procurement-mcp --demo

The demo is synthetic and fictional. Do not use it as evidence for a bid, eligibility decision, or market conclusion.

Related MCP server: GovCon

Terminal fallback

Requires Node.js 20.19+, with Node 22 or 24 LTS recommended.

Install globally if you prefer a stable command for MCP client configuration:

npm install -g sam-procurement-mcp
sam-procurement-mcp --demo

GitHub fallback for unreleased changes:

npm install -g github:jfleish/sam-procurement-mcp
sam-procurement-mcp --demo

Configure SAM.gov

  1. Create or copy your personal public API key from SAM.gov Account Details.

  2. If you installed the Claude Desktop extension, paste the key into its optional sensitive setup field. Claude Desktop stores that value for the extension; do not paste it into a chat or tool call.

  3. For other local clients, on the same computer and Windows/macOS/Linux user account that runs your MCP client, run:

    sam-procurement-mcp setup

    If you did not install globally, use npx -y sam-procurement-mcp setup.

The CLI validates the key once and saves it only in the operating system's secure store: Windows DPAPI, macOS Keychain, or Linux Secret Service. It is never an MCP tool argument or client config value.

Useful checks:

sam-procurement-mcp doctor --live
sam-procurement-mcp validate-key
sam-procurement-mcp forget-key

SAM_GOV_API_KEY is an optional environment override for managed environments. It takes precedence over the secure store. Do not put it in shell history, MCP JSON, source files, or chat. USAspending remains available without it.

Connect an MCP client manually

The server uses local stdio. The default command below uses the installed binary and live mode. For a no-key walkthrough, add "--demo" to args.

Codex CLI / IDE

codex mcp add procurement -- sam-procurement-mcp
codex mcp list

If the package is not installed globally:

codex mcp add procurement -- npx -y sam-procurement-mcp

Codex currently documents a command-based local setup rather than a public one-click link for local stdio servers. The same configuration is shared by the Codex CLI and IDE surfaces. ChatGPT's hosted app is not a local stdio host, and this project intentionally does not operate a public remote service or collect credentials.

On Windows, if npx is not found by the client, use cmd /c in the command configuration or install globally and use sam-procurement-mcp.

Claude Code

claude mcp add --transport stdio procurement -- sam-procurement-mcp
claude mcp list

npx launcher:

claude mcp add --transport stdio procurement -- npx -y sam-procurement-mcp

Use --scope user if the server should be available in every Claude Code project. Run /mcp inside Claude Code to inspect the connection.

Claude Desktop manual configuration

Open Settings → Developer → Edit Config. The file is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\\Claude\\claude_desktop_config.json on Windows.

macOS/Linux:

{
  "mcpServers": {
    "procurement": {
      "command": "sam-procurement-mcp",
      "args": []
    }
  }
}

Windows, using npx:

{
  "mcpServers": {
    "procurement": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "sam-procurement-mcp"]
    }
  }
}

For demo mode, append "--demo" to args. Fully quit and restart Claude Desktop after saving. If installed globally, Windows can use "command": "sam-procurement-mcp" with an empty args array.

VS Code, Cursor, and other stdio clients

The install links above are preferred. If a client does not handle them, use this equivalent configuration wherever it accepts an MCP command and argument list:

{
  "command": "npx",
  "args": ["-y", "sam-procurement-mcp"]
}

For a client that cannot launch local processes, use the optional loopback transport:

sam-procurement-mcp serve-http --demo --port 3847

Connect the client to http://127.0.0.1:3847/mcp. It binds to loopback and exposes read-only research tools only; do not expose it publicly without a separately secured tunnel.

Discovery and distribution

server.json is published for the official MCP Registry under io.github.jfleish/sam-procurement. It points to the public npm package and deliberately does not include a credential requirement: users can install and use USAspending immediately.

The official registry is metadata for downstream marketplaces, not a replacement for npm or a hosted server. It is currently in preview. Cursor and VS Code may discover servers through their own marketplaces or registries; listing there is separate from this repository and is not being submitted yet.

Example prompts

Use the demo data to show me an opportunity, its deadline status, and comparable awards.
Find open cybersecurity opportunities under NAICS 541512 in Virginia.
Research notice <notice ID>, list its deadline with time zone and submission requirements, then compare similar awards.
Who received the largest prime contracts under PSC DA01 in the last two years?

Tools and data behavior

The 13 tools are: search_opportunities, get_opportunity, research_opportunity, search, fetch, search_contract_awards, analyze_contract_market, lookup_public_entity, procurement_status, save_pipeline_notice, list_pipeline, check_pipeline_notice, and remove_pipeline_notice.

SAM.gov searches default to the previous 30 days and accept at most a 365-day posting window. USAspending searches default to two years and accept at most 10 years. Requests time out after 15 seconds; transient USAspending gateway errors receive one retry. Results include source URLs where available. Always check official notices, amendments, attachments, eligibility, and submission instructions before acting.

Saved notice baselines are private local JSON files. The default data directory is OS-specific; set SAM_MCP_HOME for a separate local profile. Demo and live pipelines are separate. If a legacy plaintext key file is found, setup must migrate it before SAM.gov calls and removes it after successful secure storage.

Troubleshooting

  • Run sam-procurement-mcp --help and sam-procurement-mcp doctor --live.

  • Run sam-procurement-mcp doctor first for a local-only check; add --live only when you want one USAspending request and SAM.gov credential validation.

  • If the client cannot find the command, install globally or use the npm npx configuration above. On Windows, wrap npx as cmd /c npx ....

  • If SAM.gov says setup is required, run sam-procurement-mcp setup in the same OS user account as the MCP client. validate-key checks the stored credential without revealing it.

  • If Linux secure storage fails, install and unlock secret-tool / Secret Service.

  • If Claude Desktop does not show the tools, check its MCP logs and restart guidance.

  • For client behavior, see the official MCP server examples and Claude Desktop quickstart.

  • Report reproducible issues at GitHub Issues.

Installation is successful when the client lists the server's tools and a no-key USAspending request returns results. A configured SAM.gov key is not required for that check. If a client shows no tools, restart it after installation and inspect its MCP output/log panel before changing credentials.

Build and verify a release

npm ci --ignore-scripts
npm test
npm run release:build
npm run release:verify

The build creates an npm tarball and Claude Desktop .mcpb bundle. The verifier installs the tarball outside the checkout with an empty npm cache and smoke-tests the 13-tool demo server plus loopback HTTP surface. Add -- --live to verify live USAspending and authenticated SAM.gov paths when SAM_GOV_API_KEY is supplied to the verifier environment.

License

MIT. This independent project is not affiliated with GSA, USAspending, OpenAI, or Anthropic.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables research of federal contract awards and competitive landscape analysis using the USASpending.gov API. Supports searching for contracts, analyzing recipients, tracking spending trends, and identifying market opportunities in government contracting.
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Federal procurement intelligence toolkit that searches SAM.gov contract opportunities, analyzes agency spending patterns, tracks competitor wins, and monitors small business set-aside programs (8a, HUBZone, SDVOSB, WOSB). 4 tools using SAM.gov and USASpending.gov data.
      3
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search federal contracts, analyze agency spending, track competitor wins, and monitor small business set-aside opportunities using SAM.gov, USASpending.gov, and FPDS data.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables agents to search and analyze US federal procurement data across SAM.gov opportunities, FPDS awards, SAM entities, FFATA subawards, exclusions, and full-text solicitation attachments, with 6 tools for market research, opportunity discovery, teaming, pricing, and compliance.
      6
      174 PyPI
      MIT