A Quick Note on "Magic Spells": In software engineering, the reusable blocks of text in this guide are called structured prompt templates (or context-priming instructions)—specifically designed to configure the AI's behavior, project parameters, and MCP tool orchestration. Because copying and pasting these exact phrases summons complex automated setups behind the scenes, we will playfully refer to them as "Magic Spells" throughout the rest of this tutorial.

Phase 1: Getting Started

1 Subscribe to "Claude Pro"

Visit https://claude.ai/upgrade, or go to https://claude.ai/, sign in, and choose the Pro plan.

2 Install the Claude Desktop App

Download the Claude desktop app for Windows from https://claude.ai/download. Install the app, launch it, and sign in with your Claude account. You will work in the app's Code tab (</>).

3 Configure Claude Permissions

Open Settings > Code, scroll to Local development, and turn on Allow bypass permissions mode.

Claude Settings, Code section, with Allow bypass permissions mode turned on
Turn on Allow bypass permissions mode under Settings > Code.

Note: Bypass permissions mode lets Claude run commands and edit files without asking you each time. Only use it on your own computer for projects like this one.

Phase 2: The Setup Magic Spell - Install & Upgrade Tools

4 Exit Claude Completely & Restart as Administrator

The Setup Magic Spell installs (or upgrades) the Hearth Portable Web Server as a background Windows Service, which requires Windows Administrator permission.

5 Cast the Setup Magic Spell (2-in-1 Install + Upgrade Prompt)

Claude has two modes at the top of the sidebar: Chat mode (for general conversation) and Code mode (</>, for coding and working with local files). Switch to Code mode - we will be using Code mode throughout this tutorial, as Bypass permissions is only available in Code mode.

Claude sidebar showing the Chat mode and Code mode toggle with Code mode highlighted
Switch to Code mode (</>) at the top of the sidebar.

Start a New session in Code mode. Select Sonnet 5.5 (Low) as your model, and set the permission mode to Bypass permissions.

Claude Code input bar with Sonnet 5.5 Low selected and Bypass permissions mode highlighted
Confirm Sonnet 5.5 (Low) is selected and ensure Bypass permissions mode is active.

Choosing a model: Sonnet 5.5 (Low) is recommended as your everyday default. It gives strong, reliable results for everyday coding while keeping token usage and quota consumption efficient. If you want extra capability for especially complex tasks, you can switch to Claude Opus.

Copy and paste The Setup Magic Spell below into the chat box. You can run this exact same prompt on Day 1 for a brand-new PC, and run it again anytime in the future to upgrade your tools to the latest release without wiping your existing websites or saved FTP accounts:

The Setup Magic Spell - Install & Upgrade Environment
Perform a 2-in-1 fresh installation or safe version upgrade of my AI web development environment:

1. Check, Download & Upgrade Tools in C:\tools\:
Check the latest GitHub release version against any existing local installation for each tool below (install if missing, upgrade if a newer release exists, or skip download if already on the latest version):
- Hearth Portable Web Server (choose the zip with "Bundled-PHP-Python-NodeJS" in its name; ships with both HearthPortableWebServer.Manager.exe and mcp-webserver.exe):
  https://github.com/ASP-NET-Web-Forms-Club/Hearth-ASPNET-Server/releases/latest -> C:\tools\hearth-web-server\
- MCP-Browser:
  https://github.com/adriancs2/MCP-Browser/releases/latest -> C:\tools\mcp-browser\
- MCP-SQLite:
  https://github.com/adriancs2/MCP-SQLite/releases/latest -> C:\tools\mcp-sqlite\
- MCP-FTP:
  https://github.com/adriancs2/MCP-FTP/releases/latest -> C:\tools\mcp-ftp\

Upgrade safety rules:
- Before extracting an update to Hearth, back up C:\tools\hearth-web-server\manager_sites.json if it exists, stop HearthManagerService if running so files are not locked, extract the update, and restore my backed-up manager_sites.json. If this is a brand-new install with no prior user sites, initialize manager_sites.json as an empty JSON array [] (do NOT create any sample or default websites yet).
- When upgrading MCP-FTP, preserve the existing C:\tools\mcp-ftp\profiles\ folder so saved FTP accounts and encrypted passwords are never overwritten.
- Ensure the root folder C:\www\ exists (leave it empty if new; do not create any website yet).

