Skip to main content
Glama

agentflow-mcp

agentflow 데모 파이프라인을 위한 엔터프라이즈 아키텍처 지식 MCP 서버입니다. FastMCP + TypeScript로 구축되었으며 GCP Cloud Run에 배포됩니다.

이 서버는 아키텍처 에이전트(Architecture Agent)와 리스크 체커 에이전트(Risk Checker Agent)가 일반적인 LLM 추론 대신 선별된 엔터프라이즈 패턴에 기반하도록 하는 네 가지 도구를 제공합니다.

도구

호출 주체

반환 내용

arch_pattern_lookup

아키텍트 에이전트

참조 아키텍처 패턴, 컴포넌트, 다이어그램 데이터

tool_selection_lookup

아키텍트 에이전트

제약 인지 추론을 포함한 플랫폼 추천

risk_policy_lookup

리스크 체커 에이전트

필수 통제 항목, 리스크 플래그, HITL 트리거

brand_context_lookup

아키텍트 에이전트

회사 정체성, 포지셔닝, 로고(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는 에이전트 오케스트레이터가 아니라 **도구 제공자(tool provider)**입니다. 에이전트 프롬프트와 아키텍처 다이어그램 스킬은 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뿐입니다. 나머지 세 도구는 소스 팩을 통해 오프라인에서 작동합니다.

변수

사용처

용도

BRANDFETCH_API_KEY

brand_context_lookup

Brandfetch Brand Context API의 Bearer 토큰

LOGO_DEV_SECRET_KEY

brand_context_lookup

logo.dev Brand API의 Bearer 토큰

LOGO_DEV_PUBLISHABLE_KEY

brand_context_lookup

logo.dev CDN URL용 공개 키

MCP_TRANSPORT

서버

stdio(기본값) 또는 http-stream

PORT

서버

HTTP 포트(기본값 8080, 전송이 http-stream일 때 사용)

API 키가 없으면 brand_context_lookup은 캐시된 도메인에 대해 캐시된 응답을 반환하고, 캐시되지 않은 도메인에 대해서는 정상적인 처리(graceful) 방식의 사용 불가 응답을 반환합니다. 나머지 세 도구는 계속 정상 작동합니다.

도구

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를 가진 마크다운(Markdown) 파일 102개가 포함되어 있으며, 다음과 같이 구성됩니다.

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.

소스 팩은 서버 시작 시 인메모리 인덱스로 로드되며, industry, data stack, constraints, pattern_id 기준으로 색인됩니다.

데모 시나리오

시나리오

산업

패턴 ID

미디어 에이전시 오디언스 측정

media_agency

media_agency_audience_measurement

헬스케어 환자 인사이트

healthcare

healthcare_patient_insights

리테일 레이크하우스 개인화

retail

retail_lakehouse_personalization

FSI 거버넌스 코파일럿

financial_services

fsi_governance_copilot

배포

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"

전체 서비스 구성은 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/ included

app.yamlMCP_TRANSPORT=http-stream으로 설정하며, 유휴 상태일 때는 0으로 스케일링됩니다(데모에 더 저렴). 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에서 확인하세요.

스크립트

스크립트

용도

scripts/validate-source-pack.ts

data/ 내 모든 마크다운 파일에 유효한 YAML frontmatter가 있는지 검증

scripts/generate-frontmatter.mjs

소스 팩 파일의 frontmatter 생성

scripts/mcp-list-check.ts

네 도구가 모두 MCP 도구 목록에 표시되는지 확인

scripts/brand-cache-warm.ts

네 데모 도메인에 대한 브랜드 캐시 사전 로드

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

MCP 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(엄격 모드)

  • 검증: Zod v4

  • 린트/포맷팅: Biome

  • 테스트: Node.js 내장 테스트 러너

  • 배포: Docker + GCP Cloud Run

OpenSpec

이 프로젝트는 스펙 기반 개발을 위해 OpenSpec을 사용합니다. 네 가지 도구 기능은 openspec/specs/ 아래에 정의되어 있습니다.

  • arch-pattern-lookup(요구 사항 7개)

  • brand-context-lookup(요구 사항 6개)

  • risk-policy-lookup(요구 사항 4개)

  • tool-selection-lookup(요구 사항 5개)

스펙 검증은 다음 명령으로 합니다.

openspec validate --specs
openspec doctor

라이선스

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