# SAM.gov US Federal Contracts & Grants + MCP (`mr.wolf/us-sam-tenders-mcp-server`) Actor

Keyless HTTP-only Apify Actor & Standby MCP Server extracting active US federal contract opportunities, RFPs, agencies, NAICS codes, and contracting officer contacts from SAM.gov.

- **URL**: https://apify.com/mr.wolf/us-sam-tenders-mcp-server.md
- **Developed by:** [Ciccio Cassino](https://apify.com/mr.wolf) (community)
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 tender-extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SAM.gov US Federal Contracts & Grants Scraper (Keyless + MCP Server)

Extract, filter, and normalize **active US federal contract opportunities**, **government RFPs**, **solicitations**, **NAICS codes**, and **contracting officer contacts** directly from **SAM.gov** — **with zero API key required**, available both as an **HTTP-only Apify Actor** and as a **Standby MCP Server** for AI agents.

Designed for **Pay-Per-Event (PPE)** cost efficiency with **zero headless browsers** (runs smoothly on **256 MB RAM**).

***

### Why Use This Keyless SAM.gov Scraper & MCP Server?

- **No SAM.gov API Key Required:** Queries SAM.gov's public `hal+json` endpoints directly over HTTP with automatic retries (`429`/`5xx`).
- **256 MB RAM, Zero Browser Overhead:** Fast execution and maximum PPE margin.
- **Structured Agency Hierarchy & Deadlines:** Extracts `department`, `agency`, `office`, `solicitationNumber`, `noticeType`, `publishedDate`, and `responseDeadline`.
- **Optional Deep Enrichment (`includeDetails`):** Fetches `naicsCodes`, `classificationCode`, and `pointOfContact` (contracting officer name, email, and phone).
- **Dual Mode (Batch + Standby MCP):** Connect **n8n**, **Make**, **Claude Desktop**, or **Cursor** directly.

***

### Input Examples (Copy-Paste)

#### 1. Active Software & IT Federal Solicitations

```json
{
  "query": "software",
  "noticeTypes": ["o", "k"],
  "activeOnly": true,
  "includeDetails": true,
  "maxItems": 25
}
```

#### 2. Department of Defense Opportunities with Upcoming Deadlines

```json
{
  "departments": ["DEFENSE"],
  "activeOnly": true,
  "minDeadline": "2026-12-01",
  "maxItems": 50
}
```

***

### Standby MCP Server for AI Agents

Connect **Cursor**, **Claude Desktop**, or any Streamable HTTP MCP client to:

```text
https://mr-wolf-1--us-sam-tenders-mcp-server.apify.actor/mcp
```

#### Exposed MCP Tools

- `search_us_contracts(query, noticeTypes, departments, activeOnly, publishedFrom, minDeadline, includeDetails, maxItems)`
- `get_opportunity_details(opportunityId)`

See [`docs/integrations/mcp-clients.md`](./docs/integrations/mcp-clients.md) for client configuration snippets.

***

### Automation Integrations (n8n & Make)

- **n8n workflow template:** [`docs/integrations/n8n-workflow.json`](./docs/integrations/n8n-workflow.json)
- **Make.com scenario blueprint:** [`docs/integrations/make-scenario.json`](./docs/integrations/make-scenario.json)

***

### Pay-Per-Event (PPE) Pricing

- `apify-actor-start`: Standard Actor startup event.
- `tender-extracted`: Charged once per normalized opportunity pushed to the dataset in batch mode.
- `mcp-query`: Charged once per MCP tool invocation in Standby mode.

***

### Frequently Asked Questions (FAQ)

**Do I need a GSA / SAM.gov API key to run this Actor?**
No. It works out of the box without any SAM.gov account or API key.

**Can I extract contracting officer emails and NAICS codes?**
Yes. Set `"includeDetails": true` in batch mode, or call the `get_opportunity_details` MCP tool with any `opportunityId`.

**Does it require proxies or a headless browser?**
No. It runs HTTP-only on `256 MB` RAM.

***

### Local Development

```bash
npm run typecheck && npm run lint && npm test && npm run build
apify run --purge
```

***

### Related Actors by mrWolf

- **[EU Public Tenders & Grants Monitor (TED Europa + MCP)](https://apify.com/mr.wolf/eu-tenders-mcp-server)** — Extract and filter active European public procurement notices from TED Europa.
- **[Tech & Startup Jobs Scraper (Greenhouse, Lever, Ashby, SmartRecruiters + MCP)](https://apify.com/mr.wolf/ats-jobs-mcp-server)** — Extract live tech jobs, salaries, and B2B hiring signals.
- **[B2B Domain Intelligence & Email Verifier + MCP](https://apify.com/mr.wolf/domain-intel-mcp-server)** — Detect tech stack, DNS/MX/SPF/DMARC readiness, and company contacts.

# Actor input Schema

## `query` (type: `string`):

Keyword or phrase to search in SAM.gov opportunities (e.g. software, cybersecurity, cloud).

## `noticeTypes` (type: `array`):

Filter by notice type codes (o=Solicitation, p=Presolicitation, k=Combined Synopsis, r=Sources Sought, a=Award Notice) or names.

## `departments` (type: `array`):

Filter by federal department or agency substrings (e.g. DEFENSE, HOMELAND, NASA).

## `activeOnly` (type: `boolean`):

Only return active, non-canceled opportunities.

## `publishedFrom` (type: `string`):

Only include opportunities published on or after this date (YYYY-MM-DD).

## `minDeadline` (type: `string`):

Only include opportunities with response deadline on or after this date (YYYY-MM-DD).

## `includeDetails` (type: `boolean`):

Fetch detail endpoint for each opportunity to include NAICS codes and contracting officer email/phone.

## `maxItems` (type: `integer`):

Maximum number of normalized opportunities to return (1–1000).

## Actor input object example

```json
{
  "query": "software",
  "noticeTypes": [],
  "departments": [],
  "activeOnly": true,
  "includeDetails": false,
  "maxItems": 25
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of normalized SAM.gov opportunities.

## `dataset` (type: `string`):

Complete JSON dataset of normalized SAM.gov opportunities.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "software",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("mr.wolf/us-sam-tenders-mcp-server").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "software",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("mr.wolf/us-sam-tenders-mcp-server").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "software",
  "maxItems": 25
}' |
apify call mr.wolf/us-sam-tenders-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mr.wolf/us-sam-tenders-mcp-server"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GucLxpHJW22URzWbU/builds/7PMATL2bxLuPZTevM/openapi.json