2. Verify & Configure Bundled Runtimes in User PATH:
Test whether python, pip, and node work from any directory via python --version, pip --version, and node --version (ignore the Microsoft Store WindowsApps stub). For each one that does not work, add the bundled Hearth runtime path to the User PATH environment variable (skip any that already work):
- C:\tools\hearth-web-server\runtimes\python
- C:\tools\hearth-web-server\runtimes\python\Scripts
- C:\tools\hearth-web-server\runtimes\node

3. Verify & Install All 4 MCP Servers in Claude Desktop:
Locate my Claude Desktop config file at %USERPROFILE%\AppData\Local\Claude-Data\claude_pzs8sxrjxfjjc\claude_desktop_config.json (older/standard installs: %APPDATA%\Claude\claude_desktop_config.json - find whichever path exists on this computer; create the file if it does not exist). Merge the following entries into "mcpServers" (UTF-8 without BOM, preserving any other existing settings and MCP servers):
- "mcp-webserver": command "C:\\tools\\hearth-web-server\\mcp-webserver.exe", args []
- "mcp-browser": command "C:\\tools\\mcp-browser\\MCP-Browser.exe", args []
- "mcp-sqlite": command "C:\\tools\\mcp-sqlite\\MCP-SQLite.exe", args []
- "mcp-ftp": command "C:\\tools\\mcp-ftp\\mcp-ftp.exe", args []

4. Verify & Install Hearth Windows Service + Desktop Shortcut:
- First check whether this session is already running with Administrator (elevated) privileges:
  * If ALREADY running as Administrator, proceed directly to install/update and start the service without interrupting me.
  * If NOT running as Administrator, pause and explain to me in plain beginner-friendly language BEFORE running the elevated command that a Windows permission window ("User Account Control - Do you want to allow this app to make changes to your device?") will pop up on screen (or blink on the taskbar) and that I should click "Yes" to continue.
- Install (or update) and start the Windows Service "HearthManagerService" with BinaryPathName:
  "C:\tools\hearth-web-server\HearthPortableWebServer.Manager.exe" --service
  and StartupType: Automatic.
- Confirm HearthManagerService status is Running.
- Create a shortcut on the Desktop named "Hearth Server Manager" pointing to C:\tools\hearth-web-server\HearthPortableWebServer.Manager.exe.
- Report a clear summary of installed/upgraded versions and service status. Do NOT create any website yet.

6 Restart Claude Normally & Verify All 4 MCP Tools

Once The Setup Magic Spell completes, exit Claude from the system tray (right-click the Claude tray icon > Exit) and reopen Claude normally. Administrator permission is no longer needed for everyday web development!

Switch to Code mode (</>), start a New session, and enter this quick verification check:

Verification Prompt
Are you able to see mcp-webserver, mcp-browser, mcp-sqlite, and mcp-ftp?
Phase 3: Begin Your Web Development Project

7 Begin Your Web Development Project (The 3 Project Magic Spells)

There are 3 main magic spells (prompts) involved in building and publishing your web projects:

First Spell: The Tech Stack

Tells the AI to use our specific technology, system architecture, and engineering patterns (provided below).

2nd Spell: Your Project Info

Tells the AI your project name, optional FTP hosting details, and optional local project folder.

3rd Spell: Upload to Web Server

Publishes and syncs your website files to your live web server whenever you are ready.

Explanation in a Nutshell

Important: The First Spell (Tech Stack) and the 2nd Spell (Your Project Info) are cast together in the same prompt!

First Spell: The Magic Spell for the Tech Stack

Magic Spell - Tech Stack
This is a specially arranged combination of local tech stack and tools designed to work in orchestration with you for developing and deploying web applications. Follow these standards throughout this conversation:

