@milaboratories/pl-mcp-server
v14.0.0
Published
MCP server for Platforma Desktop
Downloads
2,155
Readme
Platforma MCP Server
MCP (Model Context Protocol) server that enables AI assistants to interact with the Platforma Desktop App. It exposes tools for project management, block control, UI interaction, screenshot capture, and data queries through the standardized MCP interface.
Capabilities
| Tool group | What it does | | ------------------ | ---------------------------------------------------------------- | | Connection | Connect/disconnect to a running Platforma backend server | | Projects | List, open, and manage projects | | Blocks | Add blocks, read block state, configure inputs/arguments | | UI interaction | Click, type, scroll, and send keyboard events to the desktop app | | Screenshots | Capture window screenshots (full composited or per-WebContents) | | Data query | Query PColumn data and result pool contents | | Logs | Retrieve application logs | | Sandbox | Execute JavaScript in the app's renderer process |
How It Works
The MCP server runs as a worker process inside the Platforma Desktop App (Electron). It communicates with the main process via IPC and exposes tools over the MCP protocol (stdio transport by default, HTTP also supported).
Claude Code ──MCP──▶ pl-mcp-server (worker) ──IPC──▶ Desktop App (main process)
├── Main window
├── Block view
└── ModalsConnecting From Claude Code
Start the Platforma Desktop App and enable MCP — the MCP server feature marked as Alpha for now. To enable it open Settings, scroll down to the bottom, enable checkbox "Enable MCP Server". Then copy MCP Server URL.
Add the MCP server to Claude Code by creating or editing
.claude/settings.json(don't forget to change the MCP URL):{ "mcpServers": { "pl": { "type": "sse", "url": "http://127.0.0.1:4200/<!!CHANGE ME!!>/mcp" } } }Verify the connection — run
/mcpin Claude Code to see theplserver status. All tools will be available asmcp__pl__*.Connect to the backend — use
list_connectionsto see already saved connections. You could easily reuse them. Or callconnect_to_serverdirectly with URL, username and password to create new connection.Open a project — use
open_projectto start working with a specific project.
Connecting From Claude Desktop App (Chat)
Claude Desktop App uses stdio transport, so it cannot connect to the HTTP MCP endpoint directly. Use mcp-remote to bridge the two.
Enable MCP in the Platforma Desktop App — same as step 1 above (Settings -> "Enable MCP Server"). Copy the MCP Server URL.
Edit Claude Desktop config — open
~/Library/Application Support/Claude/claude_desktop_config.jsonand add themcpServersentry:{ "mcpServers": { "platforma": { "command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:4200/<your-session-id>/mcp"] } } }Replace the URL with the actual MCP Server URL from the Platforma Desktop App settings.
Restart Claude Desktop App — the Platforma tools will appear in your chat sessions. Follow the same workflow:
list_connections->connect_to_server->open_project.
Skill
There is a mcp-desktop-testing skill for Claude in ecosystem overlay. Should be found and used automatically if overlay enabled.
Coordinate System
The desktop app uses Electron with potentially multiple WebContents layers. Screenshots are captured in device pixels (2x on Retina displays), while input events use CSS pixels.
To click on an element visible in a screenshot: divide the screenshot pixel coordinates by the device pixel ratio (typically 2 on macOS Retina).
Development
# Build
pnpm --filter @milaboratories/pl-mcp-server build
# Run tests
pnpm --filter @milaboratories/pl-mcp-server test
# Pack for desktop app
pnpm --filter @milaboratories/pl-mcp-server do-pack
# Then reinstall in desktop app
cd ../../platforma-desktop-app && pnpm installAfter changes, rebuild the desktop app's worker package and restart the app to pick up the new server code.
