MCP-Artisan
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-Artisansave this HTML as a card in my-cards folder"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Artisan v2.0.0
A secure Model Context Protocol (MCP) tool with workspace sandbox for AI Agents to find prompts, save HTML, and render HTML to images.
🚨 Breaking Changes in v2.0.0
This is a major version update with breaking changes. All API parameters have been redesigned for enhanced security and usability.
Key Changes:
Workspace Sandbox: All operations are now restricted to a specified workspace directory
Simplified APIs: Removed complex path parameters, added intelligent file discovery
Enhanced Security: Built-in path validation prevents directory traversal attacks
Smart Organization: Automatic file organization in
output/subdirectories
Related MCP server: shemcp
Installation & Usage
# Install and run with workspace
npx mcp-artisan /path/to/your/workspace
# Example
npx mcp-artisan ./my-projectRequired: You must specify a workspace directory when starting the server.
Configuration for AI Environments (Cursor, etc.)
To use MCP-Artisan with AI development environments like Cursor, you need to configure the MCP server command.
Install MCP-Artisan globally or within your project:
# Global installation npm install -g mcp-artisan # Or local project installation npm install mcp-artisanIn your environment's MCP server settings (e.g., in
.cursor-agent/mcp.jsonor a similar configuration file), set up the server command as follows:Command:
npxArguments:
["mcp-artisan", "/path/to/your/project/workspace"]
Replace
/path/to/your/project/workspacewith the absolute path to the folder you want the AI to work in. This folder will be used to find prompts and save output files.Example Configuration (
.cursor-agent/mcp.json):{ "mcpServers": { "my-artisan-tool": { "command": "npx", "args": [ "-y", "mcp-artisan", "/Users/username/my-ai-project" ] } } }
New API Reference
listPrompts
Lists available prompt files automatically.
Parameters: None
Behavior: Searches in
workspace/prompts/first, falls back to workspace rootReturns: Array of prompt filenames
getPromptContent
Reads prompt file content by filename.
Parameters:
promptFileName(string): Just the filename, no path needed
Behavior: Automatically searches in prompts directory and workspace root
saveHtml
Saves HTML with automatic organization.
Parameters:
htmlContent(string): Complete HTML contentsubfolderName(string, max 20 chars): Descriptive folder namefileName(string): Filename without .html extension
Output: Saves to
workspace/output/{subfolderName}/{fileName}.html
renderImageFromHtml
Renders HTML to image using relative paths.
Parameters:
htmlPath(string): Relative path from workspace (e.g., "output/my-card/index.html")imageType(optional): 'png' or 'jpeg'
Output: Image saved alongside HTML file
Migration from v1.x
v1.x Parameter | v2.x Parameter | Notes |
| (removed) | Auto-discovery in workspace |
|
| Just filename, no path |
|
| Auto-organized in output/ |
|
| Relative to workspace |
Security Features
Workspace Sandbox: All file operations restricted to workspace
Path Validation: Prevents directory traversal (../) attacks
Input Sanitization: Validates filenames and folder names
Symlink Protection: Resolves real paths to prevent escapes
Example Workflow
# Start server with workspace
npx mcp-artisan ./my-project
# Directory structure will be:
# my-project/
# ├── prompts/ # Your prompt files
# │ ├── card.txt
# │ └── banner.md
# └── output/ # Generated files
# └── my-cards/ # Organized by subfolder
# ├── card.html
# └── card.pngDevelopment
# Clone and install
git clone <repo>
cd mcp-artisan
npm install
# Build
npm run build
# Development with workspace
npm run dev -- ./test-workspaceLicense
MIT
Contributing
Issues and pull requests are welcome. Please ensure all tests pass before submitting. ```
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cnzhihao/mcp-artisan'
If you have feedback or need assistance with the MCP directory API, please join our Discord server