This project has been archived by its maintainers, and is no longer receiving any updates.
sam-mcp
An MCP server for accessing SAM.gov APIs, built with FastMCP and Python.
Prerequisites
- uv
- A SAM.gov API key — get one at sam.gov/workspace/profile/account-details
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
Metadata
Release files for sam-mcp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sam_mcp-0.3.0.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sam_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / sam_mcp-0.3.0.tar.gz
| Download URL | sam_mcp-0.3.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f7baf4e2296061361cd47e1710529f17e9c0deca1d86748fde6d578930a4fb3
|
|
BLAKE2b-256 checksum How to use checksums |
6a1e8ab0847d30de005cc7e000f53f8b10d974b47955d2e9d4312f586543b70c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / sam_mcp-0.3.0-py3-none-any.whl
| Download URL | sam_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
230e3026f928e99e143e5753165db5045debb8e467153fd497100d2f988d7f3c
|
|
BLAKE2b-256 checksum How to use checksums |
5e545285ed6835575c1ddaa97fb2caaf74ceac235cdab47856035050c4dec9f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for sam-mcp 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.