--- title: DataPass Server emoji: 🎫 colorFrom: indigo colorTo: purple sdk: docker app_file: Dockerfile pinned: false --- # DataPass MCP Server **Your pass to private datasets.** This is the MCP (Model Context Protocol) server that powers DataPass. It handles: - Token validation for dataset access - SQL and natural language query execution via DuckDB - Stripe payment integration - Subscription ledger management ## MCP Endpoint Connect your MCP client (Claude Desktop, Cursor, etc.) to: ``` sse: https://your-space.hf.space/sse ``` ## Available MCP Tools ### Public Tools - `get_dataset_catalog` - Browse available datasets ### Authenticated Tools (require DataPass token) - `get_my_datasets` - View your subscribed datasets - `query_dataset` - Run SQL queries on datasets - `query_dataset_natural_language` - Ask questions in plain English - `get_dataset_sample` - Preview dataset structure ## Configuration This Space requires the following **Secrets** (Settings → Variables and secrets): | Secret | Description | |--------|-------------| | `HF_TOKEN` | HF token with write access to ledger dataset | | `ADMIN_API_SECRET` | Shared secret for admin API authentication | | `LEDGER_DATASET_ID` | Dataset ID for subscription ledger (e.g., `username/datapass-ledger`) | | `STRIPE_SECRET_KEY` | Stripe API key for payments | | `STRIPE_WEBHOOK_SECRET` | Stripe webhook signing secret | | `FRONTEND_URL` | URL to DataPass frontend (for landing page redirect) | ## Security Model - Dataset files never leave Hugging Face - Every request validates the DataPass token - Query results are capped (no `SELECT *` dumps) - Access automatically expires after subscription period