Skip to content

Add MCP server for rendering Panel apps in LLM chat clients#31

Merged
MarcSkovMadsen merged 1 commit intomainfrom
feature/mcp-server
Mar 1, 2026
Merged

Add MCP server for rendering Panel apps in LLM chat clients#31
MarcSkovMadsen merged 1 commit intomainfrom
feature/mcp-server

Conversation

@MarcSkovMadsen
Copy link
Contributor

Adds a standalone MCP (Model Context Protocol) server so any MCP-compatible client (VS Code Copilot Chat, Claude Desktop) can render interactive Panel apps directly in the chat via Pyodide.

New files:

  • src/panel_live/mcp.py: FastMCP server with show_panel_live tool
  • src/panel_live/templates/show.html: MCP App HTML template with ext-apps SDK
  • tests/test_mcp.py: 7 tests (CLI, tool payload, resource, no-panel-import)
  • docs/tutorials/getting-started-mcp.md: Getting started tutorial
  • docs/how-to/mcp-integration.md: Transport options, troubleshooting, security

Modified files:

  • cli.py: Added mcp subcommand and --version flag
  • pyproject.toml: Added [mcp] optional dependency (fastmcp>=3.0,<4)
  • pixi.toml: Added mcp feature, environment, and tasks
  • zensical.toml: Added MCP docs to navigation

Also fixes bidirectional sync bug in worker-bridge.js where sliders stopped responding after the first change: added _applyingPythonPatch echo suppression flag and try/catch safety net in _handleIdle patch creation.

Adds a standalone MCP (Model Context Protocol) server so any MCP-compatible
client (VS Code Copilot Chat, Claude Desktop) can render interactive Panel
apps directly in the chat via Pyodide.

New files:
- src/panel_live/mcp.py: FastMCP server with show_panel_live tool
- src/panel_live/templates/show.html: MCP App HTML template with ext-apps SDK
- tests/test_mcp.py: 7 tests (CLI, tool payload, resource, no-panel-import)
- docs/tutorials/getting-started-mcp.md: Getting started tutorial
- docs/how-to/mcp-integration.md: Transport options, troubleshooting, security

Modified files:
- cli.py: Added `mcp` subcommand and `--version` flag
- pyproject.toml: Added `[mcp]` optional dependency (fastmcp>=3.0,<4)
- pixi.toml: Added mcp feature, environment, and tasks
- zensical.toml: Added MCP docs to navigation

Also fixes bidirectional sync bug in worker-bridge.js where sliders stopped
responding after the first change: added _applyingPythonPatch echo suppression
flag and try/catch safety net in _handleIdle patch creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MarcSkovMadsen MarcSkovMadsen merged commit 2030780 into main Mar 1, 2026
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant