dchub-mcp-helper
Drop-in HTTP retry middleware for AI agents talking to DC Hub's data center intelligence API at https://dchub.cloud.
DC Hub's REST + MCP gates auto-mint working trial keys on every gated
request and deliver them via standard HTTP headers (X-Trial-Key).
This package handles the retry-with-key dance so your code never has to
care about 402 responses.
Install
pip install dchub-mcp-helper
Use
import httpx
from dchub_mcp_helper import DCHubTrialAuth
client = httpx.Client(auth=DCHubTrialAuth())
resp = client.get("https://dchub.cloud/api/v1/transactions/export.csv")
# → first call returns 402 with X-Trial-Key header
# → auth handler reads it, retries with X-API-Key
# → second call returns 200 with the CSV
# → all later calls in this session use the same key (no 402)
Optional: persist the trial key across processes (CLI tools):
auth = DCHubTrialAuth(cache_path="~/.dchub-trial-key", verbose=True)
What you DON'T need
- No browser flow
- No email verification
- No OAuth dance
- No card on file
- No webhook callback
Trial keys are 200 calls/day, 30-day expiry. Make permanent by POSTing
to /api/v1/keys/auto-trial/redeem with {api_key, email}.
What DC Hub offers
- Global data center facility map (corroborated count pending), 170+ countries
- DCPI scores for 300+ markets (BUILD / CAUTION / AVOID verdicts)
- Real-time grid intelligence across 7+ ISOs
- M&A transactions database
- Capacity pipeline (550+ active projects)
- Tax incentives by state
- Fiber carrier coverage
- 92 MCP tools
Full integration manifest: https://dchub.cloud/.well-known/ai-agents.json
Plans and pricing
Current plans, call limits and prices: https://dchub.cloud/pricing. Anonymous and free-key calls work without payment; a $10 one-time pack adds 1,000 API credits.
License
MIT. © DC Hub.
Source
https://github.com/azmartone67/dchub-backend/tree/main/docs/mcp-helper-pkg
Publish path (for maintainers)
cd docs/mcp-helper-pkg
python3 -m build # creates dist/*.whl and dist/*.tar.gz
python3 -m twine upload dist/* # publishes to PyPI
Requires pip install build twine and a PyPI account with the
dchub-mcp-helper namespace.
Metadata
Release files for dchub-mcp-helper 0.1.2
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 | |
|---|---|---|---|---|
| dchub_mcp_helper-0.1.2.tar.gz | 5.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dchub_mcp_helper-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / dchub_mcp_helper-0.1.2.tar.gz
| Download URL | dchub_mcp_helper-0.1.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd4e720b1322c0b997190d3060114400bfef97785dc566286155054200396c89
|
|
BLAKE2b-256 checksum How to use checksums |
5e6f9bdf55dbc80bdae1de3b88e3ac8ef6345b53d7771379105af4aa83af70f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / dchub_mcp_helper-0.1.2-py3-none-any.whl
| Download URL | dchub_mcp_helper-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab8f0564305bf7f8784dc3164aa2beea85b3b1944e8ac095bd83472f9705c3c7
|
|
BLAKE2b-256 checksum How to use checksums |
db42b049cf1e43b6f22a911f45f5e3f984ae66f17608bd1208a6a3aac86e64c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for dchub-mcp-helper 0.1.2
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.