@mymagicpencil/mcp-server
v1.0.6
Published
Model Context Protocol (MCP) Server for My Magic Pencil
Readme
@mymagicpencil/mcp-server
A Model Context Protocol (MCP) server that gives AI assistants the ability to generate live visual lessons using the My Magic Pencil API. Works with Claude Desktop, Cursor, and any MCP-compatible client.
Installation
Run directly with npx
MYMAGICPENCIL_API_KEY=your_key npx @mymagicpencil/mcp-serverInstall globally
npm install -g @mymagicpencil/mcp-serverThen run:
MYMAGICPENCIL_API_KEY=your_key mymagicpencil-mcpConfiguration
Environment Variables
| Variable | Required | Description |
|---|---|---|
| MYMAGICPENCIL_API_KEY | Yes | Your API key from mymagicpencil.com |
Claude Desktop
Add this to your Claude Desktop config file (claude_desktop_config.json):
{
"mcpServers": {
"mymagicpencil": {
"command": "npx",
"args": ["@mymagicpencil/mcp-server"],
"env": {
"MYMAGICPENCIL_API_KEY": "your_api_key_here"
}
}
}
}Available Tools
generate_visual_lesson
Generates a live visual lesson (drawing + voice) from a text prompt.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | The topic or concept to explain visually |
| language | string | No | "en" | Language code (e.g., en, es, hi) |
| theme | string | No | "dark" | Visual theme: dark or light |
| voice_enabled | boolean | No | true | Whether to include TTS voice output |
| voice_tone | number | No | 50 | Voice tone from 0 to 100 |
| output_type | string | No | "embed" | Output format: embed (live HTML) or mp4 (video file) |
| drawing_style | string | No | "default" | Drawing style: default, sketch, blueprint, or neon |
| thinking_level | string | No | "low" | Level of AI reasoning: low, medium, or high |
| age_group | string | No | "adult" | Target age group: child, teen, or adult |
Response
Returns a session ID, embed URL, and prompts cost. The embed URL can be presented in an iframe for the user to view the visual explanation.
Development
npm install
npm run build
npm startLicense
MIT
