Skip to main content
Glama
bidnetdirect-solicitations

bidnetdirect-solicitations

README.md
# BidNet Direct Solicitations API (Python SDK, CLI & MCP)

[![CI](https://github.com/abelfeed/bidnetdirect-solicitations-api/actions/workflows/ci.yml/badge.svg)](https://github.com/abelfeed/bidnetdirect-solicitations-api/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/abelfeed-bidnetdirect.svg)](https://pypi.org/project/abelfeed-bidnetdirect/)
[![Python](https://img.shields.io/pypi/pyversions/abelfeed-bidnetdirect.svg)](https://pypi.org/project/abelfeed-bidnetdirect/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

Open-source Python client, CLI (`bidnetdirect-fetch`), and Model Context Protocol (MCP) manifest for querying Open and Closed US government solicitations (Federal, State & Local, Member Agency) from BidNet Direct.

## Installation

```bash
pip install abelfeed-bidnetdirect
export APIFY_TOKEN="your_apify_token"
```

## Python Usage

```python
from abelfeed_bidnetdirect import BidNetDirectClient

client = BidNetDirectClient()
bids = client.fetch(
    status="open",
    location="California",
    category="Construction",
    publish_date="WEEK_1",
    max_items=50,
    include_details=True,
    exclude_keywords=["janitorial", "landscaping"],
)

for bid in bids[:5]:
    print(bid["solicitationId"], bid["closingAtIso"], bid["title"])
```

## CLI Usage

```bash
# Latest 25 open Federal bids mentioning "cybersecurity"
bidnetdirect-fetch --scope federal --keywords cybersecurity --max-items 25 -o bids.json

# Closed Member Agency bids with public issuing organization and source URLs
bidnetdirect-fetch --status closed --scope member_agency --max-items 20
```

## MCP Server (Claude Desktop / Cursor / VS Code)

Registered on the Official MCP Registry as `io.github.abelfeed/bidnetdirect-solicitations` (see [server.json](server.json)):

```json
{
  "mcpServers": {
    "abelfeed-bidnetdirect": {
      "url": "https://mcp.apify.com/?tools=abelfeed/bidnetdirect-solicitations-fast-api",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

## Development & Testing

```bash
pip install -e . pytest
pytest -v
```

## Hosted Backend & Security

This package is a thin MIT-licensed wrapper around the hosted Apify Actor [`abelfeed/bidnetdirect-solicitations-fast-api`](https://apify.com/abelfeed/bidnetdirect-solicitations-fast-api). See [SECURITY.md](SECURITY.md) for vulnerability disclosure and OIDC Trusted Publishing details.

## License

MIT - see [LICENSE](LICENSE).