Visual Loop MCP Server
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., "@Visual Loop MCP ServerCreate a simple web page with a red square and take a screenshot"
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.
π Quick Start β’ π Documentation β’ π§ Configuration β’ π€ Claude Desktop β’ π‘ API Reference
β¨ Why Visual Loop?
Most AI coding assistants can write code β but they can't see the result. Visual Loop MCP closes that gap by providing a single tool that:
Think of it asgiving your AI eyes β it can now verify layouts, catch visual bugs, and iterate on designs without human intervention.
Related MCP server: Netmind Code Interpreter
ποΈ Architecture
ββββββββββββββββββββββββββββββββ
β AI Client β
β (Claude Desktop / Cursor) β
ββββββββββββββββ¬ββββββββββββββββ
β
stdio (JSON-RPC 2.0)
β
ββββββββββββββββΌββββββββββββββββ
β Visual Loop MCP Server β
β β
β βββββββββββββββββββββββββ β
β β Phase A: Execute β β ββββββββββββββββββββ
β β Code Validation βββββΌβββββΆβ Judge0/Codebox β
β β β β β (Sandboxed API) β
β βββββββββββββββββββββββββ β ββββββββββββββββββββ
β β
β βββββββββββββββββββββββββ β
β β Phase B: Render β β ββββββββββββββββββββ
β β Visual Screenshot βββββΌβββββΆβ Playwright β
β β β β β (Headless Chrome) β
β βββββββββββββββββββββββββ β ββββββββββββββββββββ
β β
β βββββββββββββββββββββββββ β
β β Phase C: Cleanup β β Temp files removed
β β Resource Disposal β β Browser closed
β βββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββgraph LR
A[π€ AI Client] -->|stdio JSON-RPC| B[π Visual Loop MCP]
B -->|POST /submissions| C[β‘ Judge0 Codebox]
B -->|file:// render| D[π Playwright]
C -->|stdout / stderr| B
D -->|base64 PNG| B
B -->|multimodal response| A
style A fill:#6C63FF,stroke:#4F46E5,color:#fff,stroke-width:2px
style B fill:#A855F7,stroke:#9333EA,color:#fff,stroke-width:2px
style C fill:#F59E0B,stroke:#D97706,color:#fff,stroke-width:2px
style D fill:#10B981,stroke:#059669,color:#fff,stroke-width:2pxπ¦ Prerequisites
Requirement | Version | Purpose |
| Runtime environment | |
| Package management | |
Any | Judge0 container hosting |
π Quick Start
1οΈβ£ Start the Judge0 Sandbox
# Pull and run Judge0 CE in Docker
docker run -d -p 2358:2358 --name judge0 judge0/judge0-ce2οΈβ£ Install & Build
# Clone the repository
git clone https://github.com/IqbalHere/-Visual-Loop-MCP-Server.git
cd -Visual-Loop-MCP-Server
# Install dependencies
npm install
# Install Playwright Chromium (minimal footprint)
npx playwright install chromium
# Build the TypeScript project
npm run build3οΈβ£ Run the Server
CODEBOX_URL=http://localhost:2358 CODEBOX_TOKEN=your_token npm start$env:CODEBOX_URL = "http://localhost:2358"
$env:CODEBOX_TOKEN = "your_token"
npm startπ§ Configuration
Variable | Required | Description |
| β | Base URL of your Judge0/Codebox instance |
| β | Auth token for the Codebox API (omit if no auth) |
IfCODEBOX_URL is unset, the server gracefully skips code execution and only performs visual rendering. No crash, no fuss.
π€ Claude Desktop Integration
Add this to your Claude Desktop configuration file:
Platform | Config Path |
macOS |
|
Windows |
|
{
"mcpServers": {
"visual-loop": {
"command": "node",
"args": ["C:/absolute/path/to/visual-loop-mcp/build/index.js"],
"env": {
"CODEBOX_URL": "http://localhost:2358",
"CODEBOX_TOKEN": "your_token_here" // optional
}
}
}
}Replace the path inargs with the absolute path to your cloned project. Use forward slashes (/) even on Windows.
After saving, restart Claude Desktop. The execute_and_render tool will appear in the tool picker. π
π‘ Tool Reference
execute_and_render
The single, powerful tool exposed by this server.
AI writes code β Codebox validates logic β Playwright renders visuals β AI sees the resultParameters
Parameter | Type | Required | Default | Description |
|
| β | β | Raw HTML/CSS/JS source code to execute and render |
|
| β | β | Judge0 language ID (see table below) |
|
| β |
| Browser viewport width in pixels |
|
| β |
| Browser viewport height in pixels |
Response Format
The tool returns a multimodal MCP content array containing both text and image:
{
"content": [
{
"type": "text",
"text": "[Codebox] Status: Accepted (id: 3)\nββ stdout ββ\nHello, world!\n\nExecution time: 0.012s | Memory: 3456 KB"
},
{
"type": "image",
"data": "<base64-encoded-PNG-screenshot>",
"mimeType": "image/png"
}
]
}ποΈ Supported Languages
Language | ID | Language | ID |
π¨ JavaScript (Node.js) |
| π Python 3 |
|
π· TypeScript |
| β Java |
|
βοΈ C++ (GCC) |
| π Ruby |
|
πΉ Go |
| π HTML/CSS |
|
For a complete list of 60+ supported languages, query your Judge0 instance:GET /languages
π‘οΈ Error Handling
The server is engineered to never crash from tool-level errors. Every failure is caught and returned gracefully:
Scenario | Behavior |
π Codebox timeout / network error | Error details in text response; screenshot still attempted |
π₯οΈ Playwright crash | Codebox results returned with rendering error note |
π₯ Both fail | Descriptive error text returned; no image block |
β οΈ Missing | Codebox phase skipped with warning; rendering proceeds |
π§° Development
# Build and run in one step
npm run dev
# Watch mode with tsx (great for iterating)
npx tsx watch src/index.tsProject Structure
visual-loop-mcp/
βββ π src/
β βββ index.ts # Main server β Codebox + Playwright + MCP
βββ π build/ # Compiled JavaScript output
βββ π¦ package.json # Dependencies & scripts
βββ βοΈ tsconfig.json # TypeScript configuration
βββ π README.md # You are here!π οΈ Tech Stack
Technology | Role |
Core language with strict type safety | |
Model Context Protocol server framework | |
Headless browser automation & screenshots | |
Sandboxed multi-language code execution | |
HTTP client for Codebox API | |
Runtime schema validation |
π€ Contributing
Contributions are welcome! Here's how to get started:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
π License
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by Iqbal
β Star this repo if you found it useful! β
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Flicense-qualityDmaintenanceEnables execution of code in a sandbox environment with integrated web search capabilities. Provides a basic framework for running code safely, primarily designed for AI agents and research applications.Last updated13
- Alicense-qualityDmaintenanceEnables secure cloud-based execution of code across 14+ programming languages within a sandboxed environment. It supports file management, standard input/output handling, and automatic generation of visual artifacts like plots and charts.Last updatedMIT
- Flicense-qualityCmaintenanceEnables AI assistants to execute browser automation, perform QA tasks, and generate test code through natural language commands using Playwright.Last updated5
- Alicense-qualityDmaintenanceEnables AI coding agents to visually interact with frontend apps by taking screenshots, clicking elements, reading console logs, and performing visual diffs.Last updated3MIT
Related MCP Connectors
Generate images, GIFs, and PDFs from HTML, URLs, or templates β from your AI agent.
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
Browser-backed QA with evidence and fix-ready reports for coding agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/IqbalHere/Visual-Loop-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server