Core Web Tech Stack:
php, sqlite (high concurrency: wal mode, sync normal, temp=ram, foreign key off, busy time 10s, transaction BEGIN IMMEDIATE), universal OS font Segoe UI, icon=local host font awesome. Sqlite db auto-created inside /App_Data/ (use "local.db" on localhost/127.0.0.1 and "prod.db" on live server; auto-generate .htaccess & web.config in /App_Data/ to deny public download). Save all code and config files as standard UTF-8 without BOM.
Auto-upgrade the SQLite schema on startup: track the schema version with PRAGMA user_version and apply only the new changes in order (new tables, new columns, indexes), so an existing prod.db on the live server is upgraded without losing data. Never require deleting the database.
Local runtimes: python, pip, and node.js are already installed and available in user PATH for running scripts or custom tasks.
Code structure: keep files modular and under ~600 lines each (split by logical responsibility: shared DB/layout, page views, API endpoints, CSS, and JS, without over-fragmenting). Place page-specific CSS in /assets/css/<page>.css and static JavaScript in /assets/js/<page>.js (loaded with ?v=<?= filemtime(...) ?> using the filesystem path for cache busting) instead of inlining large <style> or <script> blocks in .php files. If JS needs initial PHP values, pass only a tiny JSON config object inline (e.g., window.APP_CONFIG) or fetch via API.

Orchestrated MCP Tools:
- mcp-webserver: Responsible for hosting local live development (Hearth Portable Web Server) and managing multi-project profiles. Each project uses the Project Name (<name>) mapped to local folder C:\www\<name> (unless a custom Project Folder is specified) and an auto-assigned localhost port.
- mcp-browser: Specialized AI-controlled browser capable of screenshots, console checks, and custom JavaScript execution for debugging and diagnosis. Always test and verify every feature you build or update in mcp-browser before finishing.
- mcp-sqlite: Convenient tool to inspect and work directly with the SQLite database (/App_Data/local.db).
- mcp-ftp: Convenient tool for cPanel / shared hosting FTP operations and automation with multi-profile support (note: mcp-ftp tools and C:\tools\mcp-ftp\profiles\*\ftp_config.json use snake_case keys: profile_name, host, port, security_mode, username, local_folder, remote_folder, website_url; never expose password_protected). Keep profile_name identical to the Project Name (<name>), mapped to local_folder, with exclude rules protecting App_Data/local.db and dynamic user content folders (such as uploads/). Never ask for FTP passwords in chat - call ftp_create_profile (with show_ui: true and snake_case fields profile, local_folder, host, port, security_mode, username, remote_folder, website_url, excludes) to open mcp-ftp's local dialog pre-filled so I can enter the password safely.

Project Safety Guardrails (Mandatory Step-0 Pre-Flight Audit Before Touching Any Files):
1. Always Inspect All 3 Sources First: Before creating folders, registering profiles, or writing/modifying any code, ALWAYS inspect mcp-webserver (webserver_list_sites: snake_case keys name, port, url, status, root), mcp-ftp (ftp_list_profiles and C:\tools\mcp-ftp\profiles\*\ftp_config.json: snake_case keys profile_name, host, port, security_mode, username, local_folder, remote_folder, website_url), and the existing folders inside C:\www\.
2. When Starting a NEW Project:
   - Check for BOTH exact collisions AND ambiguous/similar lookalike names (e.g., spaces vs. hyphens like "stock inventory" vs "stock-inventory", case differences, or partial matches) across mcp-webserver sites (name / root), C:\www\ folders, and mcp-ftp profiles (profile_name / local_folder).
   - If FTP details are provided, also check whether another existing mcp-ftp profile already targets the same host / remote_folder / website_url, or if the target local_folder already contains files.
   - If ANY exact match, lookalike ambiguity, non-empty folder, or duplicate FTP target is found: STOP immediately, show me what already exists, and ask for my explicit confirmation before doing anything.
3. When CONTINUING an Existing Project:
   - Verify that the specified Project Name / Folder actually exists. If no exact match exists (for example, a typo or space/hyphen difference like "stock inventory" vs "stock-inventory"), NEVER silently create a new empty folder! Instead, STOP, list the closest existing project(s) found on this PC, and ask me to confirm which one I meant.
   - Verify 3-way alignment: confirm that the local project folder, the mcp-webserver site root, and the matching mcp-ftp profile's local_folder all point to the exact same directory (warn me immediately if any of them mismatch).
