preview-reader-mcp
v1.2.0
Published
MCP server for Claude Code & Claude Desktop to read, edit, and manage Preview Reader documents
Maintainers
Readme
preview-reader-mcp
MCP server for Claude Code and Claude Desktop. Lets the assistant read, edit, and manage documents on a Preview Reader portal via the same REST API used by the web UI.
- Transport: stdio (Claude Code / Claude Desktop spawns this as a subprocess)
- Auth: Bearer API token (generate at
<server>/settings → API Tokens) - License: MIT
Install
npx preview-reader-mcp setup # Claude Code (auto-register via `claude mcp add`)
npx preview-reader-mcp setup --desktop # Claude Desktop (write claude_desktop_config.json)
npx preview-reader-mcp setup --desktop --dry-run # preview the JSON without writingThe wizard prompts for:
- Server URL — e.g.
https://docs.sielay.cloud - API token — issued by the portal under Settings → API Tokens
It validates the token against /api/auth/me, then either runs claude mcp add ... (Claude Code) or writes the appropriate JSON into the Claude Desktop config (per-platform, see below).
Claude Desktop config location
| Platform | Path |
| --- | --- |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
If a config file already exists, the wizard writes a .bak copy alongside it before merging — so existing mcpServers entries are preserved.
Manual config (Claude Desktop)
If you prefer to edit the file by hand, add this entry under mcpServers:
{
"mcpServers": {
"preview-reader": {
"command": "npx",
"args": ["-y", "preview-reader-mcp"],
"env": {
"PREVIEW_READER_URL": "https://docs.sielay.cloud",
"PREVIEW_READER_TOKEN": "pr_xxx_xxx"
}
}
}
}Then restart Claude Desktop.
Env vars
| Variable | Required | Default | Notes |
| --- | --- | --- | --- |
| PREVIEW_READER_URL | yes | http://localhost:3457 | No trailing slash. |
| PREVIEW_READER_TOKEN | yes | — | Bearer token. Get one at <server>/settings → API Tokens. |
Tools (11)
Read-only:
preview_list_projects— list projects you can accesspreview_list_files— list files/folders within a project (optional subpath)preview_read_file— fetch raw content of a.mdor.txtfilepreview_search— full-text search across accessible projects
Write:
preview_upload_file— upload a new.md/.txt(optional folder)preview_upload_html— upload a self-contained HTML artifact (spec/review/design/report/playground); returns a shareable viewer URLpreview_edit_file— overwrite an existing.md/.txtpreview_move_file— move a file/folder within or across projectspreview_rename_file— rename a file/folderpreview_delete_file— delete a file/folder (recursive)preview_create_folder— create a subfolder
Versions
- 1.2.0 —
setup --desktopflag for Claude Desktop config, JSON merge with backup,--dry-runpreview. - 1.1.0 —
preview_upload_htmltool for HTML artifacts. - 1.0.x — initial 10-tool stdio server.
Issues & feedback
Open an issue at https://github.com/emiliovt3/preview-reader/issues.
