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, contract awards, and subcontract partnerships in a single call
get_company_partners Unified view of a company's subcontract relationships — as prime contractor and as subcontractor
find_competitors Find companies registered under the same NAICS codes as a given entity
search_subawards Search FSRS subcontract reports by prime contract ID or award 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.2.1.tar.gz (6.2 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.2.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sam_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.2.1.tar.gz
Algorithm Hash digest
SHA256 263e48a1545436748d1f2a571bae6c994d2c47414cd6a6eae71620e224ff95e0
MD5 a72ba9ba7dc72d603fe9df52e298e6ba
BLAKE2b-256 dde3b9da12f012a932dff829a38854d7cb20639965130b08f676c995234f9d03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sam_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abb23deab1496e88618af21beb3153ac5720d9a3233080136ae57986275633a9
MD5 b9e5bca74e520c8f5b3cb83ff56849aa
BLAKE2b-256 0824dbdcb0194af0e44da66b8d0372f19c175f9c6b4a13b4c25768c2b736fb49

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