4. Upload / Sync Confirmation Gate:
   - Whenever I say "Upload the files to web server" or "sync the files to the web server" (or ask to deploy/upload), inspect the project's mcp-ftp profile first (profile_name, local_folder, website_url, remote_folder, and host), display a clear pre-flight summary (Project Name, Local Folder, Target Live Website URL / FTP Host), and wait for my "Yes" before running ftp_sync. On a brand-new project's very first sync, list remote files first and warn me if another website already exists in that remote_folder.

To Begin:
- Run the Mandatory Step-0 Pre-Flight Audit above first!
- If I ALREADY provided my Project Info below and every pre-flight check passes cleanly with zero ambiguity: set up or load the project in mcp-webserver (and open the pre-filled mcp-ftp dialog if FTP info is supplied and not yet saved), then proceed with my build/update request (or ask what to build if no requirements were included yet).
- If I have NOT provided a Project Name yet: do not write code yet - display any existing projects found in a numbered list (Project Name, Local Folder, Localhost URL, Status, and Live Website URL) and guide me to pick one or provide a new Project Name, optional FTP info, and what I want to build.
- Occasionally remind me where I can view this web project full-screen by copying its local URL (e.g., http://localhost:8090) into a web browser (Chrome, Firefox, Edge, etc.).

Tip: The Claude desktop app also has its own built-in browser panel beside the chat. By default, our Tech Stack uses mcp-browser for automated visual testing and console checks, or you can switch to Claude's built-in browser anytime by asking it to test using the built-in browser instead.

2nd Spell: Examples of Your Project Info

Option A: Basic Minimum (Local Development Only)

Project Info - Basic Minimum
Project Info:
- Project Name: stock inventory

Notice above that no FTP information is supplied. FTP is only required when you want to upload files to your live online web server. You can obtain your FTP details anytime from your web hosting administration panel (such as cPanel Linux shared hosting).

Option B: Full (Local Development + Online Upload)

Project Info - With FTP Info
Project Info:
- Project Name: stock inventory
- Website: https://www.example.com
- FTP Host: ftp.example.com
- FTP Port: 21
- FTP Security: Explicit FTPS
- FTP Username: example@example.com

By default, the AI automatically creates and saves your project files inside C:\www\{project-name}. In this example, your project folder will be:

C:\www\stock inventory\

Or you can also manually specify a custom project folder:

Option C: Full + Specify Custom Project Folder

Project Info - Full + Custom Folder
Project Info:
- Project Name: stock inventory
- Website: https://www.example.com
- Project Folder: C:\www\stock inventory\
- FTP Host: ftp.example.com
- FTP Port: 21
- FTP Security: Explicit FTPS
- FTP Username: example@example.com

When you include FTP info (Option B or Option C), the AI agent will automatically pop up the secure local dialog window below pre-filled with your details, leaving you to simply fill in your FTP Password, click Test Connection, and click Save Profile:

MCP-FTP Create Profile dialog showing fields for Profile Name, FTP Host, Port and Security, FTP Username, FTP Password, Local Folder, Remote Folder, Website URL, and Exclude Rules
Fill in your FTP Password in the popup dialog, click Test Connection, and click Save Profile.

8 Recap: Combining Both Spells & Building Your Application

Whenever you want to start a new project or continue a project in a "New session" (in Code mode), paste both magic spells together at the start of the session:

To Start a New Project:

Start a New Project Template
I want to start a new project.
{paste magic spell - tech stack}
{paste project info}

Project Requirements:
{paste project requirements}

To Continue a Project in a "New session":

Continue an Existing Project Template
I want to continue a project.
{paste magic spell - tech stack}
{paste project info}

Project Requirements:
{paste project requirements}

After casting the magic spells above, simply tell Claude what website or application you want to build or update!

Examples of Starting a New Project

Personal Blog

Example - Start Personal Blog
Project Requirements:
I want to build a personal blog. It should have a homepage listing recent posts, individual post pages, and a simple about page. I'd like to write posts in Markdown, and the design should be clean and mobile-friendly. Add sample data.

Coffee Shop Billing System

Example - Start Coffee Shop Billing System
Project Requirements:
Build a coffee shop billing system. Staff should be able to pick menu items, set quantities, apply a discount, and generate a printable receipt with tax. It should also keep a daily record of sales. Add sample data.

Stock Inventory System

Example - Start Stock Inventory System
Project Requirements:
I need a stock inventory system. It should track items with quantities and prices, let me record stock coming in and going out, and warn me when an item runs low. A simple search and a summary of current stock would be helpful too. Add sample data.

Examples of Continuing a Project in a New Session

Personal Blog

Example - Continue Personal Blog
Project Requirements:
I'm continuing work on my personal blog. The basic pages and Markdown posts already work. Now I'd like to add tags and categories, a search bar, and an RSS feed. Please review the existing code first and keep the current style. Add sample data.

Coffee Shop Billing System

Example - Continue Coffee Shop Billing System
Project Requirements:
I'm continuing my coffee shop billing system, which already handles orders and receipts. Next I'd like to add a sales report (daily and weekly totals), a best-sellers list, and an option for staff to edit menu items and prices. Please build on the existing code. Add sample data.

Stock Inventory System

Example - Continue Stock Inventory System
Project Requirements:
I'm continuing my stock inventory system, which already tracks items and stock movements. Next I'd like to add supplier details, a reorder list generated from low-stock items, and CSV export of the inventory. Please check the existing structure before making changes. Add sample data.

Tip for continuation prompts: Because your Project Info gives Claude your exact project name and folder (C:\www\{project-name}), Claude reads your existing project files directly from disk. If you ever reference external files outside your project folder, let Claude know their file paths so it never has to guess the current state.


What Is Happening Behind the Scenes? (How the AI Manages & Displays Your Projects)

Assuming this is the Project Info that you supply:

Sample Project Info
Project Info:
- Project Name: stock inventory
- Website: https://www.example.com
- FTP Host: ftp.example.com
- FTP Port: 21
- FTP Security: Explicit FTPS
- FTP Username: example@example.com

In summary, here is what the AI automatically does behind the scenes:

How to View Your Web Project in Your Browser

Each project is assigned its own unique local port number so you can test multiple websites on your computer without conflicts. At any time, you can ask the AI: "What is the local port number of this web project?"

For example, if your project's local port number is 8090, open your favorite web browser (Chrome, Firefox, Edge, etc.) and enter the URL directly in the address bar for a full-screen view:

Local Browser Address Example
http://localhost:8090
Phase 4: Deploying, Backups & Session Management

9 Upload & Deploy to the Internet (3rd Magic Spell)

When you feel it is time to deploy/publish your work to the internet, you can simply say:

Upload to Web Server
Upload the files to web server

or:

Sync to Web Server
sync the files to the web server

Why is App_Data/local.db excluded automatically? Your computer uses local.db for safe testing, while your live web server automatically maintains its own real customer database (prod.db). Excluding local.db ensures uploading code updates will never overwrite your live data!

Download and Backup the Whole Site

When downloading or backing up your whole site, supply the destination folder path where you want to save the backup. It is strongly recommended NOT to save backups inside your active project folder - instead, save to a dedicated backup folder such as one of the following:

Example Download / Backup Prompt
Download and backup the whole site to this folder: D:\backups\stock inventory\

10 When to Stay in the Current Session vs. Start a "New session"

Each session has a context length limit, which Claude Code manages automatically behind the scenes. As your default, you can comfortably continue working in the same session thread until you run into one of the situations below.

Knowing when to keep replying in the same session and when to start a New session in Code mode keeps Claude accurate, fast, and gentle on your usage quota.

Stay in the Current Session When

Start a "New session" When

Starting a "New session" never deletes your project! All of your website files and databases stay safely stored in C:\www\<project-name>. Just paste the Tech Stack + Your Project Info spells into a new session in Code mode and pick up right where you left off!