diff --git a/Index.html b/Index.html new file mode 100644 index 0000000000000000000000000000000000000000..2b4b665b0abe4985b470d46a5b10772e94a4b08f --- /dev/null +++ b/Index.html @@ -0,0 +1,27 @@ + + +
+ +Ce site a Γ©tΓ© dΓ©ployΓ© avec Hugging Face Spaces.
+ + \ No newline at end of file diff --git a/MCP-SERVER.md b/MCP-SERVER.md deleted file mode 100644 index 675acdbb77beeb3bdc3e0b7b49a2e01d39df1b58..0000000000000000000000000000000000000000 --- a/MCP-SERVER.md +++ /dev/null @@ -1,428 +0,0 @@ -# DeepSite MCP Server - -DeepSite is now available as an MCP (Model Context Protocol) server, enabling AI assistants like Claude to create websites directly using natural language. - -## Two Ways to Use DeepSite MCP - -**Quick Comparison:** - -| Feature | Option 1: HTTP Server | Option 2: Local Server | -|---------|----------------------|------------------------| -| **Setup Difficulty** | β Easy (just config) | β οΈ Requires installation | -| **Authentication** | HF Token in config header | HF Token or session cookie in env | -| **Best For** | Most users | Developers, custom modifications | -| **Maintenance** | β Always up-to-date | Need to rebuild for updates | - -**Recommendation:** Use Option 1 (HTTP Server) unless you need to modify the MCP server code. - ---- - -### π Option 1: HTTP Server (Recommended) - -**No installation required!** Use DeepSite's hosted MCP server. - -#### Setup for Claude Desktop - -Add to your Claude Desktop configuration file: - -**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` -**Windows**: `%APPDATA%\Claude\claude_desktop_config.json` - -```json -{ - "mcpServers": { - "deepsite": { - "url": "https://huggingface.co/deepsite/api/mcp", - "transport": { - "type": "sse" - }, - "headers": { - "Authorization": "Bearer hf_your_token_here" - } - } - } -} -``` - -**Getting Your Hugging Face Token:** - -1. Go to https://huggingface.co/settings/tokens -2. Create a new token with `write` access -3. Copy the token -4. Add it to the `Authorization` header in your config (recommended for security) -5. Alternatively, you can pass it as the `hf_token` parameter when using the tool - -**β οΈ Security Recommendation:** Use the `Authorization` header in your config instead of passing the token in chat. This keeps your token secure and out of conversation history. - -#### Example Usage with Claude - -> "Create a portfolio website using DeepSite. Include a hero section, about section, and contact form." - -Claude will automatically: -1. Use the `create_project` tool -2. Authenticate using the token from your config -3. Create the website on Hugging Face Spaces -4. Return the URLs to access your new site - ---- - -### π» Option 2: Local Server - -Run the MCP server locally for more control or offline use. - -> **Note:** Most users should use Option 1 (HTTP Server) instead. Option 2 is only needed if you want to run the MCP server locally or modify its behavior. - -#### Installation - -```bash -cd mcp-server -npm install -npm run build -``` - -#### Setup for Claude Desktop - -**Method A: Using HF Token (Recommended)** - -```json -{ - "mcpServers": { - "deepsite-local": { - "command": "node", - "args": ["/absolute/path/to/deepsite-v3/mcp-server/dist/index.js"], - "env": { - "HF_TOKEN": "hf_your_token_here", - "DEEPSITE_API_URL": "https://huggingface.co/deepsite" - } - } - } -} -``` - -**Method B: Using Session Cookie (Alternative)** - -```json -{ - "mcpServers": { - "deepsite-local": { - "command": "node", - "args": ["/absolute/path/to/deepsite-v3/mcp-server/dist/index.js"], - "env": { - "DEEPSITE_AUTH_COOKIE": "your-session-cookie", - "DEEPSITE_API_URL": "https://huggingface.co/deepsite" - } - } - } -} -``` - -**Getting Your Session Cookie (Method B only):** - -1. Log in to https://huggingface.co/deepsite -2. Open Developer Tools (F12) -3. Go to Application β Cookies -4. Copy the session cookie value -5. Set as `DEEPSITE_AUTH_COOKIE` in the config - ---- - -## Available Tools - -### `create_project` - -Creates a new DeepSite project with HTML/CSS/JS files. - -**Parameters:** - -| Parameter | Type | Required | Description | -|-----------|------|----------|-------------| -| `title` | string | No | Project title (defaults to "DeepSite Project") | -| `pages` | array | Yes | Array of file objects with `path` and `html` | -| `prompt` | string | No | Commit message/description | -| `hf_token` | string | No* | Hugging Face API token (*optional if provided via Authorization header in config) | - -**Page Object:** -```typescript -{ - path: string; // e.g., "index.html", "styles.css", "script.js" - html: string; // File content -} -``` - -**Returns:** -```json -{ - "success": true, - "message": "Project created successfully!", - "projectUrl": "https://huggingface.co/deepsite/username/project-name", - "spaceUrl": "https://huggingface.co/spaces/username/project-name", - "liveUrl": "https://username-project-name.hf.space", - "spaceId": "username/project-name", - "projectId": "space-id", - "files": ["index.html", "styles.css"] -} -``` - ---- - -## Example Prompts for Claude - -### Simple Landing Page -> "Create a modern landing page for my SaaS product using DeepSite. Include a hero section with CTA, features grid, and footer. Use gradient background." - -### Portfolio Website -> "Build a portfolio website with DeepSite. I need: -> - Hero section with my name and photo -> - Projects gallery with 3 sample projects -> - Skills section with tech stack -> - Contact form -> Use dark mode with accent colors." - -### Blog Homepage -> "Create a blog homepage using DeepSite. Include: -> - Header with navigation -> - Featured post section -> - Grid of recent posts (3 cards) -> - Sidebar with categories -> - Footer with social links -> Clean, minimal design." - -### Interactive Dashboard -> "Make an analytics dashboard with DeepSite: -> - Sidebar navigation -> - 4 metric cards at top -> - 2 chart placeholders -> - Data table -> - Modern, professional UI with charts.css" - ---- - -## Direct API Usage - -You can also call the HTTP endpoint directly: - -### Using Authorization Header (Recommended) - -```bash -curl -X POST https://huggingface.co/deepsite/api/mcp \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer hf_your_token_here" \ - -d '{ - "jsonrpc": "2.0", - "id": 1, - "method": "tools/call", - "params": { - "name": "create_project", - "arguments": { - "title": "My Website", - "pages": [ - { - "path": "index.html", - "html": "+ Vibe Coding has never been so easy. +
+