Monorepo for Aesthetic.Computer aesthetic.computer
at main 267 lines 6.0 kB view raw view rendered
1# @aesthetic.computer/mcp 2 3[![npm version](https://badge.fury.io/js/@aesthetic.computer%2Fmcp.svg)](https://www.npmjs.com/package/@aesthetic.computer/mcp) 4[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 5 6MCP (Model Context Protocol) server for [aesthetic.computer](https://aesthetic.computer) - enabling AI assistants to create and publish creative coding pieces. 7 8## What is this? 9 10This MCP server allows AI assistants like **Claude**, **ChatGPT**, and other MCP-compatible tools to: 11-**Publish JavaScript pieces** to aesthetic.computer 12- 🎨 **Create and share KidLisp art** (a Lisp-based creative coding language) 13- 🎵 **Compose clock melodies** with pronounceable short codes 14- 📚 **Access API documentation** programmatically 15- 🚀 **Get starter templates** and references 16- 🔄 **Content deduplication** - same code returns same URL 17- 🌐 **Anonymous publishing** - no account required 18 19## Installation 20 21### NPM Global Install 22 23```bash 24npm install -g @aesthetic.computer/mcp 25``` 26 27### NPX (No Install - Recommended) 28 29```bash 30npx @aesthetic.computer/mcp 31``` 32 33No installation required! The `-y` flag in MCP configs will automatically download and run the latest version. 34 35## Configuration 36 37### Claude Desktop 38 39Add to your `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows): 40 41```json 42{ 43 "mcpServers": { 44 "aesthetic-computer": { 45 "command": "npx", 46 "args": ["-y", "@aesthetic-computer/mcp"], 47 "env": { 48 "AC_TOKEN": "your-auth0-bearer-token-here" 49 } 50 } 51 } 52} 53``` 54 55### Claude Code (VS Code Extension) 56 57Add to your `.vscode/mcp.json` or `~/.claude/mcp.json`: 58 59```json 60{ 61 "mcpServers": { 62 "aesthetic-computer": { 63 "command": "npx", 64 "args": ["-y", "@aesthetic-computer/mcp"], 65 "env": { 66 "AC_TOKEN": "your-auth0-bearer-token-here" 67 } 68 } 69 } 70} 71``` 72 73### Cursor 74 75Add to your Cursor MCP settings: 76 77```json 78{ 79 "mcpServers": { 80 "aesthetic-computer": { 81 "command": "npx", 82 "args": ["-y", "@aesthetic-computer/mcp"] 83 } 84 } 85} 86``` 87 88### ChatGPT Developer Mode 89 90ChatGPT now supports MCP servers! Add to your ChatGPT configuration: 91 92```json 93{ 94 "mcpServers": { 95 "aesthetic-computer": { 96 "command": "npx", 97 "args": ["-y", "@aesthetic.computer/mcp"] 98 } 99 } 100} 101``` 102 103See [ChatGPT Developer Mode docs](https://platform.openai.com/docs/guides/developer-mode) for setup instructions. 104 105### Authentication (Optional) 106 107The `AC_TOKEN` environment variable is **optional**. If not provided: 108- All publishing is **anonymous** (guest mode) 109- Pieces are still publicly accessible 110- To associate pieces with your account, provide a Bearer token from aesthetic.computer 111 112## Available Tools 113 114### `publish_piece` 115 116Publish a JavaScript piece to aesthetic.computer. 117 118**Input:** 119```json 120{ 121 "source": "export function boot($) { ... }\nexport function paint($) { ... }", 122 "name": "my-piece" 123} 124``` 125 126**Output:** 127```json 128{ 129 "code": "drift", 130 "url": "https://aesthetic.computer/drift", 131 "cached": false 132} 133``` 134 135### `publish_kidlisp` 136 137Publish KidLisp code. 138 139**Input:** 140```json 141{ 142 "source": "(wipe blue)\n(ink yellow)\n(circle (/ w 2) (/ h 2) 100)" 143} 144``` 145 146**Output:** 147```json 148{ 149 "code": "xyz789", 150 "url": "https://aesthetic.computer/xyz789", 151 "cached": false 152} 153``` 154 155### `publish_clock` 156 157Publish a clock melody. 158 159**Input:** 160```json 161{ 162 "source": "c4 e4 g4 c5 g4 e4 c4" 163} 164``` 165 166**Output:** 167```json 168{ 169 "code": "bako", 170 "url": "https://aesthetic.computer/clock~bako", 171 "cached": false 172} 173``` 174 175### `get_api_info` 176 177Fetch the full API documentation. 178 179## Available Resources 180 181### `aesthetic-computer://piece-template` 182 183Returns a starter template for a new aesthetic.computer piece with all lifecycle functions (boot, paint, sim, act). 184 185### `aesthetic-computer://kidlisp-reference` 186 187Quick reference guide for KidLisp syntax and common functions. 188 189## Available Prompts 190 191### `create-piece` 192 193A guided prompt for creating an aesthetic.computer piece. 194 195**Arguments:** 196- `name` (required): Name of the piece 197- `description` (required): What the piece should do 198 199## Why Use This? 200 201- **🎨 Creative Coding Made Easy**: Let AI assistants write aesthetic.computer pieces for you 202- **⚡ Instant Publishing**: Go from idea to live URL in seconds 203- **🔗 Shareable URLs**: Every piece gets a clean, shareable link 204- **🆓 No Account Required**: Anonymous publishing works out of the box 205- **♻️ Smart Deduplication**: Identical code returns the same URL 206- **🌍 Open Platform**: All pieces are publicly accessible 207 208## Example Conversations 209 210Once configured, you can ask your AI assistant: 211 212### JavaScript Pieces 213> "Create a piece that draws a bouncing ball" 214> 215> "Make an interactive drawing canvas where I can paint with my mouse" 216> 217> "Build a particle system that responds to sound" 218 219### KidLisp Art 220> "Make a KidLisp piece with a yellow circle on a blue background" 221> 222> "Create generative art using KidLisp with random shapes" 223 224### Clock Melodies 225> "Publish a clock melody using the C major scale" 226> 227> "Compose a pentatonic melody for the clock" 228 229### Learning & Templates 230> "Show me the piece template" 231> 232> "What functions can I use in KidLisp?" 233 234The AI will use the MCP tools to create and publish pieces automatically, returning live URLs you can visit immediately! 235 236## Development 237 238```bash 239# Clone the repo 240git clone https://github.com/whistlegraph/aesthetic-computer 241cd aesthetic-computer/mcp-server 242 243# Install dependencies 244npm install 245 246# Build 247npm run build 248 249# Test locally 250node dist/index.js 251``` 252 253## Links 254 255- 🌐 [aesthetic.computer](https://aesthetic.computer) 256- 📖 [API Documentation](https://aesthetic.computer/api) 257- 🎨 [KidLisp Documentation](https://kidlisp.com) 258- 📝 [Write a Piece Guide](https://github.com/whistlegraph/aesthetic-computer/blob/main/WRITE-A-PIECE.md) 259- 🔧 [MCP Specification](https://modelcontextprotocol.io) 260 261## License 262 263MIT 264 265## Author 266 267Jeffrey Alan Scudder