Logo de Flompt

Flompt

Comunidade
Nyrok

flow + prompt = flompt - Visual AI Prompt Builder. Decompose, edit as flowchart, recompile into optimized machine-readable prompts

Publicado porNyrok
Repositórioflompt
IdiomaTypeScript
Forks
16
Estrelas
151
Ferramentas disponíveis
0
Tipo de transportestdio
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Flompt disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    151 estrelas e 16 forks no repositório vinculado.


🎥 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.

flompt demo


✨ What is flompt?

flompt is a visual prompt engineering tool.

Instead of writing one long block of text, flompt lets you:

  1. Paste any prompt and let the AI break it into structured blocks
  2. Drag, connect, and reorder blocks in a flowchart editor
  3. Compile to a Claude-optimized, machine-ready XML prompt

🧩 Block Types

16 specialized blocks that map directly to Claude's prompt engineering best practices:

BlockPurposeClaude XML
DocumentExternal content grounding<documents><document>
RoleAI persona & expertise<role>
ToolsCallable functions the agent can use<tools>
AudienceWho the output is written for<audience>
ContextBackground information<context>
EnvironmentSystem context: OS, paths, date, runtime<environment>
ObjectiveWhat to DO<objective>
GoalEnd goal & success criteria<goal>
InputData you're providing<input>
ConstraintsRules & limitations<constraints>
GuardrailsHard limits and safety refusals<guardrails>
ExamplesFew-shot demonstrations<examples><example>
Chain of ThoughtStep-by-step reasoning<thinking>
Output FormatExpected output structure<output_format>
Response StyleVerbosity, tone, prose, markdown (structured UI)<format_instructions>
LanguageResponse language<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)

bash
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

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 use

Technical Details

PropertyValue
TransportStreamable HTTP (POST)
Endpointhttps://flompt.dev/mcp/
SessionStateless (each call is independent)
AuthNone required
DNS rebinding protectionEnabled (flompt.dev explicitly allowed)

🛠️ 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:

bash
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 8000

App (Frontend):

bash
cd app
cp .env.example .env   # optional: add PostHog key
npm install
npm run dev

Blog:

bash
cd blog
npm install
npm run dev   # available at http://localhost:3000/blog

⚙️ AI Configuration

flompt supports multiple AI providers. Copy backend/.env.example to backend/.env:

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-mini

Without 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 API

Both Caddy and the FastAPI backend are managed by supervisord, itself watched by a keepalive loop.


1. Prerequisites

bash
# 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 supervisor

2. Environment Variables

Backend (backend/.env):

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/compile

App frontend (app/.env):

env
VITE_POSTHOG_KEY=phc_...           # optional analytics
VITE_POSTHOG_HOST=https://eu.i.posthog.com

Blog (blog/.env.local):

env
NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://eu.i.posthog.com

3. Build

All assets must be built before starting services. Use the deploy script or manually:

Full deploy (build + restart + health check):

bash
cd /projects/flompt
./deploy.sh

Build only (no service restart):

bash
./deploy.sh --build-only

Restart only (no rebuild):

bash
./deploy.sh --restart-only

Manual build steps:

bash
# 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):

ProgramCommandPortLog
flompt-backenduvicorn app.main:app --host 0.0.0.0 --port 80008000/tmp/flompt-backend.log
flompt-caddycaddy run --config /projects/flompt/Caddyfile443/80/tmp/flompt-caddy.log

Both programs have autorestart=true and startretries=5, they automatically restart on crash.

Start supervisord (first boot or after a full restart):

bash
supervisord -c /projects/flompt/supervisord.conf

Common supervisorctl commands:

bash
# 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.log

5. Keepalive Watchdog

keepalive.sh is an infinite bash loop (running as a background process) that:

  1. Checks every 30 seconds whether supervisord is alive
  2. If supervisord is down, kills any zombie process occupying port 8000 (via inode lookup in /proc/net/tcp)
  3. Restarts supervisord
  4. Logs all events to /tmp/flompt-keepalive.log

Start keepalive (should be running at all times):

bash
nohup /projects/flompt/keepalive.sh >> /tmp/flompt-keepalive.log 2>&1 &
echo $!   # note the PID

Check if keepalive is running:

bash
ps aux | grep keepalive.sh
tail -f /tmp/flompt-keepalive.log

Note: keepalive.sh uses the same Python virtualenv path as supervisord. If you reinstall supervisor in a different venv, update SUPERVISORD and SUPERVISORCTL paths at the top of keepalive.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:

bash
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-caddy
# or directly:
/projects/flompt/caddy reload --config /projects/flompt/Caddyfile

Caddy 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:

bash
# 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}'
# → 200

8. Updating the App

After a backend code change:

bash
cd /projects/flompt
git pull
supervisorctl -c supervisord.conf restart flompt-backend

After a frontend change:

bash
cd /projects/flompt
git pull
cd app && npm run build
# No service restart needed, Caddy serves static files directly

After a blog change:

bash
cd /projects/flompt
git pull
cd blog && rm -rf .next out && npm run build
# No service restart needed

After a Caddyfile change:

bash
supervisorctl -c /projects/flompt/supervisord.conf restart flompt-caddy

Full redeploy from scratch:

bash
cd /projects/flompt && ./deploy.sh

9. Log Files Reference

FileContent
/tmp/flompt-backend.logFastAPI/uvicorn stdout + stderr
/tmp/flompt-caddy.logCaddy access + error logs
/tmp/flompt-supervisord.logsupervisord daemon logs
/tmp/flompt-keepalive.logkeepalive watchdog events

🏗️ Tech Stack

LayerTechnology
FrontendReact 18, TypeScript, React Flow v11, Zustand, Vite
BackendFastAPI, Python 3.12, Uvicorn
MCP ServerFastMCP (streamable HTTP transport)
AIAnthropic Claude / OpenAI GPT (pluggable)
Reverse ProxyCaddy (auto-TLS via Let's Encrypt)
Process ManagerSupervisord + keepalive watchdog
BlogNext.js 15 (static export), Tailwind CSS
ExtensionChrome & Firefox MV3 (content script + sidebar)
i18n10 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

MIT, built by Nyrok


Use o MCP de Flompt com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Flompt, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Flompt como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Flompt.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "flompt": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Flompt, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Flompt.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Flompt para me ajudar nesta tarefa?
Flompt
Claro. Já li.
Veja o que encontrei usando Flompt.

Perguntas frequentes

Para que serve o servidor MCP Flompt?

Flompt é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Flompt com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Flompt com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Flompt com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Flompt conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Flompt ao TypingMind?

Flompt funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Flompt oferece no TypingMind?

Flompt disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Flompt?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Flompt exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