# Deploy to Hugging Face Spaces This directory is a self-contained Gradio Space. Deploy it as a public or protected Space under the Edge Impulse Hugging Face organization. ## 1. Create the Space In Hugging Face: - Owner: Edge Impulse organization - Space name: `edge-impulse-mcp-demo` - SDK: Gradio - Visibility: public for discoverability, protected if you want the source hidden while keeping the app accessible ## 2. Push These Files Fast path from this workspace: ```powershell $env:HF_TOKEN = "hf_..." .\push-space.ps1 ``` The token needs write access to `eoinedge/hf-space-edge-impulse-mcp`. Manual path: Push the contents of this directory to the Space repository: ```bash cd hf-space-edge-impulse-mcp git init git remote add origin https://huggingface.co/spaces//edge-impulse-mcp-demo git add README.md DEPLOY.md app.py requirements.txt git commit -m "Add Edge Impulse MCP demo Space" git push origin main ``` If the Space repo already exists locally, copy these files into that checkout instead. ## 3. Configure Secrets In the Space settings, add one credential as a Secret: - `EI_API_KEY` - or `EI_JWT_TOKEN` Optional Variables: - `EI_HOST=https://studio.edgeimpulse.com/v1` - `EI_REQUEST_TIMEOUT_SECONDS=20` - `EI_MAX_RESPONSE_CHARS=12000` Use a demo/test Edge Impulse account or project. Do not use production customer data. Users can also paste their own Edge Impulse API key or JWT token into the Space UI. The app uses the pasted credential for the request and does not store it. Point users here for JWT creation: https://docs.edgeimpulse.com/apis/studio/login/get-jwt-token?playground=open For more limited access, tell users to open an Edge Impulse project and create an API key for that specific project. ## 4. Verify After the Space builds: 1. Open the Space UI and run `List Projects`. 2. Confirm the Space shows the Hugging Face `MCP` badge. 3. Add the Space from Hugging Face MCP settings. 4. In an MCP client, ask it to list the tools and call `list_projects`. ## 5. Publish Positioning Recommended copy: > This is a read-only Edge Impulse MCP demo hosted on Hugging Face Spaces. It exposes a curated set of project, deployment target, and job inspection tools for developer discovery. The production Edge Impulse remote MCP connector will use OAuth and per-user credentials.