hf-eda-mcp / docs /deployment /QUICKSTART.md
KhalilGuetari's picture
Deployment on hf spaces
5aaaef8
|
raw
history blame
2.67 kB

Quick Start Guide

Get hf-eda-mcp running in minutes!

Choose Your Deployment Method

πŸš€ Option 1: Local Development (Fastest)

# Install dependencies
pdm install

# Set up environment (optional for public datasets)
cp config.example.env .env
# Edit .env and add HF_TOKEN if needed

# Run the server
pdm run hf-eda-mcp

Server runs at: http://localhost:7860


🐳 Option 2: Docker (Recommended for Production)

# Build the image
docker build -t hf-eda-mcp:latest .

# Run the container
docker run -d \
  --name hf-eda-mcp-server \
  -p 7860:7860 \
  -e HF_TOKEN=your_token_here \
  hf-eda-mcp:latest

Or use Docker Compose:

# Create .env file with HF_TOKEN
echo "HF_TOKEN=your_token_here" > .env

# Start the service
docker-compose up -d

Server runs at: http://localhost:7860


☁️ Option 3: HuggingFace Spaces (Easiest for Sharing)

  1. Create a new Gradio Space on HuggingFace
  2. Copy files from spaces/ directory to your Space
  3. Set HF_TOKEN as a secret in Space settings (if needed)
  4. Push to deploy

Your server will be at: https://YOUR-USERNAME-hf-eda-mcp.hf.space


Connect an MCP Client

Kiro IDE

Add to .kiro/settings/mcp.json:

{
  "mcpServers": {
    "hf-eda-mcp": {
      "command": "pdm",
      "args": ["run", "hf-eda-mcp"],
      "disabled": false
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "hf-eda-mcp": {
      "command": "python",
      "args": ["-m", "hf_eda_mcp"],
      "env": {
        "PYTHONPATH": "/path/to/hf-eda-mcp/src"
      }
    }
  }
}

Test the Server

Using the Web Interface

  1. Open http://localhost:7860 in your browser
  2. Try the tools with a sample dataset like "squad"

Using an MCP Client

Ask your AI assistant:

"Get metadata for the squad dataset"
"Show me 5 samples from the train split of squad"
"Analyze the features of the squad dataset"

Common Issues

Server won't start?

  • Check Python version: python --version (need 3.13+)
  • Install dependencies: pdm install

Can't access private datasets?

Port 7860 already in use?

  • Change port: GRADIO_SERVER_PORT=8080 pdm run hf-eda-mcp

Next Steps


Need Help?

  • Check logs: docker logs hf-eda-mcp-server (Docker)
  • Review documentation in docs/
  • Open an issue on GitHub