Skip to main content

styledex-mcp

Thin MCP server for managing the StyleDex design library at ~/.styledex/designs.

The server owns aliases, curated Playwright capture, metadata, artifact writes, validation summaries, rename, list, and delete. It does not expose generic browser controls; it only captures the StyleDex evidence types agents need.

Install

Install the MCP server:

uv tool install styledex-mcp

Install the Playwright browser used for captures:

uvx --from styledex-mcp playwright install chromium

If styledex-mcp is not found after installation, add uv's tool directory to your shell path:

uv tool update-shell

Restart your shell after updating the path.

Upgrade later with:

uv tool upgrade styledex-mcp

Uninstall with:

uv tool uninstall styledex-mcp

MCP Config

Use the installed styledex-mcp executable in your MCP client config.

{
  "mcpServers": {
    "styledex": {
      "command": "styledex-mcp"
    }
  }
}

For opencode:

{
  "mcp": {
    "styledex": {
      "type": "local",
      "command": ["styledex-mcp"],
      "enabled": true
    }
  }
}

Restart your MCP client after changing MCP config.

styledex-mcp uses stdio transport. Running it directly in a terminal is only useful for smoke testing; it waits for an MCP client on stdin.

Environment

  • STYLEDEX_ROOT: optional override for the design library root. Defaults to ~/.styledex/designs.
  • Legacy fallback: when STYLEDEX_ROOT is unset, ~/.styledex/designs does not exist, and the old Style Mirror root exists, StyleDex reads STYLE_MIRROR_ROOT or ~/.style-mirror/designs so existing captures remain available after the rename.

Tools

  • styledex_list
  • styledex_get
  • styledex_create
  • styledex_capture_screenshot
  • styledex_capture_snapshot
  • styledex_capture_extract
  • styledex_save
  • styledex_rename
  • styledex_delete

styledex_create supports mode="overwrite".

styledex_delete permanently removes an alias directory.

Capture Contract

styledex_create
styledex_capture_screenshot
styledex_capture_snapshot
styledex_capture_extract
styledex_save

styledex_get and styledex_save include a validation summary, so there is no separate public validation tool.

styledex_capture_extract supports links, cssVariables, and computedStyles.

styledex_save accepts profile artifacts plus explicit metadata fields: status, confidence, caveats, and observedNoise. The MCP updates protected metadata fields such as alias, createdAt, lastUpdated, and files itself.

Artifact Layout

Each saved site is isolated by alias under ~/.styledex/designs/<alias>/. Screenshots for one alias are never shared with another alias.

Use artifact-type directories inside each alias:

  • Screenshots: screenshots/
  • Structured evidence: evidence/

Seed screenshots use the paths returned by styledex_create in suggestedScreenshotPaths, such as screenshots/desktop-fold.png.

Supporting page screenshots should also stay under the same alias-level screenshots/ directory. Use the returned suggestedPageScreenshotPaths patterns, for example:

  • screenshots/pricing-desktop-full.png
  • screenshots/pricing-mobile-full.png

Do not put screenshots under evidence/. Page-specific JSON evidence can use paths such as evidence/pages/pricing/computed-styles.json.

Development Setup

python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m playwright install chromium

Run validation:

.venv/bin/python -m pytest
.venv/bin/python -m mypy

Verify the package installs as a persistent tool:

uv tool install .
uv tool list

Metadata

Release files for styledex-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for styledex-mcp 0.1.0
File Size Uploaded Provenance Actions
styledex_mcp-0.1.0.tar.gz 15.5 kB Without provenance Details for styledex_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for styledex-mcp 0.1.0
File Interpreter ABI Platform Actions
styledex_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for styledex_mcp-0.1.0-py3-none-any.whl

Total release size: 28.4 kB

Release files / styledex_mcp-0.1.0.tar.gz

Download URL styledex_mcp-0.1.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e04aa731ddc8a4dde8861d2d24e53fcef964dc1d68d7ff3d17e2c73bc5b4bb0a
BLAKE2b-256 checksum
How to use checksums
2f38e1ae8175cb3a0357e8b7027cc1dadb93df46d33f4c91b9626c4fc3a4a759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / styledex_mcp-0.1.0-py3-none-any.whl

Download URL styledex_mcp-0.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e36910402b5d34900c4651554486e2a925c9f781f700c251a229bde3b32aeac
BLAKE2b-256 checksum
How to use checksums
89578a4ec8f80fab5ac4c281defcf8982eb4042e65f053ebdcfa246a9424375e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for styledex-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page