MCP-Artisan
Click on "Deploy 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: PatchWarden
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 deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that provides safeguard capabilities to protect against prompt injection and unsafe tool calls.740 PyPI9MIT
- AlicenseBqualityAmaintenanceA local MCP server that provides a safe plan-and-execute workflow for AI coding assistants, storing plans and tasks, and executing agent commands with an allow-list for security.7133 npm5MIT
- FlicenseNot gradedqualityBmaintenanceA sandboxed MCP server for agents that provides file read/edit, code intelligence, search, allowlisted command execution, package lookups, persistent memory, and VPS channel clients, all confined to C:\Work.-
- AlicenseNot gradedqualityCmaintenanceA secure MCP server that exposes local filesystem operations to AI clients with sandboxed access and runtime directory changes.1MIT