# Claude Prompt Editor

> Desktop IDE for crafting, validating, and testing Claude API prompts with best-practices linting and Claude Code MCP integration

- **Type:** MCP server
- **Install:** `agentstack add mcp-midwire-claude-prompt-editor`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [midwire](https://agentstack.voostack.com/s/midwire)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [midwire](https://github.com/midwire)
- **Source:** https://github.com/midwire/claude-prompt-editor
- **Website:** https://github.com/midwire/claude-prompt-editor

## Install

```sh
agentstack add mcp-midwire-claude-prompt-editor
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Claude Prompt Editor

A lightweight desktop IDE for crafting, validating, and testing Claude API prompts following [Anthropic's best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices). Built with Tauri 2.0 (Rust + Svelte 5), distributed as a single binary for Linux and Mac.

## Features

**Dual-Mode Editor**
- **Source mode** — Monaco-based text editor with syntax highlighting for XML tags, YAML frontmatter, and `{{variable}}` interpolation
- **Structure mode** — Block-based visual editor where each XML section (role, instructions, examples, etc.) is a collapsible, reorderable card with enable/disable toggles

**Best Practices Linting**
- 10 built-in lint rules detect common prompt issues: missing role definitions, sparse examples, negative framing, over-prompting for Claude 4.6, vague instructions, and more
- Prompt Health panel shows real-time feedback with severity levels and fix suggestions

**Claude Code Integration (MCP)**
- Built-in MCP server (default port 9780) lets Claude Code load prompts directly from the editor
- Tools: `load_prompt`, `list_prompts`, `set_variable`, `get_prompt_health`
- No API key needed — prompts are tested through your existing Claude Code subscription

**Presets & Templates**
- 13 built-in presets (roles, constraints, output formats, example skeletons)
- 9 starter templates (blank and use-case specific: agentic, code assistant, data extraction, classification, research/RAG, conversational)
- Custom preset creation

**Version History**
- Auto-saves versions on every file save
- Visual diff between any two versions
- Restore previous versions, add annotations

## Requirements

- [Rust](https://rustup.rs/) (1.70+)
- [Node.js](https://nodejs.org/) (18+)
- [pnpm](https://pnpm.io/) (9+)
- Linux: `libgtk-3-dev`, `libwebkit2gtk-4.1-dev`, `libcairo2-dev`, `libpango1.0-dev`, `libgdk-pixbuf-2.0-dev`, `librsvg2-dev`
- Mac: Xcode Command Line Tools

## Quick Start

```bash
git clone git@github.com:midwire/claude-prompt-editor.git
cd claude-prompt-editor
pnpm install
pnpm tauri dev
```

The editor opens and the MCP server starts automatically on port 9780.

### Wayland

If you see a blank window or `GBM buffer` / `Protocol error` messages on Wayland, force compositing off:

```bash
WEBKIT_DISABLE_COMPOSITING_MODE=1 GDK_BACKEND=x11 pnpm tauri dev
```

## Claude Code Integration

To use prompts from the editor in Claude Code:

```bash
# One-time setup (while the editor is running)
claude mcp add claude-prompt-editor --transport http http://localhost:9780/mcp
```

Then in any Claude Code session:
```
> Use list_prompts to see available prompts
> Load the code-review prompt and use it to review this file
```

Or click **Copy MCP Config** in the editor toolbar and paste into your Claude Code config.

## Prompt File Format

Prompts are standard Markdown files with YAML frontmatter:

```markdown
---
name: "Code Review Assistant"
model: claude-opus-4-6
version: 1
tags: [coding, review]
thinking:
  type: adaptive
effort: high
---

You are an expert code reviewer specializing in {{language}}.

Review the provided code for security vulnerabilities and performance issues.

def login(u, p): return db.execute(f"SELECT * FROM users WHERE u='{u}'")
CRITICAL: SQL injection vulnerability...

```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `MCP_PORT` | `9780` | MCP server port |
| `PROMPTS_DIR` | `./prompts` | Path to prompts directory |

## License

[MIT](LICENSE)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [midwire](https://github.com/midwire)
- **Source:** [midwire/claude-prompt-editor](https://github.com/midwire/claude-prompt-editor)
- **License:** MIT
- **Homepage:** https://github.com/midwire/claude-prompt-editor

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-midwire-claude-prompt-editor
- Seller: https://agentstack.voostack.com/s/midwire
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
