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.

OptionBest forRunsSetup
Chrome extensionChecking prompts on ChatGPT, Claude, Gemini, Grok, Perplexity, DeepSeekIn your browserInstall from the Chrome Web Store
VS Code extensionCodebase → prompt, and a privacy guard before AI chatIn VS CodeInstall the extension
MCP serverLetting Copilot agent mode, Claude, Cursor, Windsurf, Gemini CLI, or your agent call the engine as toolsLocal process, stdioBuild once, add to your client's config
HTTP APIYour application, script, or backendpromptflowengine.com/api/v1 or your own WorkerNothing: send JSON
The extensions are apps for people. MCP and the HTTP API expose the engine's analysis, optimization, restructuring, and security scanning to programs. They cannot read anyone's extension activity history, account, or organization data.

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:
build
corepack pnpm install --frozen-lockfile
corepack pnpm --filter @promptflow/engine build
corepack pnpm --filter @promptflow/mcp-server build

Replace <ABSOLUTE_PATH_TO_CHECKOUT> below with your checkout. On Windows use forward slashes in JSON (C:/src/Prompt/…).

Configure your client

VS Code / Copilot agent mode: .vscode/mcp.json (the VS Code extension writes this for you)
{
  "servers": {
    "promptflow": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js"
      ]
    }
  }
}
Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json), Gemini CLI (~/.gemini/settings.json)
{
  "mcpServers": {
    "promptflow": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js"
      ]
    }
  }
}
Claude Code
claude mcp add promptflow -- node <ABSOLUTE_PATH_TO_CHECKOUT>/packages/mcp-server/dist/bin.js
claude mcp list

File 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

list the tools without a client
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.js

Or 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)

ToolRequiredWhat it does
optimize_promptpromptOptimize prompt
optimize_prompt_pipelinepromptOptimize prompt (staged pipeline)
compress_promptpromptCompress prompt
validate_promptpromptValidate prompt
estimate_tokenspromptEstimate tokens
analyze_promptpromptAnalyze prompt
extract_entitiespromptExtract entities
summarize_contextcontextSummarize context
score_promptpromptScore prompt
evaluate_promptpromptEvaluate prompt
compare_promptsa, bCompare prompts
scan_prompt_securitypromptScan prompt security
scan_sensitive_datatextScan sensitive data
sanitize_prompttextSanitize prompt
restructure_promptpromptRestructure prompt

Arguments, results, and error cases for each tool: MCP reference. Example request in an agent chat:

you
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.
  • node not found: the client has no Node.js on its PATH. Put the absolute path to node in command.
  • Invalid arguments: the message names the field. Long input: set PROMPTFLOW_MCP_MAX_PROMPT_CHARS in the client's env.
  • 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.

check the connection
curl -s https://promptflowengine.com/api/v1/health
analyze a prompt
curl -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}]}'
optimize a prompt
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]}'
TypeScript (apps/web/examples/api-client.ts, tested against the real API)
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

shell
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/health

Troubleshooting

  • 400: send content-type: application/json; the message names the field.
  • 404 “Unknown API version”: use the /api/v1/ prefix.
  • 405: health, models, and rules are 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.