agentflow-mcp
agentflow-mcp
エンタープライズアーキテクチャの知識を提供する、agentflow デモパイプライン向けの MCP サーバーです。FastMCP + TypeScript で構築され、GCP Cloud Run にデプロイされています。
このサーバーは、Architect エージェントと Risk Checker エージェントを、一般的な LLM の推論ではなく厳選されたエンタープライズパターンに基づかせるための4つのツールを公開します。
ツール | 呼び出し元 | 戻り値 |
| Architect エージェント | 参照アーキテクチャパターン、コンポーネント、図データ |
| Architect エージェント | 制約を考慮した推論によるプラットフォーム推奨 |
| Risk Checker エージェント | 必要なコントロール、リスクフラグ、HITL トリガー |
| Architect エージェント | 企業のアイデンティティ、ポジショニング、ロゴ(Brandfetch と logo.dev 経由) |
位置づけ
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 ──
└──────────────────────┘この MCP は ツールプロバイダー であり、エージェントオーケストレーターではありません。エージェントのプロンプトとアーキテクチャ図スキルは agentflow プロジェクト側にあります。MCP は構造化データを提供し、エージェントがそれを解釈して行動します。
Related MCP server: MCP Architect
クイックスタート
前提条件
Node.js >= 20
(任意)
brand_context_lookup用の Brandfetch API キーと logo.dev キー
インストールと実行
npm install
npm run dev # stdio transport (local dev + MCP Inspector)HTTP トランスポート(Cloud Run)
MCP_TRANSPORT=http-stream PORT=8080 npm run dev
# agentflow-mcp listening on http://0.0.0.0:8080/mcpテストの実行
npm test # 31 unit + integration tests
npm run typecheck # tsc --noEmit
npm run check # biome lint + format環境変数
.env.example を .env にコピーしてキーを設定してください。外部 API キーが必要なのは brand_context_lookup だけです。残りの3つのツールはソースパックからオフラインで動作します。
変数 | 必要とするもの | 目的 |
|
| Brandfetch Brand Context API の Bearer トークン |
|
| logo.dev Brand API の Bearer トークン |
|
| logo.dev CDN URL 用の公開可能キー |
| サーバー |
|
| サーバー | HTTP ポート(デフォルト 8080。トランスポートが |
API キーが設定されていない場合、brand_context_lookup はキャッシュ済みドメインにはキャッシュされたレスポンスを、未取得のドメインには利用できないことを伝えるフォールバックレスポンスを返します。他の3つのツールは通常どおり動作します。
ツール
arch_pattern_lookup
エンタープライズの依頼を、厳選された参照アーキテクチャパターンにマッチングします。
入力:
{
"industry": "media_agency",
"data_stack": ["BigQuery", "Snowflake"],
"cloud": "GCP",
"constraints": ["SAML SSO", "EU data residency", "cross-client governance"],
"latency": "batch"
}出力:
{
"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": "..." }]
}マッチングロジック: 決定論的なルールベース方式です。業界の一致(40%)+データスタックの重複(30%)+制約条件のカバー率(30%)で算出します。厳選されたマッチ(信頼度 >= 0.85)には diagram_data とソースの参照が含まれます。弱いマッチは、信頼度 < 0.5 の汎用エンタープライズ AI POC パターンにフォールバックします。
tool_selection_lookup
ワークロード、データスタック、制約条件、レイテンシーに基づいてプラットフォームを推奨します。
入力:
{
"use_case": "AI-powered patient insights",
"data_stack": ["Databricks"],
"constraints": ["HIPAA", "PHI", "US data residency"],
"latency": "batch"
}出力:
{
"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
業界固有のリスクチェックとガバナンスチェックを返します。規制対象データに関する HITL トリガーも含まれます。
入力:
{
"industry": "healthcare",
"data_classification": ["PHI", "PII"],
"region": "US",
"deployment": "cloud",
"constraints": ["HIPAA"]
}出力:
{
"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 は、規制対象データ(PHI、PII、規制対象金融データ)に対して、人間が読める review_reason とともにトリガーされます。
brand_context_lookup
Brandfetch と logo.dev から企業ブランド情報とロゴを取得します。多層キャッシュを備えています。
入力:
{
"domain": "havas.com"
}出力:
{
"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
}キャッシュ層: (1)Brandfetch の cachedOnly=true によるキャッシュのみの即時ルックアップ、(2)TTL 付きローカルファイルキャッシュ。繰り返しのルックアップでは API クォータを消費せずキャッシュ済みデータを返します。API が到達不能な場合はグレースフルなフォールバックを行います。
ソースパック
data/ ディレクトリには、構造化された YAML frontmatter を持つ102個の Markdown ファイルが含まれており、次のカテゴリに整理されています:
data/
├── industry/ # Industry-specific architecture notes
├── vendors/ # Vendor documentation (GCP, AWS, Azure, Snowflake, Databricks)
└── patterns/ # Curated reference architecture patterns (4 demo scenarios)frontmatter のフィールド: 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。
ソースパックはサーバー起動時に、業界、データスタック、制約条件、pattern_id をキーとするインメモリーインデックスとして読み込まれます。
デモシナリオ
シナリオ | 業界 | パターン ID |
メディアエージェンシーのオーディエンス計測 |
|
|
ヘルスケアの患者インサイト |
|
|
小売レイクハウスのパーソナライゼーション |
|
|
FSI ガバナンスコパイロット |
|
|
デプロイ
Docker
docker build -t agentflow-mcp .
docker run -p 8080:8080 agentflow-mcpGCP 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"完全なサービス構成は cloud-run.yaml を参照してください。
Google App Engine
App Engine Standard はビルドステップを実行しないため、最初にローカルでコンパイルしてからデプロイします:
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/ includedapp.yaml は MCP_TRANSPORT=http-stream を設定し、アイドル時にはゼロへスケールします(デモにはコストが低く抑えられます)。App Engine は PORT を自動設定するため、サーバーはそれをそのまま読み取ります。
シークレットには 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)完全な構成は app.yaml と .gcloudignore を参照してください。
スクリプト
スクリプト | その用途 |
|
|
| ソースパックファイルの frontmatter を生成する |
| 4つのツールがすべて MCP ツール一覧から検出可能であることを確認する |
| 4つのデモドメインのブランドキャッシュを事前投入する |
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 cacheMCP Inspector でのテスト
npx @modelcontextprotocol/inspector npm run devこれにより MCP Inspector の UI が起動し、ツールを対話的に実行してレスポンスを確認できます。
プロジェクト構成
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技術スタック
ランタイム: Node.js >= 20
MCP フレームワーク: FastMCP v4
言語: TypeScript(strict)
検証: Zod v4
Lint・フォーマット: Biome
テスト: Node.js 組み込みテストランナー
デプロイ: Docker + GCP Cloud Run
OpenSpec
このプロジェクトはスペック駆動開発に OpenSpec を使用しています。4つのツール機能は openspec/specs/ の下で規定されています:
arch-pattern-lookup(要件7件)brand-context-lookup(要件6件)risk-policy-lookup(要件4件)tool-selection-lookup(要件5件)
スペックの検証は次のコマンドで行います:
openspec validate --specs
openspec doctorライセンス
MIT
Maintenance
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
FlicenseAqualityCmaintenanceProvides a persistent memory and governance layer that allows AI coding agents to query documented architecture rules and validate code against team standards. It enables agents to verify compliance across categories like security and testing before suggesting changes to ensure consistency across development sessions.317- AlicenseNot gradedqualityDmaintenanceProvides comprehensive architectural expertise through specialized agents, resources, and tools for generating, evaluating, and modifying architectural designs.785ISC
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to index, search, and retrieve architectural documentation and store self-learning notes from codebases.1
- FlicenseNot gradedqualityCmaintenanceProvides a set of MCP tools (file, database, GitHub, Slack, browser, calendar, email, vector search, Python execution) with safety constraints and OpenAI integration for enterprise architecture automation.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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