Integrations
Connect PromptFlowEngine
The same engine runs in every integration. Choose by where your prompts are: in a browser or editor (the extensions), inside an AI assistant or agent (MCP), or in your own code (HTTP API). None of them calls a language model, and none needs an account or API key.
| Option | Best for | Runs | Setup |
|---|---|---|---|
| Chrome extension | Checking prompts on ChatGPT, Claude, Gemini, Grok, Perplexity, DeepSeek | In your browser | Install from the Chrome Web Store |
| VS Code extension | Codebase → prompt, and a privacy guard before AI chat | In VS Code | Install the extension |
| MCP server | Letting Copilot agent mode, Claude, Cursor, Windsurf, Gemini CLI, or your agent call the engine as tools | Local process, stdio | Build once, add to your client's config |
| HTTP API | Your application, script, or backend | promptflowengine.com/api/v1 or your own Worker | Nothing: send JSON |
Option 1: MCP server
PromptFlowEngine ships an MCP server (v2.1.0); your AI tool is the client. The transport isstdio only: the client starts node packages/mcp-server/dist/bin.js on your machine. There is no hosted MCP endpoint and no authentication, because only a process you start can talk to it.
Prerequisites
- Node.js 22 or later (Windows, macOS, or Linux) with Corepack.
- A checkout of the PromptFlowEngine repository (npm publishing is pending). Build it once:
corepack pnpm install --frozen-lockfile
corepack pnpm --filter @promptflow/engine build
corepack pnpm --filter @promptflow/mcp-server buildReplace <ABSOLUTE_PATH_TO_CHECKOUT> below with your checkout. On Windows use forward slashes in JSON (C:/src/Prompt/…).
Configure your client
{
"servers": {
"promptflow": {
"type": "stdio",
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js"
]
}
}
}{
"mcpServers": {
"promptflow": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js"
]
}
}
}claude mcp add promptflow -- node <ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js
claude mcp listFile locations follow each client's documentation; if a client moves them, its documentation wins. The server needs no secrets, so never add credentials to these files.
Verify
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"check","version":"1"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node packages/mcp-server/dist/bin.jsOr run the TypeScript example, which starts the server, lists its tools, and evaluates and restructures a prompt:node --experimental-strip-types packages/mcp-server/examples/mcp-client.ts. In your client, ask “List the promptflow tools”.
Tools (15)
| Tool | Required | What it does |
|---|---|---|
optimize_prompt | prompt | Optimize prompt |
optimize_prompt_pipeline | prompt | Optimize prompt (staged pipeline) |
compress_prompt | prompt | Compress prompt |
validate_prompt | prompt | Validate prompt |
estimate_tokens | prompt | Estimate tokens |
analyze_prompt | prompt | Analyze prompt |
extract_entities | prompt | Extract entities |
summarize_context | context | Summarize context |
score_prompt | prompt | Score prompt |
evaluate_prompt | prompt | Evaluate prompt |
compare_prompts | a, b | Compare prompts |
scan_prompt_security | prompt | Scan prompt security |
scan_sensitive_data | text | Scan sensitive data |
sanitize_prompt | text | Sanitize prompt |
restructure_prompt | prompt | Restructure prompt |
Arguments, results, and error cases for each tool: MCP reference. Example request in an agent chat:
Use promptflow to restructure this, then scan it for secrets:
"fix login issue and make google login work and don't break anything"Troubleshooting
- Server shows as failed: the path is wrong or
dist/is not built. Rebuild and use the absolute path. nodenot found: the client has no Node.js on its PATH. Put the absolute path tonodeincommand.Invalid arguments: the message names the field. Long input: setPROMPTFLOW_MCP_MAX_PROMPT_CHARSin the client'senv.- Need logs: set
PROMPTFLOW_MCP_LOG=debug; they go to stderr and never contain prompt text.
Option 2: HTTP API
Base URL https://promptflowengine.com/api/v1. JSON in, JSON out, no authentication, nothing stored, 60 POST requests per minute per IP. Do not send prompts that contain secrets to any remote service; redact first with POST /sanitize, the CLI, or the extensions.
curl -s https://promptflowengine.com/api/v1/healthcurl -s https://promptflowengine.com/api/v1/analyze \
-H 'content-type: application/json' \
-d '{"prompt":"Write something about our product and stuff. Keep it short but also be detailed."}' \
| jq '{quality: .quality.overall, findings: [.findings[] | {severity, message}]}'curl -s https://promptflowengine.com/api/v1/optimize \
-H 'content-type: application/json' \
-d '{"prompt":"Please summarize the notes. Please summarize the notes.","mode":"balanced"}' \
| jq '{text: .selected.text, tokenDelta, changes: [.changes[].title]}'import { createClient, PromptFlowApiError } from './api-client';
const api = createClient({ baseUrl: process.env.PROMPTFLOW_API ?? 'https://promptflowengine.com' });
try {
const analysis = await api.analyze(userPrompt);
const critical = analysis.findings.filter((f) => f.severity === 'critical');
const { selected, tokenDelta } = await api.optimize(userPrompt, 'balanced');
console.log(critical.length, selected.text, tokenDelta);
} catch (err) {
// Typed errors carry status, type, message, and the request id for support.
if (err instanceof PromptFlowApiError) console.error(err.status, err.type, err.message, err.requestId);
else throw err;
}Every endpoint, field, and status code: HTTP API reference.
Run it locally
corepack pnpm --filter @promptflow/web build
cd apps/web && corepack pnpm exec wrangler dev --local --env="" --port 8787
curl -s http://localhost:8787/api/v1/healthTroubleshooting
- 400: send
content-type: application/json; the message names the field. - 404 “Unknown API version”: use the
/api/v1/prefix. - 405:
health,models, andrulesare GET; the rest are POST. - 413: the body is over 256 KB or a field over 100,000 characters.
- 429: wait for
retry-after(60 seconds), or run the engine locally with the CLI.