Skip to main content
Glama

agentflow-mcp

Ein MCP-Server für Enterprise-Architektur-Wissen für die agentflow-Demo-Pipeline. Entwickelt mit FastMCP + TypeScript, bereitgestellt auf GCP Cloud Run.

Der Server stellt vier Tools bereit, die einen Architecture Agent und einen Risk Checker Agent auf kuratierten Enterprise-Mustern gründen, anstatt auf generischem LLM-Reasoning:

Tool

Called by

Returns

arch_pattern_lookup

Architecture Agent

Referenzarchitekturmuster, Komponenten, Diagrammdaten

tool_selection_lookup

Architecture Agent

Plattformempfehlung mit constraint-basiertem Reasoning

risk_policy_lookup

Risk Checker Agent

Erforderliche Kontrollen, Risiko-Flags, HITL-Auslöser

brand_context_lookup

Architecture Agent

Unternehmensidentität, Positionierung, Logo (über Brandfetch + logo.dev)

Wie es sich einfügt

agentflow pipeline                          agentflow-mcp
┌──────────────────────┐                   ┌───────────────────────┐
│  Qualifier Agent     │                   │  arch_pattern_lookup   │
│  - clarifies the ask │                   │  tool_selection_lookup │
└──────┬───────────────┘                   │  risk_policy_lookup    │
       │ handoff                          │  brand_context_lookup  │
┌──────▼───────────────┐                   │                        │
│  Architect Agent     │──── MCP calls ───▶│  Source pack (data/)   │
│  - pattern selection │                   │  102 markdown files    │
│  - tool selection    │◀── JSON response ─│  with YAML frontmatter  │
│  - diagram rendering │                   │                        │
└──────┬───────────────┘                   │  Brandfetch + logo.dev │
       │ handoff                          │  (cached, additive)    │
┌──────▼───────────────┐                   └───────────────────────┘
│  Risk Checker Agent  │──── risk_policy_lookup ──▶
│  - HITL gate trigger  │◀── risk_flags, HITL ──
└──────────────────────┘

Das MCP ist ein Tool-Anbieter, kein Agent-Orchestrator. Agent-Prompts und der Architekturdiagramm-Skill leben im agentflow-Projekt. Das MCP liefert strukturierte Daten; die Agenten interpretieren sie und handeln darauf basierend.

Related MCP server: MCP Architect

Schnellstart

Voraussetzungen

  • Node.js >= 20

  • (Optional) Brandfetch-API-Schlüssel und logo.dev-Schlüssel für brand_context_lookup

Installieren und ausführen

npm install
npm run dev          # stdio transport (local dev + MCP Inspector)

HTTP-Transport (Cloud Run)

MCP_TRANSPORT=http-stream PORT=8080 npm run dev
# agentflow-mcp listening on http://0.0.0.0:8080/mcp

Tests ausführen

npm test             # 31 unit + integration tests
npm run typecheck    # tsc --noEmit
npm run check        # biome lint + format

Umgebungsvariablen

Kopieren Sie .env.example in .env und füllen Sie die Schlüssel aus. Nur brand_context_lookup benötigt externe API-Schlüssel – die anderen drei Tools funktionieren offline aus dem Quellpaket.

Variable

Benötigt von

Zweck

BRANDFETCH_API_KEY

brand_context_lookup

Bearer-Token für die Brandfetch Brand Context API

LOGO_DEV_SECRET_KEY

brand_context_lookup

Bearer-Token für die logo.dev Brand API

LOGO_DEV_PUBLISHABLE_KEY

brand_context_lookup

Publishable-Key für logo.dev-CDN-URLs

MCP_TRANSPORT

Server

stdio (Standard) oder http-stream

PORT

Server

HTTP-Port (Standard 8080, verwendet bei http-stream)

Wenn API-Schlüssel fehlen, liefert brand_context_lookup für gecachte Domains zwischengespeicherte Antworten oder für ungecachte Domains eine saubere „Nicht verfügbar“-Antwort. Die anderen drei Tools funktionieren normal weiter.

Tools

arch_pattern_lookup

Ordnet eine Enterprise-Anfrage einem kuratierten Referenzarchitekturmuster zu.

Eingabe:

{
  "industry": "media_agency",
  "data_stack": ["BigQuery", "Snowflake"],
  "cloud": "GCP",
  "constraints": ["SAML SSO", "EU data residency", "cross-client governance"],
  "latency": "batch"
}

Ausgabe:

{
  "pattern_id": "media_agency_audience_measurement",
  "architecture_summary": "...",
  "recommended_components": ["BigQuery", "Snowflake", "SAML SSO", "GCP EU Region"],
  "data_zones": ["bronze", "silver", "gold"],
  "integration_notes": ["..."],
  "confidence": 0.87,
  "diagram_data": {
    "components": [{ "name": "BigQuery", "type": "database", "sublabel": "...", "zone": "gold" }],
    "connections": [{ "from": "Users", "to": "SAML SSO", "label": "OAuth 2.0", "style": "dashed" }],
    "boundaries": [{ "label": "GCP EU Region", "type": "region" }]
  },
  "source_references": [{ "path": "data/patterns/...", "title": "...", "source_url": "..." }]
}

