# Government Contracts MCP — Federal Awards for AI Agents (`nexgendata/government-contracts-procurement-mcp-server`) Actor

MCP server: US federal spending intelligence for AI agents (USAspending.gov) — search contract & grant awards by keyword, rank top recipients by dollars, spending by agency, recipient profiles. For govcon & market research.

- **URL**: https://apify.com/nexgendata/government-contracts-procurement-mcp-server.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** MCP servers, AI, Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 tool calls

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🏛️ Government Contracts & Procurement MCP Server

**Put the entire U.S. federal spending firehose in your AI agent's hands.** Search contracts and grants by keyword, rank the top recipients in any market, see which agencies fund a topic, and profile any federal contractor — live from USAspending.gov, through the Model Context Protocol.

> Built by **NexGenData**. Connect once and your agent can do GovCon market research, competitor intelligence, and lead generation on demand.

---

### ⚡ What you get

| Tool | What it does | Data source |
|---|---|---|
| `search_federal_awards` | Search contracts or grants by keyword | USAspending.gov |
| `top_recipients` | Rank contractors/grantees by award dollars | USAspending.gov |
| `spending_by_agency` | See which agencies fund a market | USAspending.gov |
| `recipient_profile` | Look up a specific contractor's awards | USAspending.gov |

Results include award IDs, recipient names + UEIs, dollar amounts, awarding agencies, and dates — the official federal record.

---

### 🎯 Use cases

- **GovCon market sizing** — quantify federal spend on a topic and who wins it.
- **Competitive intelligence** — pull a rival contractor's recent awards and totals.
- **Lead generation** — find the top-funded recipients in a niche to target as partners or customers.
- **Capture planning** — identify which agencies and sub-agencies buy what you sell.
- **Due diligence** — verify a vendor's federal track record before partnering.

---

### 🚀 How to connect

```json
{
  "mcpServers": {
    "gov-contracts": {
      "url": "https://nexgendata--government-contracts-procurement-mcp-server.apify.actor/mcp",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
````

Get a free Apify token at [apify.com](https://www.apify.com/?fpr=2ayu9b).

***

### 📊 Sample inputs

```text
search_federal_awards(keyword="cybersecurity", award_type="contracts", max_results=15)
top_recipients(keyword="artificial intelligence", fiscal_year=2024)
spending_by_agency(keyword="renewable energy")
recipient_profile(name="Booz Allen")
```

### 📦 Sample output (search\_federal\_awards)

```json
{
  "keyword": "cybersecurity",
  "award_type": "contracts",
  "awards": [
    {
      "Award ID": "W91ZRU25FA002",
      "Recipient Name": "MICROTECHNOLOGIES LLC",
      "Award Amount": 30127.4,
      "Awarding Agency": "Department of Defense",
      "Start Date": "2025-01-14"
    }
  ],
  "source": "USAspending.gov"
}
```

***

### 🧠 How it works

A **standby MCP server** that holds a live session and answers tool calls against the official USAspending.gov v2 REST API. No data-source API key required; results are the public federal spending record, normalized into clean JSON.

***

### 🔗 Related NexGenData Actors

- [Government Contracts Search](https://www.apify.com/nexgendata/government-contracts-search?fpr=2ayu9b)
- [SAM.gov Federal Contractor Exclusions](https://www.apify.com/nexgendata/sam-gov-federal-contractor-exclusions?fpr=2ayu9b)
- [Regulatory Filings MCP](https://www.apify.com/nexgendata/regulatory-filings-mcp?fpr=2ayu9b)
- [Sales Intelligence MCP](https://www.apify.com/nexgendata/sales-intelligence-mcp?fpr=2ayu9b)
- [Finance & Market Data MCP](https://www.apify.com/nexgendata/finance-mcp-server?fpr=2ayu9b)

***

### 💵 Pricing

Pay-per-event: a small fee per successful **tool call** plus a one-time actor-start. No subscription. See the live pricing tab for current rates. Run your automations on [Apify](https://www.apify.com/?fpr=2ayu9b).

***

### ⚖️ Legal

USAspending.gov data is U.S. federal government public-record data. Use responsibly. This is not legal, financial, or procurement advice.

***

### ❓ FAQ

**Q: Contracts and grants both?** Yes — set `award_type` to `contracts` or `grants`.

**Q: Can I filter by fiscal year?** Yes — pass `fiscal_year` (e.g. 2024).

**Q: Do I need a USAspending key?** No. Only your Apify token.

**Q: How current is the data?** It reflects USAspending.gov's live database at query time.

**Q: What's a UEI?** The Unique Entity Identifier that replaced the DUNS number for federal recipients.

**Q: How many results per call?** Up to 50; tune with `max_results`.

**Q: Works with Claude / Cursor / Windsurf?** Yes — any MCP client over streamable-HTTP.

***

### 🛠️ Troubleshooting

- **No results** → broaden the keyword or remove the fiscal-year filter.
- **Recipient not found** → try a shorter / canonical company name.
- **Upstream error** → USAspending may rate-limit bursts; retry shortly.
- **Auth error** → confirm your Apify token in the `Authorization` header.
- **Idle disconnect** → the server closes idle sessions to save compute; reconnect.

***

### 🏢 About NexGenData

NexGenData builds production MCP servers and data actors for AI agents across finance, legal, regulatory, IP, government, and aviation. See the full catalog on [Apify](https://www.apify.com/nexgendata?fpr=2ayu9b).

# Actor input Schema

## Actor input object example

```json
{}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/government-contracts-procurement-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/government-contracts-procurement-mcp-server").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call nexgendata/government-contracts-procurement-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/government-contracts-procurement-mcp-server",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Government Contracts MCP — Federal Awards for AI Agents",
        "description": "MCP server: US federal spending intelligence for AI agents (USAspending.gov) — search contract & grant awards by keyword, rank top recipients by dollars, spending by agency, recipient profiles. For govcon & market research.",
        "version": "0.0",
        "x-build-id": "jbgbaqXFzxePL8LSg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~government-contracts-procurement-mcp-server/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-government-contracts-procurement-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~government-contracts-procurement-mcp-server/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-government-contracts-procurement-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~government-contracts-procurement-mcp-server/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-government-contracts-procurement-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
