Metadata-Version: 2.5
Name: gov-tenders-mcp
Version: 0.2.1
Summary: Stdio MCP server for government tenders, grants, awards and council meetings via Apify's hosted MCP gateway
Project-URL: Homepage, https://github.com/GeminiGeorge22/gov-tenders-mcp
Project-URL: Source, https://github.com/GeminiGeorge22/gov-tenders-mcp/tree/main/python
Project-URL: Issues, https://github.com/GeminiGeorge22/gov-tenders-mcp/issues
License-Expression: MIT
License-File: LICENSE
Keywords: apify,mcp,mcp-server,model-context-protocol
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: anyio>=4.9
Requires-Dist: mcp<3,>=2.3
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# gov-tenders-mcp (Python)

<!-- mcp-name: io.github.GeminiGeorge22/gov-tenders-mcp -->

Python version of the [gov-tenders-mcp](https://github.com/GeminiGeorge22/gov-tenders-mcp) stdio MCP server, built on the official [`mcp`](https://pypi.org/project/mcp/) Python SDK. Same tools, same `APIFY_TOKEN` env var, same hosted endpoint as the Node.js server.

Stdio MCP server for government tenders, grants, awards and council meetings via Apify's hosted MCP gateway

It answers `initialize` and `tools/list` locally from the bundled `tools.json` (no token, no network). `tools/call` is forwarded to Apify's hosted MCP endpoint (`mcp.apify.com`) with **your own** `APIFY_TOKEN`, so each run uses your Apify account. Without a token a call returns a clear error instead of running anything. The token is only sent in the `Authorization` header and is never logged.

## Install

Requires Python 3.10+. With [uv](https://docs.astral.sh/uv/):

```bash
uvx gov-tenders-mcp
```

With pip:

```bash
pip install gov-tenders-mcp
gov-tenders-mcp
```

To run the latest unreleased code from GitHub instead of the PyPI release: `uvx --from "git+https://github.com/GeminiGeorge22/gov-tenders-mcp#subdirectory=python" gov-tenders-mcp`.

MCP client config:

```json
{
  "mcpServers": {
    "gov-tenders": {
      "command": "uvx",
      "args": ["gov-tenders-mcp"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Optional env: `APIFY_ACTORS` (comma-separated subset of the Actors) and `APIFY_MCP_URL` (full endpoint override).

## Tests

Tests use an in-process mock server, with no network and no token. They fail if `APIFY_TOKEN` is set.

```bash
cd python && pip install -e ".[test]"
env -u APIFY_TOKEN python -m pytest
```

`python scripts/build_tools.py --check` compares the bundled `tools.json` with each Actor's live public input schema and exits 1 on any mismatch.