Matching-Logik: Deterministisch, regelbasiert – Branchen-Übereinstimmung (40 %) → Datenlack-Überlappung (30 %) → Constraint-Abdeckung (30 %). Kuratierte Übereinstimmungen (Konfidenz >= 0.85) enthalten diagram_data und Quellreferenzen. Schwache Übereinstimmungen fallen auf ein generisches Enterprise-AI-POC-Muster mit Konfidenz < 0.5 zurück.

tool_selection_lookup

Empfiehlt eine Plattform anhand von Workload, Datenlack, Constraints und throughLatzenz.

Eingabe:

{
  "use_case": "AI-powered patient insights",
  "data_stack": ["Databricks"],
  "constraints": ["HIPAA", "PHI", "US data residency"],
  "latency": "batch"
}

Ausgabe:

{
  "recommended_platform": "Databricks",
  "cloud_fit": "Azure or AWS",
  "reasoning": "Strong lakehouse fit for healthcare AI with HIPAA-compliant governance...",
  "alternatives": [{ "platform": "Snowflake", "rationale": "..." }, { "platform": "BigQuery", "rationale": "..." }]
}

risk_policy_lookup

Liefert branchenspezifische Risiko- und Governance-Prüfungen, einschließlich HITL-Auslösern für regulierte Daten.

Eingabe:

{
  "industry": "healthcare",
  "data_classification": ["PHI", "PII"],
  "region": "US",
  "deployment": "cloud",
  "constraints": ["HIPAA"]
}

Ausgabe:

{
  "required_controls": ["RBAC", "audit logs", "data lineage", "SAML SSO"],
  "risk_flags": ["prompt leakage", "overbroad analyst access"],
  "hitl_required": true,
  "review_reason": "PHI access requires human approval before final architecture signoff"
}

HITL wird für regulierte Datentypen (PHI, PII, regulierte Finanzdaten) ausgelöst – mit einer menschenlesbaren review_reason.

brand_context_lookup

Ruft umfassenden Unternehmenskontext von Brandfetch und ein Logo von logo.dev ab – mit mehrschichtigem aufgebautem Caching.

Eingabe:

{
  "domain": "havas.com"
}

Ausgabe:

{
  "company_name": "Havas",
  "domain": "havas.com",
  "industry_hint": "media_agency",
  "description": "...",
  "tags": ["advertising", "marketing", "media"],
  "positioning": { "value_proposition": "...", "target_audience": "...", "products_and_services": "..." },
  "brand": { "voice": "...", "style": "..." },
  "logo_url": "https://...",
  "confidence": 0.85
}

Caching-Ebenen: (1) Brandfetch cachedOnly=true für sofortige Cache-Only-Abfragen, (2) lokaler Datei-Cache mit TTL. Wiederholte Abfragen liefern gecachte Daten, ohne das API-Kontingent zu verbrauchen. Der Wechsel zu „not found“ ist elegant, wenn APIs nicht erreichbar sind.

Quellpaket

Das Verzeichnis data/ enthält 102 Markdown-Dateien mit strukturiertem YAML-Frontmatter, organisiert nach:

data/
├── industry/      # Industry-specific architecture notes
├── vendors/        # Vendor documentation (GCP, AWS, Azure, Snowflake, Databricks)
└── patterns/       # Curated reference architecture patterns (4 demo scenarios)

Frontmatter-Felder: type, title, source_url, vendor, industry, data_stack, cloud, constraints, compliance, region, data_zones, latency, pattern_id, architecture_summary, recommended_components, integration_notes, confidence_baseline, diagram_data.

Das Quellpaket wird beim Serverstart in einen In-Memory-Index geladen, keyed.based. auf Branche, Daten-Stack, Constraints und pattern_id.

Demo-Szenarien

Szenario

Branche

Pattern ID

Medienagentur-Zielgruppenmessung

media_agency

media_agency_audience_measurement

Healthcare-Patienteneinblicke

healthcare

healthcare_patient_insights

Retail-Lakehouse-Personalisierung

retail

retail_lakehouse_personalization

FSI-Governance-Copilot

financial_services

fsi_governance_copilot

Deployment

Docker

docker build -t agentflow-mcp .
docker run -p 8080:8080 agentflow-mcp

GCP Cloud Run

gcloud run deploy agentflow-mcp \
  --source . \
  --region run.googleapis.com \
  --port 8080 \
  --set-env-vars "MCP_TRANSPORT=http-stream" \
  --set-secrets "BRANDFETCH_API_KEY=brandfetch-api-key:latest,LOGO_DEV_SECRET_KEY=logo-dev-secret-key:latest,LOGO_DEV_PUBLISHABLE_KEY=logo-dev-publishable-key:latest"

Die vollständige Service-Konfiguration ist in cloud-run.yaml zu sehen.

