DEV Community

Cover image for Deploy a Website from Claude to Hugging Face Spaces Using MCP
AIRabbit
AIRabbit

Posted on

Deploy a Website from Claude to Hugging Face Spaces Using MCP

I've written extensively in the past about MCP and Claude, and how powerful their combination can be. With MCP, you can let Claude perform almost every task you normally do on your computer by setting up an MCP server—for example, browsing the web, generating images, checking your email, and much more.

In this post, I'll show you how to use the same technology to publish a website—created during a conversation with Claude—directly to Hugging Face static HTML Spaces.

By the end of this tutorial, you'll have a public URL for the new website you built with Claude. Best of all, it’s free, and you can manage version control using git on Hugging Face. There’s a lot more you can do, but we’ll keep it simple.


How It Works in Three Steps

  • Create a Hugging Face Write Token: This token lets you create a static space where your website (essentially HTML) will be hosted.
  • Set Up an MCP Server: This server takes your HTML, generates the website content (HTML, CSS, etc.), and publishes it to your HF space.
  • Generate HTML with Claude: Let Claude create HTML for you, then use MCP to publish the website.

Step 1: Create a Hugging Face Write Token

Visit the following link to create your write token:

[https://huggingface.co/settings/account]

>> Read more in my Blog Post

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay