flompt
The flompt server enables AI prompt engineering through three core tools:
decompose_prompt: Break a raw text prompt into structured, typed blocks (role, objective, context, constraints, etc.) using AI (Claude/OpenAI with API key) or a keyword-based heuristic fallback; returns a JSON list of blockscompile_prompt: Take a JSON list of structured blocks and compile them into a Claude-optimized XML prompt following Anthropic's recommended ordering, with an estimated token countlist_block_types: Retrieve all 16 available block types (role, objective, context, constraints, guardrails, examples, chain of thought, output format, etc.) with descriptions and recommended canonical ordering
The server requires no authentication, is stateless, and integrates with Claude Code via the Model Context Protocol (MCP) over streamable HTTP.
π₯ Demo
Try it live at flompt.dev, free, no account needed.
Paste any prompt. The AI breaks it into typed blocks. Drag, reorder, compile to Claude-optimized XML.

Related MCP server: Refine Prompt
β¨ What is flompt?
flompt is a visual prompt engineering tool.
Instead of writing one long block of text, flompt lets you:
Paste any prompt and let the AI break it into structured blocks
Drag, connect, and reorder blocks in a flowchart editor
Compile to a Claude-optimized, machine-ready XML prompt
π§© Block Types
16 specialized blocks that map directly to Claude's prompt engineering best practices:
Block | Purpose | Claude XML |
Document | External content grounding |
|
Role | AI persona & expertise |
|
Tools | Callable functions the agent can use |
|
Audience | Who the output is written for |
|
Context | Background information |
|
Environment | System context: OS, paths, date, runtime |
|
Objective | What to DO |
|
Goal | End goal & success criteria |
|
Input | Data you're providing |
|
Constraints | Rules & limitations |
|
Guardrails | Hard limits and safety refusals |
|
Examples | Few-shot demonstrations |
|
Chain of Thought | Step-by-step reasoning |
|
Output Format | Expected output structure |
|
Response Style | Verbosity, tone, prose, markdown (structured UI) |
|
Language | Response language |
|
Blocks are automatically ordered following Anthropic's recommended prompt structure.
π Try It Now
flompt.dev, free and open-source, no account needed.
π§© Browser Extension
Use flompt directly inside ChatGPT, Claude, and Gemini without leaving your tab.
Injects an Enhance button into the AI chat input
Bidirectional sync between the sidebar and the chat
Works on ChatGPT, Claude, and Gemini
π€ Claude Code Integration (MCP)
flompt exposes its core capabilities as native tools inside Claude Code via the Model Context Protocol (MCP).
Once configured, you can call decompose_prompt, compile_prompt, and list_block_types directly from any Claude Code conversation, no browser, no copy-paste.
Installation
Option 1: CLI (recommended)
claude mcp add --transport http --scope user flompt https://flompt.dev/mcp/The --scope user flag makes flompt available in all your Claude Code projects.
Option 2: ~/.claude.json
{
"mcpServers": {
"flompt": {
"type": "http",
"url": "https://flompt.dev/mcp/"
}
}
}Available Tools
Once connected, 3 tools are available in Claude Code:
decompose_prompt(prompt: str)
Breaks down a raw prompt into structured blocks (role, objective, context, constraints, etc.).
Uses Claude or GPT on the server if an API key is configured
Falls back to keyword-based heuristic analysis otherwise
Returns a list of typed blocks + full JSON to pass to
compile_prompt
Input: "You are a Python expert. Write a function that parses JSON and handles errors."
Output: β
3 blocks extracted:
[ROLE] You are a Python expert.
[OBJECTIVE] Write a function that parses JSONβ¦
[CONSTRAINTS] handles errors
π Full blocks JSON: [{"id": "...", "type": "role", ...}, ...]compile_prompt(blocks_json: str)
Compiles a list of blocks into a Claude-optimized XML prompt.
Takes the JSON from
decompose_prompt(or manually crafted blocks)Reorders blocks following Anthropic's recommended structure
Returns the final XML prompt with an estimated token count
Input: [{"type": "role", "content": "You are a Python expert", ...}, ...]
Output: β
Prompt compiled (142 estimated tokens):
<role>You are a Python expert.</role>
<objective>Write a function that parses JSON and handles errors.</objective>list_block_types()
Lists all 16 available block types with descriptions and the recommended canonical ordering. Useful when manually crafting blocks.
Typical Workflow
1. decompose_prompt("your raw prompt here")
β get structured blocks as JSON
2. (optionally edit the JSON to add/remove/modify blocks)
3. compile_prompt("<json from step 1>")
β get Claude-optimized XML prompt, ready to useTechnical Details
Property | Value |
Transport | Streamable HTTP (POST) |
Endpoint |
|
Session | Stateless (each call is independent) |
Auth | None required |
DNS rebinding protection | Enabled ( |
π οΈ Self-Hosting (Local Dev)
Requirements
Python 3.12+
Node.js 18+
An Anthropic or OpenAI API key (optional, heuristic fallback works without one)
Setup
Backend:
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add your API key
uvicorn app.main:app --reload --port 8000App (Frontend):
cd app
cp .env.example .env # optional: add PostHog key
npm install
npm run devBlog:
cd blog
npm install
npm run dev # available at http://localhost:3000/blogService | URL |
App | |
Backend API | |
API Docs (Swagger) | |
MCP endpoint |
βοΈ AI Configuration
flompt supports multiple AI providers. Copy backend/.env.example to backend/.env:
# Anthropic (recommended)
ANTHROPIC_API_KEY=sk-ant-...
AI_PROVIDER=anthropic
AI_MODEL=claude-3-5-haiku-20241022
# or OpenAI
OPENAI_API_KEY=sk-...
AI_PROVIDER=openai
AI_MODEL=gpt-4o-miniWithout an API key, flompt uses a keyword-based heuristic decomposer and still compiles structured XML.
π’ Production Deployment
This section documents the exact production setup running at flompt.dev. Everything lives in /projects/flompt.
Architecture
Internet
β
βΌ
Caddy (auto-TLS, reverse proxy) β port 443/80
βββ /app* β Vite SPA static files (app/dist/)
βββ /blog* β Next.js static export (blog/out/)
βββ /api/* β FastAPI backend (localhost:8000)
βββ /mcp/* β FastAPI MCP server (localhost:8000, no buffering)
βββ /docs* β Reverse proxy to GitBook
βββ / β Static landing page (landing/)
β
FastAPI (uvicorn, port 8000)
β
Anthropic / OpenAI APIBoth Caddy and the FastAPI backend are managed by supervisord, itself watched by a keepalive loop.
1. Prerequisites
# Python 3.12+ with pip
python --version
# Node.js 18+
node --version
# Caddy binary placed at /projects/flompt/caddy
# (not committed to git, download from https://caddyserver.com/download)
curl -o caddy "https://caddyserver.com/api/download?os=linux&arch=amd64"
chmod +x caddy
# supervisor installed in a Python virtualenv
pip install supervisor2. Environment Variables
Backend (backend/.env):
ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY
AI_PROVIDER=anthropic # or: openai
AI_MODEL=claude-3-5-haiku-20241022 # model to use for decompose/compileApp frontend (app/.env):
VITE_POSTHOG_KEY=phc_... # optional analytics
VITE_POSTHOG_HOST=https://eu.i.posthog.comBlog (blog/.env.local):
NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://eu.i.posthog.com3. Build
All assets must be built before starting services. Use the deploy script or manually:
Full deploy (build + restart + health check):
cd /projects/flompt
./deploy.shBuild only (no service restart):
./deploy.sh --build-onlyRestart only (no rebuild):
./deploy.sh --restart-onlyManual build steps:
# 1. Vite SPA β app/dist/
cd /projects/flompt/app
npm run build
# Output: app/dist/ (pre-compressed with gzip, served by Caddy)
# 2. Next.js blog β blog/out/
cd /projects/flompt/blog
rm -rf .next out # clear cache to avoid stale builds
npm run build
# Output: blog/out/ (full static export, no Node server needed)4. Process Management
Production processes are managed by supervisord (supervisord.conf):
Program | Command | Port | Log |
|
| 8000 |
|
|
| 443/80 |
|
Both programs have autorestart=true and startretries=5, they automatically restart on crash.
Start supervisord (first boot or after a full restart):
supervisord -c /projects/flompt/supervisord.confCommon supervisorctl commands:
# Check status of all programs
supervisorctl -c /projects/flompt/supervisord.conf status
# Restart backend only (e.g. after a code change)
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-backend
# Restart Caddy only (e.g. after a Caddyfile change)
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-caddy
# Restart everything
supervisorctl -c /projects/flompt/supervisord.conf restart all
# Stop everything
supervisorctl -c /projects/flompt/supervisord.conf stop all
# Read real-time logs
tail -f /tmp/flompt-backend.log
tail -f /tmp/flompt-caddy.log
tail -f /tmp/flompt-supervisord.log5. Keepalive Watchdog
keepalive.sh is an infinite bash loop (running as a background process) that:
Checks every 30 seconds whether supervisord is alive
If supervisord is down, kills any zombie process occupying port 8000 (via inode lookup in
/proc/net/tcp)Restarts supervisord
Logs all events to
/tmp/flompt-keepalive.log
Start keepalive (should be running at all times):
nohup /projects/flompt/keepalive.sh >> /tmp/flompt-keepalive.log 2>&1 &
echo $! # note the PIDCheck if keepalive is running:
ps aux | grep keepalive.sh
tail -f /tmp/flompt-keepalive.logNote:
keepalive.shuses the same Python virtualenv path as supervisord. If you reinstall supervisor in a different venv, updateSUPERVISORDandSUPERVISORCTLpaths at the top ofkeepalive.sh.
6. Caddy Configuration
Caddyfile handles all routing for flompt.dev. Key rules (in priority order):
/blog* β Static Next.js export at blog/out/
/api/* β FastAPI backend at localhost:8000
/health β FastAPI health check
/mcp/* β FastAPI MCP server (flush_interval -1 for streaming)
/mcp β 308 redirect to /mcp/ (avoids upstream 307 issues)
/docs* β Reverse proxy to GitBook (external)
/app* β Vite SPA at app/dist/ (gzip precompressed)
/ β Static landing page at landing/Reload Caddy after a Caddyfile change:
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-caddy
# or directly:
/projects/flompt/caddy reload --config /projects/flompt/CaddyfileCaddy auto-manages TLS certificates via Let's Encrypt, no manual SSL setup needed.
7. Health Checks
The deploy script runs these checks automatically. You can run them manually:
# Backend API
curl -s https://flompt.dev/health
# β {"status":"ok","service":"flompt-api"}
# Landing page
curl -s -o /dev/null -w "%{http_code}" https://flompt.dev/
# β 200
# Vite SPA
curl -s -o /dev/null -w "%{http_code}" https://flompt.dev/app
# β 200
# Blog
curl -s -o /dev/null -w "%{http_code}" https://flompt.dev/blog/en
# β 200
# MCP endpoint (requires Accept header)
curl -s -o /dev/null -w "%{http_code}" \
-X POST https://flompt.dev/mcp/ \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# β 2008. Updating the App
After a backend code change:
cd /projects/flompt
git pull
supervisorctl -c supervisord.conf restart flompt-backendAfter a frontend change:
cd /projects/flompt
git pull
cd app && npm run build
# No service restart needed, Caddy serves static files directlyAfter a blog change:
cd /projects/flompt
git pull
cd blog && rm -rf .next out && npm run build
# No service restart neededAfter a Caddyfile change:
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-caddyFull redeploy from scratch:
cd /projects/flompt && ./deploy.sh9. Log Files Reference
File | Content |
| FastAPI/uvicorn stdout + stderr |
| Caddy access + error logs |
| supervisord daemon logs |
| keepalive watchdog events |
ποΈ Tech Stack
Layer | Technology |
Frontend | React 18, TypeScript, React Flow v11, Zustand, Vite |
Backend | FastAPI, Python 3.12, Uvicorn |
MCP Server | FastMCP (streamable HTTP transport) |
AI | Anthropic Claude / OpenAI GPT (pluggable) |
Reverse Proxy | Caddy (auto-TLS via Let's Encrypt) |
Process Manager | Supervisord + keepalive watchdog |
Blog | Next.js 15 (static export), Tailwind CSS |
Extension | Chrome & Firefox MV3 (content script + sidebar) |
i18n | 10 languages: EN FR ES DE PT JA TR ZH AR RU |
π Features
π¨ Visual flowchart editor with drag-and-drop blocks (React Flow)
π Dual-view editor: toggle between canvas and card list at any time
ποΈ Hide/show any block; hidden blocks are excluded from the assembled prompt
π Duplicate any block in one click from the List View
π€ AI-powered decomposition: paste a prompt, get structured blocks
π Async job queue for non-blocking decomposition with live progress
π¦Ύ XML output structured following Anthropic best practices
π§© Browser extension for ChatGPT, Claude, and Gemini (Chrome + Firefox)
π Claude Code MCP: native tool integration via Model Context Protocol
π± Responsive with full touch support
π Dark theme
π 10 languages: EN, FR, ES, DE, PT, JA, TR, ZH, AR, RU, each with a dedicated indexed page for SEO
πΎ Auto-save via local Zustand persistence
β¨οΈ Keyboard shortcuts
π Export as TXT or JSON
π MIT licensed, self-hostable
π€ Contributing
Contributions are welcome: bug reports, features, translations, and docs!
Read CONTRIBUTING.md to get started. The full changelog is in CHANGELOG.md.
π License
Available Tools
3 toolscompile_promptA
Compile a list of blocks into a Claude-optimized structured XML prompt.
Takes the JSON returned by decompose_prompt (or manually crafted blocks)
and produces a ready-to-use XML prompt with a token estimate.
Args:
blocks_json: JSON-stringified list of blocks.
Each block: {"type": "role|objective|...", "content": "...",
"label": "...", "description": "...", "summary": ""}
Returns:
The compiled XML prompt with token estimate.
| Name | Required | Description | Default |
|---|---|---|---|
| blocks_json | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits; it mentions the output (XML prompt with token estimate) but does not cover side effects, permissions, or error behavior, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (5 sentences plus structured Args/Returns), with the core purpose in the first sentence, and no unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 parameter, no enums) and presence of an output schema, the description covers the input format and output summary adequately, though 'Claude-optimized' could be elaborated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only provides a title and type, but the description thoroughly explains the parameter's format (JSON-stringified list of blocks) with field details, fully compensating for the 0% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states it compiles blocks into a Claude-optimized XML prompt, and references decompose_prompt to differentiate from siblings like list_block_types.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It indicates the tool is used after decompose_prompt or with manually crafted blocks, providing clear context for when to invoke it, but does not explicitly exclude other scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
decompose_promptA
Decompose a raw prompt into structured blocks (role, objective, context, constraints, etc.).
Uses AI (Claude/OpenAI) if an API key is configured on the server, otherwise
falls back to keyword-based heuristic analysis.
Returns a JSON list of blocks ready to edit or pass to compile_prompt.
Args:
prompt: The raw prompt string to decompose.
Returns:
A summary of extracted blocks + the full JSON to pass to compile_prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the AI vs heuristic behavior and that the return value includes both a summary and full JSON. However, it does not mention limitations like prompt size, rate limits, or error conditions, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the main action. It uses a clear two-paragraph structure. The 'Args' and 'Returns' sections add minor redundancy but overall the text is efficient and focused.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one param, output schema exists), the description covers the key points: how it works (AI vs heuristic), what it produces (structured blocks), and how to use the result (edit or pass to compile_prompt). It does not list block types but references a sibling tool, which is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must compensate. It adds 'The raw prompt string to decompose', which clarifies the parameter's role. However, this is minimalβno examples, length constraints, or formatting hints. For a single simple parameter, this is adequate but not exemplary.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Decompose a raw prompt into structured blocks'. It specifies the action (decompose) and resource (raw prompt), and hints at the output format. This distinguishes it from siblings like compile_prompt, which does the reverse.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions when to use AI vs heuristic fallback based on configuration, and suggests the output is 'ready to edit or pass to compile_prompt'. It does not explicitly state when not to use, but the sibling context and the decomposition vs compilation contrast provide adequate guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_block_typesA
List all available block types in flompt with their descriptions.
Useful to know which types to use when manually crafting blocks
to pass to compile_prompt.
Returns:
Description of each block type and the recommended canonical ordering.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description carries full burden. Discloses that it returns descriptions and recommended canonical ordering, and that it is a list operation, which implies no side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three concise, front-loaded sentences with no waste. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity and existence of output schema, description sufficiently covers purpose and return structure. No gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters, so baseline 4. Description does not need to add parameter info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'List all available block types' with specific verb and resource. Distinguishes from sibling tools compile_prompt and decompose_prompt by indicating its use case for manual block crafting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use: 'when manually crafting blocks to pass to compile_prompt.' Provides clear context, though does not mention when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
compile_prompt - First observed
decompose_prompt - First observed
list_block_types
TDQS
Each tool has a unique, clearly defined role: decompose breaks down prompts, compile assembles them, and list_block_types provides reference. No ambiguity.
All tools follow a consistent verb_noun pattern with snake_case (compile_prompt, decompose_prompt, list_block_types), making the purpose obvious.
With only 3 tools, the server is tightly scoped to a focused prompt engineering workflowβno bloat, each tool earns its place.
The set covers the full pipeline: decompose an existing prompt, list available block types for manual editing, and compile into XML. No obvious gaps for the intended domain.
Maintenance
Related MCP Connectors
Give any MCP-compatible AI assistant a builder for live, hosted web tools and workflows.
- PromptOTOAuthcom.promptot
Manage, version, and publish LLM prompts with blocks, variables, and evaluations.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
Self-hosted AI prompt library: prompts, collections, tags, teams, chains. 29 MCP tools for agents.
Related MCP Servers
- FlicenseAqualityCmaintenanceRefines and improves AI prompts using workspace-aware context from your project's tech stack, structure, and dependencies. Includes tools to analyze prompt quality and generate well-structured prompts from raw ideas.42095-
- AlicenseAqualityDmaintenanceAn MCP server that uses Claude 3.5 Sonnet to transform ordinary prompts into structured, professionally engineered instructions for any LLM. It enhances AI interactions by adding context, requirements, and structural clarity to raw user inputs.13MIT
- AlicenseAqualityAmaintenanceAn MCP server that transforms vague prompts into platform-optimized prompts for 58 AI platforms across 7 categories. Send a raw prompt. Get back a version specifically optimized for Midjourney, DALL-E, Sora, Runway, ElevenLabs, Claude, ChatGPT, or any of the 58 supported platforms β with the right syntax, parameters, and structure each platform expects.2316012Apache 2.0
- AlicenseNot gradedqualityCmaintenanceContext intelligence for AI coding sessions. 7 MCP tools to score, compare, compress, build, and scan prompts across 9 AI tools. Rule-based, <5ms/prompt, all analysis runs locally.46MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nyrok/flompt'
If you have feedback or need assistance with the MCP directory API, please join our Discord server