Google App Engine

Führt den Build-Schritt: Kompilieren Sie zuerst lokal und stellen erst dann bereit:

npm run build          # compile src/ -> dist/

# (Optional) Warm brand cache for demo domains before deploy
npx tsx scripts/brand-cache-warm.ts

gcloud app deploy      # deploys with dist/ and data/ included

app.yaml setzt MCP_TRANSPORT=http-stream und herunterunterskaliert bei Nichtauslastung auf null (kostet in einer Demo niedriger). App Engine setzt PORT automatisch – der Server liest es bereits.

Für Geheimnisse nutzen Sie den Secret Manager:

# Create secrets
gcloud secrets create brandfetch-api-key --data-file=<(echo -n "$BRANDFETCH_API_KEY")
gcloud secrets create logo-dev-secret-key --data-file=<(echo -n "$LOGO_DEV_SECRET_KEY")
gcloud secrets create logo-dev-publishable-key --data-file=<(echo -n "$LOGO_DEV_PUBLISHABLE_KEY")

# Reference them in app.yaml (uncomment the includes: section)

Die vollständigen Konfigurations in app.yaml und .gcloudignore.

Scripts

Scripts

Zweck

scripts/validate-source-pack.ts

Prüft alle Markdown-Dateien in data/ auf gültiges YAML-Frontmatter

scripts/generate-frontmatter.mjs

Generiert Frontmatter für die Quellpaket-Dateien

scripts/mcp-list-check.ts

Überprüft, dass alle vier über die MCP-Tool-Sammlung erkennbar sind

scripts/brand-cache-warm.ts

Pre-populiert den Brand-Cache für die vier Demo-Domains

npx tsx scripts/validate-source-pack.ts   # validate source pack
npx tsx scripts/mcp-list-check.ts          # verify tool discovery
npx tsx scripts/brand-cache-warm.ts        # warm brand cache

Testen mit dem MCP Inspector

npx @modelcontextprotocol/inspector npm run dev

Dadurch wird die Oberfläche des MCP Inspector gestartet, in der Sie Tools interaktiv aufrufen und die Antworten verifizieren können.

Projektstruktur

agentflow-mcp/
├── src/
│   ├── index.ts                    # MCP server entry point (stdio + http-stream)
│   ├── tools/
│   │   ├── archPatternLookup.ts    # Pattern matching + confidence scoring
│   │   ├── toolSelectionLookup.ts  # Platform recommendation
│   │   ├── riskPolicyLookup.ts     # Risk/governance checks + HITL
│   │   └── brandContextLookup.ts   # Brandfetch + logo.dev with caching
│   ├── data/
│   │   ├── loader.ts                # Source pack parser + in-memory index
│   │   ├── brandfetchClient.ts     # Brandfetch Brand Context API client
│   │   ├── logoDevClient.ts         # logo.dev Brand API client
│   │   └── brandCache.ts            # Local file cache with TTL
│   └── types/
│       ├── source.ts                # Source pack entry types
│       ├── arch-pattern.ts          # arch_pattern_lookup types
│       ├── tool-selection.ts        # tool_selection_lookup types
│       ├── risk-policy.ts           # risk_policy_lookup types
│       └── brand-context.ts        # brand_context_lookup types
├── data/                            # Source pack (102 markdown files)
│   ├── industry/
│   ├── vendors/
│   └── patterns/
├── tests/                           # Unit + integration tests
├── docs/                            # PRD, MCP overview
├── scripts/                         # Validation + cache warming scripts
├── openspec/                        # OpenSpec specs (4 capabilities)
│   ├── specs/                       # Main specs (synced from archived change)
│   └── changes/archive/            # Archived change proposals
├── Dockerfile                       # Multi-stage build for Cloud Run
├── cloud-run.yaml                  # Cloud Run service config
└── package.json

Tech-Stack

  • Laufzeitumgebung: Node.js >= 20

  • MCP-Framework: FastMCP v4

  • Sprache: TypeScript (strict)

  • Validierung: Zod v4

  • Linting/Formatierung: Biome

  • Testausführung: Node.js-eigener Test Runner

  • Deployment: Docker + GCP Cloud Run

OpenSpec

Dieses Projekt verwendet OpenSpec für die spezifikationsgesteuerte Entwicklung. Die vier Tool-Fähigkeiten sind unter openspec/specs/ beschrieben:

  • arch-pattern-lookup (7 requirements)

  • brand-context-lookup (6 requirements)

  • risk-policy-lookup (4 requirements)

  • tool-selection-lookup (5 requirements)

Validieren Sie die Specs mit:

openspec validate --specs
openspec doctor

Lizenz

MIT

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Shared, permission-aware company context for AI agents, with provenance, approvals and audit.

  • Your company's brain for AI agents. Cited, permission-aware knowledge across every system.

  • Curated knowledge API for AI agents - skill packs, semantic search, validated patterns.

View all MCP Connectors

Latest Blog Posts

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/ishfuseini/agentflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server