StatBridge
Official statistics, ready to use. Verified access to ISTAT, Eurostat, OECD and ECB through a hosted REST API, with the local MCP toolkit included in this repo.
What's in this repo
| Directory | What it does |
|---|---|
sdk/ |
Python SDK — thin API client (pip install statbridge), just httpx |
statbridge/ |
Core library — SDMX client, topic registry, 4 verified source adapters |
mcp_server/ |
FastMCP server — 9 tools: search, browse, describe, coverage, get data, chart, map |
api/ |
FastAPI service — runs on the VPS behind Cloudflare Tunnel |
web/ |
Next.js 14 app — marketing site, dashboard, docs, auth |
agents/ |
Shared repo-local agent instructions |
db/ |
Postgres schema for accounts, API keys, and usage events |
docs/ |
API and MCP reference docs |
CHART_GUIDELINES.md |
StatBridge standards for choosing and formatting charts |
CHART_RENDERER_CHECKLIST.md |
Short operational checklist used by the chart tool |
tests/ |
Unit tests (98 passing) |
Product
| Plan | Price | Volume |
|---|---|---|
| Starter | €9/mo | 500 req/mo |
| Pro | €29/mo | 5,000 req/mo |
Every plan gets the same API, same response format, same source metadata. The hosted product is the REST API. The local MCP server and Python toolkit remain available in this repo for advanced workflows.
Production stack
- Compute: Ubuntu VPS (statbridge-vps)
- Edge / TLS: Cloudflare Tunnel (no Nginx needed)
- Web app: Next.js 14 via
next starton port 3000 - API app: FastAPI via Uvicorn on port 8000
- Database: Local PostgreSQL
- Auth: NextAuth (Google OAuth)
- Billing: Stripe
- Object storage: Cloudflare R2 (optional, for exports/media)
- DNS: Cloudflare
User → Cloudflare Tunnel
├─ statbridge.net → Next.js (port 3000)
├─ api.statbridge.net → FastAPI (port 8000)
└─ catch-all → 404
Both services run as systemd units. See DEPLOYMENT.md for the full setup.
Verified sources
| Source | Status | Coverage |
|---|---|---|
| ISTAT | Live | Italy — regional labour, agriculture, daily life |
| Eurostat | Live | EU-wide economic + social |
| OECD | Live | International |
| ECB | Live | Eurozone — rates, monetary |
| IMF, ILO, BIS, World Bank | Planned | — |
25 live topics today.
Python SDK
The recommended way to use StatBridge from Python. One dependency (httpx), no heavy SDMX stack.
pip install statbridge
from statbridge_sdk import StatBridge
sb = StatBridge() # reads STATBRIDGE_API_KEY from env
sb.search("gdp")
sb.get("unemployment_rate", REF_AREA="IT")
sb.topics()
sb.dimensions("inflation")
sb.health()
Core library (advanced)
For local SDMX access without the hosted API (used internally by the MCP server):
pip install -e ".[dev]"
import statbridge
df = statbridge.get("unemployment_rate")
statbridge.search("gdp")
statbridge.subject_areas()
statbridge.browse(subject_area="labour")
statbridge.describe("inflation")
statbridge.coverage()
Available topics
unemployment_rate · employment_rate · gdp_growth · inflation · population · life_expectancy · government_debt · trade_balance · interest_rates · house_prices · education_expenditure · co2_emissions · gini_coefficient · poverty_rate · neet_rate · housing_cost_overburden · energy_import_dependency · labour_productivity_growth · tourism_nights_per_capita · health_expenditure · tax_revenue · average_annual_wages · median_household_income · foreign_born_population
MCP server
pip install mcp-server-statbridge
Add to Claude Desktop, VS Code, Cursor, or any MCP client:
{
"mcpServers": {
"statbridge": {
"command": "uvx",
"args": ["mcp-server-statbridge"]
}
}
}
Tools: list_sources · list_subject_areas · search_data · browse_topics · describe_topic · coverage_report · get_data · create_chart · create_map
Local development
Next.js (web/)
cd web
cp .env.example .env.local # fill in keys
npm install && npm run dev
FastAPI (api/)
cd api
cp .env.example .env
pip install -r requirements.txt
uvicorn main:app --reload
Tests
# Unit (no network)
python -m pytest tests/unit/ -v
# Integration (requires network)
python -m pytest tests/integration/ -m integration -v
# Coverage report
python -m statbridge.verification
Roadmap
- IMF, ILO, World Bank, BIS source adapters
- R2-backed chart export endpoint (
/v1/chart→ PNG URL) - R2-backed map export endpoint (
/v1/map→ PNG URL) - Team plan (shared usage pool, multiple seats)
Metadata
Release files for mcp-server-statbridge 0.1.0
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 | Actions |
|---|---|---|---|---|
| mcp_server_statbridge-0.1.0.tar.gz | 33.7 kB | Without provenance | Details for mcp_server_statbridge-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_server_statbridge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_server_statbridge-0.1.0-py3-none-any.whl |
Total release size: 74.4 kB
Release files / mcp_server_statbridge-0.1.0.tar.gz
| Download URL | mcp_server_statbridge-0.1.0.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70efc367b74d032e74784ba14ab3f630e08c689bb05a31af424b125f3ce4e3d8
|
|
BLAKE2b-256 checksum How to use checksums |
adbbb0ea795f29f03916faf536a6eae8f52e37702e56247010c41cb6772c9fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / mcp_server_statbridge-0.1.0-py3-none-any.whl
| Download URL | mcp_server_statbridge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
501fa19cc7bc8d91c762c3447614245635961dadca2b39cb53c4a7868542bcf7
|
|
BLAKE2b-256 checksum How to use checksums |
47bd63f8b63835f9875001c36eb5bb8068abe934890fdb3622a9aa34d0eb7df9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for mcp-server-statbridge 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.