Skip to main content

✨ panel-live-server

CI conda-forge pypi-version python-version

Panel Live Server is a local Panel web server and MCP server that executes Python code snippets and renders the resulting visualizations as live, interactive web pages — enabling humans and AI assistants to display and inspect Python outputs in real time.

panel-live-server showcase

panel-live-server MCP showcase

Features

  • Two interfacespls serve (standalone browser UI) and pls mcp (MCP server for AI assistants)
  • Any visualization library — hvplot · plotly · altair · matplotlib · seaborn · holoviews · bokeh · and more
  • Validate before rendershow runs syntax, security, package, and extension checks before any rendering happens
  • Visual validationscreenshot MCP tool lets the AI inspect the rendered output visually before presenting it, and returns the snippet's stdout plus any browser console errors alongside the image
  • Read a value, skip the pictureevaluate MCP tool runs code in the server environment and returns its text output, so the AI can check a fact without launching a browser
  • Persistent storage — SQLite database with full-text search; every snippet gets its own permanent URL
  • Auto-restart — Panel subprocess is health-monitored and automatically restarted on failure
  • Works everywhere — local, JupyterHub, GitHub Codespaces; URLs externalized automatically

Installation

Install via uv, pip, or pixi — see the Installation guide for full instructions including how to find your pls path.

uv tool install "panel-live-server[pydata]"

Pin your version — this project is in its early stages. Pin to a specific version to avoid unexpected changes: uv tool install "panel-live-server[pydata]==0.1.0a1"

Connect to your AI assistant

Use the absolute path printed by which pls above — not just pls. Full setup instructions for each client: docs → Connect to your MCP client

Client Config location
VS Code .vscode/mcp.json
Cursor ~/.cursor/mcp.json
Claude Desktop claude_desktop_config.json
Claude Code claude mcp add panel-live-server -- /path/to/pls mcp
claude.ai HTTP transport + tunnel — see docs

Usage

$ pls

 Usage: pls [OPTIONS] COMMAND [ARGS]...

 Panel Live Server - Execute and visualize Python code snippets.

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version  -V        Show version and exit.                                                          │
│ --help               Show this message and exit.                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────╮
│ serve   Start the Panel Live Server directly.                                                        │
│ mcp     Start as an MCP server for AI assistants.                                                    │
│ status  Check whether the Panel server is running.                                                   │
│ list    List resources (packages, etc.).                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯

You can also use panel-live-server but pls is shorter and easier to remember.

Security

Panel Live Server executes arbitrary Python. That is its purpose — show, screenshot, and evaluate all run code you or an AI assistant supplied, in the Panel server process, with the full privileges of the user who started it. It can read and write your files and reach the network exactly as any script you ran yourself could.

The validation show performs — syntax, a blocked-import list, ruff's security rules, package availability — is a guardrail, not a sandbox. It catches the plausible mistakes an assistant makes and refuses obviously inappropriate imports. It is not a security boundary and cannot be relied on as one.

So:

  • Run pls only in an environment you would be willing to run arbitrary code in.
  • Don't expose the server's port to an untrusted network. It has no authentication; anyone who can reach /api/snippet or /api/evaluate can execute code in that environment.
  • Treat a shared or production machine as the wrong place for it.

Development

See the Contributing guide for the full setup (fork, install, connect to MCP client, run tests).

❤️ Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/YourFeature.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/YourFeature.
  5. Open a pull request.

Please ensure your code passes all tests and linting before submitting.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panel_live_server-0.4.0.tar.gz (19.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panel_live_server-0.4.0-py3-none-any.whl (109.1 kB view details)

Uploaded Python 3

File details

Details for the file panel_live_server-0.4.0.tar.gz.

File metadata

  • Download URL: panel_live_server-0.4.0.tar.gz
  • Upload date:
  • Size: 19.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for panel_live_server-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0d1d9c2b11f9055d370d05ec268ed5a2641bc1b9b7666b56fd151c6ac4db28a3
MD5 7fdee094344ceb0951c7fe6c24174aad
BLAKE2b-256 2b0bd8b6f747c2dbe1bbefeada940c81da607e0fd0ceb226984644f29aceea30

See more details on using hashes here.

Provenance

The following attestation bundles were made for panel_live_server-0.4.0.tar.gz:

Publisher: build.yml on panel-extensions/panel-live-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file panel_live_server-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for panel_live_server-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc9e13ceb82f4b503d60936fe350ddd4119e118dc052fd97910e7391fd4024b1
MD5 06dc30e2c52bb5a624a849519d767bb3
BLAKE2b-256 6e8584bb1fd665b8cc59a1bdf3cafe79c19fd62ce61c71e06d35d7c97c0290b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for panel_live_server-0.4.0-py3-none-any.whl:

Publisher: build.yml on panel-extensions/panel-live-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page