{"_id":"@edwiser/moodle-playground-mcp","name":"@edwiser/moodle-playground-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@edwiser/moodle-playground-mcp","version":"0.1.0","description":"MCP server for controlling Moodle Playground from AI agents","type":"module","bin":{"moodle-playground-mcp":"bin/mcp-server.js"},"main":"src/index.js","exports":{".":"./src/index.js"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","open":"^10.1.0","ws":"^8.18.0"},"keywords":["moodle","playground","mcp","ai","agent","wasm"],"license":"MIT","_id":"@edwiser/moodle-playground-mcp@0.1.0","gitHead":"32983fb0654ee879c9e6c7033272adeec065ade1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-WrM9un7RwRYD2Ile4ZfU3evhBFAoEUcVAtEL/+gxLA5u35cIhXpA1wKAzHoGaL581G7/+SkrbaIMfOoH29xM0Q==","shasum":"c591a67b83fc1276411ec51b7b5e855a9d9d2598","tarball":"https://registry.npmjs.org/@edwiser/moodle-playground-mcp/-/moodle-playground-mcp-0.1.0.tgz","fileCount":12,"unpackedSize":28132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDuQx28nCwIz3KLAaf+Uwr/4y7dkY9rV5BlQvT8ETWpVQIhAJ0xq1bO8VaGJ2r2jnV+tSpj0T1GzYD9l3G+94o8x+up"}]},"_npmUser":{"name":"wisdmlabs","email":"software@wisdmlabs.com"},"directories":{},"maintainers":[{"name":"wisdmlabs","email":"software@wisdmlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moodle-playground-mcp_0.1.0_1778167193121_0.8792969685899239"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T15:19:53.044Z","0.1.0":"2026-05-07T15:19:53.255Z","modified":"2026-05-07T15:19:53.458Z"},"maintainers":[{"name":"wisdmlabs","email":"software@wisdmlabs.com"}],"description":"MCP server for controlling Moodle Playground from AI agents","keywords":["moodle","playground","mcp","ai","agent","wasm"],"license":"MIT","readme":"# @edwiser/moodle-playground-mcp\n\nMCP (Model Context Protocol) server for controlling Moodle Playground from AI coding agents like Claude Code, Cursor, and GitHub Copilot.\n\n## How It Works\n\n```\nAI Agent ←→ stdio ←→ MCP Server ←→ WebSocket ←→ Browser Playground\n```\n\nThe MCP server communicates with AI agents over stdio (standard MCP transport) and bridges tool calls to a running Moodle Playground instance in the browser via WebSocket.\n\n## Quick Start\n\n```bash\nnpx @edwiser/moodle-playground-mcp\n```\n\nThis will:\n1. Start the MCP server with WebSocket bridge on port 7999\n2. Open a browser with the playground connected to the server\n3. Begin accepting tool calls from your AI agent\n\n## Configuration\n\n### Claude Code\n\nAdd to `.claude/settings.json` or use the config file:\n\n```json\n{\n  \"mcpServers\": {\n    \"moodle-playground\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@edwiser/moodle-playground-mcp\"]\n    }\n  }\n}\n```\n\nOr copy `config/claude-code.json` to your project's `.claude/settings.json`.\n\n### Claude Desktop\n\nAdd to your Claude Desktop MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"moodle-playground\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@edwiser/moodle-playground-mcp\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"moodle-playground\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@edwiser/moodle-playground-mcp\"]\n    }\n  }\n}\n```\n\n## CLI Options\n\n```\nUsage: moodle-playground-mcp [options]\n\nOptions:\n  --port <number>         WebSocket bridge port (default: 7999)\n  --playground-url <url>  Custom playground URL\n  --no-open               Don't auto-open browser\n  --help                  Show help\n```\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `moodle/navigate` | Navigate to a Moodle URL path |\n| `moodle/runPhp` | Execute PHP code in the runtime |\n| `moodle/readFile` | Read a file from MEMFS |\n| `moodle/writeFile` | Write a file to MEMFS |\n| `moodle/listFiles` | List directory contents |\n| `moodle/mkdir` | Create a directory |\n| `moodle/deleteFile` | Delete a file |\n| `moodle/deleteDirectory` | Delete a directory |\n| `moodle/fileExists` | Check file/directory existence |\n| `moodle/getSiteInfo` | Get Moodle site metadata |\n| `moodle/getCurrentUrl` | Get current page URL |\n| `moodle/getWebsiteUrl` | Get playground base URL |\n| `moodle/resetSite` | Reset to fresh install |\n| `moodle/exportSite` | Export state as ZIP |\n| `moodle/saveSite` | Save state (alias for export) |\n| `moodle/importSite` | Import state from ZIP |\n| `moodle/setConfig` | Set Moodle config value |\n| `moodle/installPlugin` | Install plugin from ZIP URL |\n| `moodle/applyBlueprint` | Apply blueprint JSON |\n| `moodle/getBlueprint` | Get active blueprint |\n| `moodle/listSites` | List active instances |\n\n## Security\n\n- WebSocket connections require a token (generated at startup)\n- The server only listens on `localhost`\n- Tokens are single-use per session\n\n## Protocol\n\nThis server implements MCP protocol version `2024-11-05`.\n","readmeFilename":"README.md","_rev":"1-05444e0cdbd6cca2edaddbdec83bbe55"}