Skip to main content

MCP server for accessing SAM.gov APIs

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

sam-mcp

An MCP server for accessing SAM.gov APIs, built with FastMCP and Python.

Prerequisites

Setup

git clone https://github.com/rsivilli/sam-mcp
cd sam-mcp
cp .env.example .env

Edit .env and set your API key:

SAM_API_KEY=your_api_key_here

Running the server

stdio (for MCP clients that spawn the process, e.g. Claude Desktop):

uv run sam-mcp

HTTP (for connecting remotely):

uv run sam-mcp-http

Claude Desktop configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "sam-gov": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/sam-mcp", "sam-mcp"],
      "env": {
        "SAM_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available tools

Entity & registration

Tool Description
search_entities Search registered entities (vendors/organizations) by name, UEI, CAGE code, state, country, or registration status
get_entity Get full details for a specific entity by UEI
resolve_company Resolve a company name to its SAM.gov entity record and UEI — returns the single best match

Opportunities & exclusions

Tool Description
search_opportunities Search contract opportunities/solicitations by keyword, NAICS code, set-aside type, date range, and more. postedFrom and postedTo are required.
search_exclusions Search for debarred or suspended parties by name, UEI, or CAGE code

Contract awards

Tool Description
search_contract_awards Search FPDS contract award records by recipient UEI, agency, NAICS code, date range, or dollar amount
get_similar_awards Given a contract PIID, find other awarded contracts with the same NAICS code, awarding agency, and set-aside type

Company intelligence

Tool Description
get_company_profile Full profile of a company: entity registration and contract awards in a single call
find_competitors Find companies registered under the same NAICS codes as a given entity
search_subawards Search FSRS subcontract reports by PIID, agency, award type, or date range
get_subawards_by_prime (disabled — subaward PIID filter unverified against live API; re-enable once confirmed with a system account key)

API rate limits

Rate limits are per API key per day and reset at midnight UTC.

User type Daily limit
Non-federal (no SAM.gov role) 10 requests/day
Non-federal (with SAM.gov role) 1,000 requests/day
Federal personal key 1,000 requests/day
Federal system account 10,000 requests/day

For production use, a system account key is recommended. Apply through your SAM.gov account settings.

Development

Install dev dependencies and set up pre-commit hooks:

uv sync
uv run pre-commit install

Run linting and formatting checks:

uv run pre-commit run --all-files

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

sam_mcp-0.3.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sam_mcp-0.3.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file sam_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: sam_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sam_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6f7baf4e2296061361cd47e1710529f17e9c0deca1d86748fde6d578930a4fb3
MD5 dc9c6317d23d98670485eb7353c6308f
BLAKE2b-256 6a1e8ab0847d30de005cc7e000f53f8b10d974b47955d2e9d4312f586543b70c

See more details on using hashes here.

File details

Details for the file sam_mcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sam_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sam_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 230e3026f928e99e143e5753165db5045debb8e467153fd497100d2f988d7f3c
MD5 d2402030e8956e2f55312053e620d2f2
BLAKE2b-256 5e545285ed6835575c1ddaa97fb2caaf74ceac235cdab47856035050c4dec9f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page