Agenten-Integration

MCP-Server für die Prompt-Analyse

PromptFlowEngine mit KI-Agenten und MCP-kompatiblen Abläufen verbinden. Ihr Assistent kann einen Prompt als Schritt seiner eigenen Arbeit analysieren, umstrukturieren, optimieren und bereinigen.

  • stdio-Transport
  • Schreibgeschützte Tools
  • Aus dem Quellcode bauen

Was es leistet

Das Model Context Protocol ist ein Standardweg, auf dem eine KI-Anwendung externe Tools aufruft. PromptFlowEngine liefert einen MCP-Server mit, der die Engine als Tools bereitstellt, sodass ein Agent in GitHub Copilot, Claude Desktop, Claude Code, Cursor oder Ihrem eigenen Client sie ohne individuellen Integrationscode nutzen kann.

Der Server läuft auf Ihrem Rechner als Kindprozess des Clients und kommuniziert per JSON-RPC über stdio. Er liest nur die übergebenen Argumente, macht keine Netzwerkaufrufe und hat keine Datei- oder Shell-Tools. Jedes Tool ist als schreibgeschützt und idempotent annotiert.

Es gibt keinen gehosteten Endpunkt und keine Authentifizierung einzurichten. Das npm-Paket ist noch nicht veröffentlicht, Sie bauen den Server also aus dem Repository und verweisen Ihren Client auf die gebaute Datei. Für die Nutzung aus der Ferne rufen Sie die HTTP-API auf.

Praxisbeispiel

Die Tools, die Ihr Agent bekommt

Diese Liste wird beim Erstellen der Seite aus der Tool-Registry des Servers erzeugt und entspricht daher dem, was ein Client nach dem Verbinden sieht. Befunde der Engine und generierte Prompts werden auf Englisch angezeigt, genau so, wie Engine und API sie zurückgeben.

Vom PromptFlowEngine-MCP-Server bereitgestellte Tools
ToolWas es tut
optimize_promptOptimize a prompt with deterministic, verified transforms (duplicates, filler, optional sections). Every candidate is checked to preserve all sentences, requirements, code, and variables; the original is kept if nothing is better. Returns the selected prompt, token savings, quality score, and what changed.
optimize_prompt_pipelineRun the optimization pipeline and return per-stage results plus token and estimated cost metrics, in the result shape used by the PromptFlow VS Code extension.
compress_promptRemove exact duplicate sentences and extra whitespace without rewriting any wording.
validate_promptCheck a prompt for missing objective or output format, ambiguity, conflicting instructions, duplicates, prompt-injection patterns, secrets, and undelimited variables. isValid is false only when a critical issue exists.
estimate_tokensCount tokens and estimate input cost for a model. "exact" is true only for OpenAI models with a loaded tokenizer; other providers are approximate. Costs are estimates from a reference price table.
analyze_promptDetect intent, task type, technical domain, requested output, requirements, and entities (languages, frameworks, file paths, identifiers).
extract_entitiesExtract languages, frameworks, libraries, cloud platforms, services, technologies, file paths, identifiers, URLs, and commands.
summarize_contextExtractive summary: the first N unique, non-empty sentences of a context block, in order. Does not rank or rewrite.
score_promptScore prompt quality 0-100: 100 minus a penalty per issue (critical 30, warning 10, info 3; capped at 50 with any critical issue), with per-dimension scores and suggestions.
evaluate_promptFull quality report: overall score, grade, eight quality dimensions with the checks that failed, and every finding with why it matters and how to fix it.
compare_promptsCompare two prompts: token and estimated cost delta, quality delta per dimension, and which findings were resolved or introduced.
scan_prompt_securityPrompt-injection risk (0-100, signature-based, with threat ids), sensitive-data counts by category, undelimited template variables, and destructive operations. Never returns detected secret values.
scan_sensitive_dataScan text for credentials, cloud secrets, and PII with local deterministic detectors. Returns offsets and per-category counts, never the sensitive values.
sanitize_promptReplace detected sensitive data with placeholders such as [REDACTED_API_KEY]. Returns the sanitized text and counts, never the original values. Use before sending a prompt to an external model.
restructure_promptTurn a loosely written request into a sectioned engineering prompt: Role, Objective, Context, Requirements, Constraints, Edge cases, Testing, Acceptance criteria, Expected output. Only sections with content appear. The author's clauses are kept and reordered; for software tasks, fixed engineering guidance chosen by intent and topic is added, and every line is labeled "prompt" or "engine" so additions can be reviewed. Set scaffold=false to reorganize without adding guidance.
convert_structured_payloadConvert a JSON payload to TOON (Token-Oriented Object Notation) and say whether to use it. Returns token counts for pretty JSON, compact JSON and TOON, a round-trip check (the TOON must decode back to the same value), and the recommendation: "toon" only when it round-trips and saves at least 5 % over compact JSON, otherwise "json". Lossless or it keeps JSON.
simulate_costSimulate what a prompt costs across models at a request volume, from catalog list prices (labelled simulated, never a bill). Optionally optimizes the prompt first and reports hypothetical savings. Flags models whose context window is too small.
analyze_context_budgetMeasure the context sources you intend to send with a prompt: tokens and share per source, context-window usage with an output reserve, sensitive data (categories and counts only), instruction-like text in retrieved sources, and duplicates. Reads only the text passed in; never reads files.
run_prompt_testsRun a regression suite against a prompt. Assertions check the prompt (contains, not_contains, matches, max_tokens, min_quality, no_finding, max_severity, has_variables, max_injection_risk, no_sensitive_data, output_format) and, when a case carries a recorded model response, the response (response_valid_json, response_has_keys, response_contains, response_max_chars). With baseline_prompt, also runs the suite on the baseline and lists cases that regressed. No model is called.
.vscode/mcp.json
{
  "servers": {
    "promptflow": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/checkout/packages/mcp-server/dist/bin.js"]
    }
  }
}
an Ihren Agenten
Use promptflow to restructure this before you start:
"fix login issue and make google login work and don't break anything"

19 Tools, alle schreibgeschützt. Andere Clients nutzen denselben Befehl unter einem Schlüssel mcpServers.

Die wichtigsten Vorteile

Funktionen

Für wen

Anwendungsfälle

Häufige Fragen

Was ist ein MCP-Server?

Ein MCP-Server ist ein Programm, das einer KI-Anwendung über das Model Context Protocol Tools, Ressourcen und Prompts anbietet. Die KI-Anwendung, der Client, entscheidet, wann sie aufgerufen werden.

Mit welchen MCP-Clients funktioniert er?

Mit jedem Client, der einen lokalen stdio-Server starten kann, darunter der Agentenmodus von GitHub Copilot in VS Code, Claude Desktop, Claude Code und Cursor.

Gibt es einen gehosteten oder entfernten MCP-Endpunkt?

Nein. Der Transport ist ausschließlich stdio, und der Server läuft auf Ihrem Rechner. Für den Fernzugriff nutzen Sie die HTTP-API.

Kann der Server meine Dateien lesen?

Nein. Er hat keine Datei-, Shell- oder Netzwerk-Tools. Er verarbeitet nur den Text, der einem Tool als Argument übergeben wird.

Alle Produkte laufen mit derselben Engine und lassen sich daher ohne Überraschungen kombinieren.

Die Technik dahinter verstehen

Leitfäden aus dem Wissenszentrum für Prompt Engineering, die die Ideen hinter diesem Produkt erklären.

Eine Engine, überall dort, wo Sie mit KI arbeiten.

Kostenlos, deterministisch und privat. Ohne Registrierung.