Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-26 08:44:43 +02:00
README.md 🎛 HF Spaces MCP — list, status, logs, restart edit 2026-06-26 08:44:43 +02:00
server.py 🎛 HF Spaces MCP — list, status, logs, restart edit 2026-06-26 08:44:43 +02:00

HF Spaces MCP Server

Manage HuggingFace Spaces via Model Context Protocol. Works with Claude, Codex, Whale, OpenCode.

Install

pip install mcp requests

Configure

Add to your MCP client config:

{
  "mcpServers": {
    "hf-spaces": {
      "command": "python",
      "args": ["/path/to/hf-spaces-mcp/server.py"],
      "env": { "HF_TOKEN": "${HF_TOKEN}" }
    }
  }
}

Tools

Tool Description
spaces_list List your Spaces
space_status Check build/runtime status
space_logs Get container logs
space_restart Restart a Space
space_edit Edit + push a file

Usage

"Check the status of my headroom-eval Space"
→ space_status: PeetPedro/headroom-eval

"Edit app.py in my Space to fix the import"
→ space_edit: space=PeetPedro/headroom-eval, path=app.py, content=...

"Show me recent logs"
→ space_logs: space=PeetPedro/headroom-eval, lines=30