You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: MCP Server Mode (Headless + Tool Exposure) #274
Thank you for the detailed feature request! Adding an MCP server mode is an interesting idea that aligns with the v0.2 direction of exposing Open CoDesign's agentic tools programmatically.
What we've verified from the codebase:
The current architecture uses pi-agent-core and pi-ai as the agent runtime (packages/core depends on @mariozechner/pi-agent-core and @mariozechner/pi-ai). Per CLAUDE.md / AGENTS.md hard constraint feat(exporters): real PDF/PPTX/ZIP via system Chrome + pptxgenjs + zip-lib (lazy-loaded) #7, we should reuse pi primitives where possible. This means any MCP server should ideally delegate tool execution to pi's existing built-in tools and Open CoDesign's design tools (ask, scaffold, preview, gen_image, tweaks, todos, done) rather than duplicating logic.
The project doesn't currently have a headless or CLI server entry point – apps/desktop is an Electron app, and there's no existing --mcp-server flag. This would be a new addition, likely as a separate entry point or package.
The proposed tools (generate_design, update_component, export_html, export_react) map roughly to existing design tools, but the exact mapping would need design.
A few questions to help scope the implementation:
Transport: Would you expect stdio (as implied by the uvx config example) or HTTP/SSE? Both are valid MCP transports.
Tool set: Should the MCP server expose the full set of design tools (including ask, scaffold, preview, gen_image, tweaks, todos, done) or a curated subset focused on generation/export?
Session model: MCP clients typically expect stateless or lightweight session management. Should each MCP invocation create a new design session (pi session) or should the server maintain a persistent session?
Packaging: Should this live as a new CLI entry point in apps/desktop (enabled via flag) or as a separate package (e.g., packages/mcp-server) that can be installed independently?
We're happy to review a concrete design or prototype if you'd like to contribute further. Thanks again for the thoughtful proposal!
Activity
github-actions commentedon May 2, 2026
Thank you for the detailed feature request! Adding an MCP server mode is an interesting idea that aligns with the v0.2 direction of exposing Open CoDesign's agentic tools programmatically.
What we've verified from the codebase:
pi-agent-coreandpi-aias the agent runtime (packages/coredepends on@mariozechner/pi-agent-coreand@mariozechner/pi-ai). PerCLAUDE.md/AGENTS.mdhard constraint feat(exporters): real PDF/PPTX/ZIP via system Chrome + pptxgenjs + zip-lib (lazy-loaded) #7, we should reuse pi primitives where possible. This means any MCP server should ideally delegate tool execution to pi's existing built-in tools and Open CoDesign's design tools (ask,scaffold,preview,gen_image,tweaks,todos,done) rather than duplicating logic.apps/desktopis an Electron app, and there's no existing--mcp-serverflag. This would be a new addition, likely as a separate entry point or package.generate_design,update_component,export_html,export_react) map roughly to existing design tools, but the exact mapping would need design.A few questions to help scope the implementation:
uvxconfig example) or HTTP/SSE? Both are valid MCP transports.ask,scaffold,preview,gen_image,tweaks,todos,done) or a curated subset focused on generation/export?apps/desktop(enabled via flag) or as a separate package (e.g.,packages/mcp-server) that can be installed independently?We're happy to review a concrete design or prototype if you'd like to contribute further. Thanks again for the thoughtful proposal!
Open-CoDesign Bot
feat: add agent-native CLI and background UI sessions (#510)