This project is a Model Context Protocol (MCP) server that gives AI agents (like Claude, Cursor, or your own chat bot) the ability to:
- 🎨 Generate Images: Create AI images using Pollinations.ai (Free!).
- 💾 Create Websites: Save HTML/CSS/JS files directly to your computer.
Run the following command to install the necessary dependencies:
npm installThe Inspector allows you to test the tools manually without needing an AI client yet. It's like a control panel for your server.
npm run server:inspectThis will open a URL (usually http://localhost:5173) in your browser.
Generates an image from a text description and saves it to websites/assets/.
- prompt: Describe the image (e.g., "A futuristic city with flying cars").
- filename: The name of the file (e.g., "city.jpg").
Saves text content (HTML, CSS, Code) to a file in the websites/ folder.
- filename: The name of the file (e.g., "index.html").
- content: The actual code or text.
Goal: Create a simple webpage with a generated image.
- Start the Inspector (
npm run server:inspect) and open the link in your browser. - Generate an Image:
- Go to Tools > generate-image.
- prompt: "A cute robot waving hello, 3d render"
- filename: "robot.jpg"
- Click Run.
- Create the Webpage:
- Go to Tools > save-file.
- filename: "index.html"
- content:
<html> <body> <h1>Hello from MCP!</h1> <img src="assets/robot.jpg" width="400" /> </body> </html>
- Click Run.
- View Result:
- Open the
websitesfolder on your desktop. - Double-click
index.html. You should see your page with the robot image!
- Open the
src/server.ts: The main code for the MCP server and tools.websites/: The folder where generated files and images are saved.package.json: Project configuration and scripts.