Skip to main content

SCP Diagram MCP Server

Python diagrams 패키지를 사용해 SCP(Samsung Cloud Platform) 아키텍처 다이어그램과 Terraform IaC 참조 코드를 생성하는 MCP 서버.

주요 기능

  • SCP 아키텍처 다이어그램 생성
  • 여러 다이어그램 유형 지원 (SCP, sequence, flow, class, k8s, onprem, custom)
  • 사용 가능한 SCP 아이콘 및 서비스 조회
  • 다이어그램 예제 및 템플릿 제공
  • SCP Terraform 프로바이더 문서 조회 (리소스, 데이터소스)
  • scpv2 SDK를 통한 실제 SCP 리소스 조회·생성·삭제

SCP 아이콘 프로바이더는 이 패키지 안에 번들되어 있으므로, 설치 후 별도의 아이콘 생성 단계가 필요하지 않다.

사전 준비물

MCP 클라이언트를 실행하는 컴퓨터에 다음 두 가지가 준비되어 있어야 한다.

  1. uv — 서버를 내려받아 실행하는 데 사용된다.
    • Windows: irm https://astral.sh/uv/install.ps1 | iex
    • macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Graphviz — diagrams 패키지가 PNG를 렌더링할 때 Graphviz의 dot 실행 파일을 호출한다. 네이티브 프로그램이므로 별도로 설치하고 PATH에 등록되어 있어야 한다.
    • Windows: graphviz.org에서 설치(또는 winget install Graphviz.Graphviz)하고 bin 디렉터리를 PATH에 추가
    • macOS: brew install graphviz
    • Linux (Debian/Ubuntu): sudo apt-get install graphviz

Python 의존성(diagrams, mcp, pydantic, bandit, scpv2-sdk)은 uvx가 자동으로 설치하므로, 직접 pip install할 필요가 없다.

사용법

MCP 클라이언트에 등록

MCP 클라이언트 설정에 아래 항목을 추가한다. uvx가 필요 시 자동으로 내려받아 실행하므로 수동 설치가 필요 없다.

{
  "mcpServers": {
    "scp-diagram": {
      "command": "uvx",
      "args": ["scp-diagram-mcp-server"]
    }
  }
}

소스에서 로컬 실행 (개발용)

uv run python -m scp_diagram_mcp_server.server

도구 (Tools)

도구 기능
list_icons 사용 가능한 프로바이더/서비스/아이콘 탐색 (provider_filter="scp" 사용)
get_diagram_examples 유형별 다이어그램 예제 코드 조회
generate_diagram diagrams DSL 코드로 PNG 렌더링
list_terraform_resources SCP Terraform 리소스/데이터소스 유형 목록
get_terraform_examples SCP 리소스의 예제 HCL + 속성 스키마 조회
scp_list_services scpv2 SDK가 지원하는 SCP 서비스 목록
scp_describe_operation 오퍼레이션의 파라미터 + 검증 규칙 + 중첩 요청 본문 예제 조회 (예: create_vpc)
scp_list_resources SCP 리소스 읽기(list_/show_/get_/describe_) — 항상 허용
scp_create_resource 실제 SCP 리소스 생성 — 쓰기, 옵트인
scp_delete_resource 실제 SCP 리소스 삭제 — 쓰기, 옵트인 + confirm

실제 SCP 리소스 프로비저닝 (scpv2 SDK)

scp_* 도구는 scpv2 SDK를 통해 실제 과금되는 클라우드 리소스를 생성·삭제하므로, 다음과 같이 보호된다.

  • 읽기(scp_list_resources, scp_list_services, scp_describe_operation)는 항상 허용된다.
  • 생성/삭제는 서버 환경에 SCP_MCP_ALLOW_WRITE=1이 설정된 경우에만 동작한다.
  • 삭제는 추가로 호출 시 confirm=true를 요구한다.

인증정보는 SDK의 탐색 순서를 따른다 — SCP_ACCESS_KEY / SCP_SECRET_KEY 환경변수, 또는 ~/.scpconf/credentials.json(그리고 ~/.scpconf/config.json). API 엔드포인트 호스트는 {api}.{region}.{environment}.samsungsdscloud.com 형태이므로, 리전(region 인자 또는 SCP_REGION, 기본값 kr-west1)과 환경(environment 인자 또는 SCP_ENVIRONMENT, 예: e 또는 s, 기본값 e)이 모두 대상 계정과 일치해야 한다.

사내 SSL 검사 프록시 환경인가요? SCP API 호출이 TLS 인증서 검증 오류로 실패하면 네트워크 구성에 따라 둘 중 하나를 쓴다.

  • 프록시를 거쳐야만 외부로 나갈 수 있는 경우(폐쇄망): HTTPS_PROXY/HTTP_PROXY와 함께 SCP_USE_SYSTEM_TRUST=1을 설정한다. TLS 검증(체인·호스트명)을 OS 인증서 저장소에 맡기므로, 저장소에 배포된 사내 CA를 그대로 신뢰한다. Windows에서는 사내 CA가 Python 3.13+의 엄격 검증(Basic Constraints)이나 OpenSSL 키 길이 제한("CA certificate key too weak")에 걸리는 경우에도 Python 버전과 무관하게 동작한다. macOS는 검증되지 않았으며, OS가 2048bit 미만 CA를 거부하므로 같은 CA에서는 실패할 수 있다. Linux에서는 효과가 없다(OpenSSL이 그대로 검증한다). REQUESTS_CA_BUNDLE은 필요 없다. 그리고 SCP_NO_PROXY를 켜면 프록시를 우회해 방화벽에 막히므로 설정하지 않는다. 이 구성에서는 SSL 검사 프록시가 API 요청과 응답 본문을 평문으로 볼 수 있다(시크릿 키는 서명에만 쓰여 전송되지 않는다).
  • 프록시 없이 직접 나갈 수 있는 경우: SCP_NO_PROXY=1을 설정(또는 no_proxy=true 전달)하여 SDK가 프록시를 우회하고 실제 SCP 서버 인증서로 검증하도록 한다.

폐쇄망 설정 예시:

"env": {
  "SCP_USE_SYSTEM_TRUST": "1",
  "UV_NATIVE_TLS": "true",
  "HTTPS_PROXY": "http://<프록시>:<포트>",
  "HTTP_PROXY": "http://<프록시>:<포트>"
}

쓰기를 활성화하려면 MCP 클라이언트 설정의 env에 다음과 같이 지정한다.

{
  "mcpServers": {
    "scp-diagram": {
      "command": "uvx",
      "args": ["scp-diagram-mcp-server"],
      "env": {
        "SCP_MCP_ALLOW_WRITE": "1",
        "SCP_REGION": "kr-west1",
        "SCP_ENVIRONMENT": "e",
        "SCP_ACCESS_KEY": "...",
        "SCP_SECRET_KEY": "..."
      }
    }
  }
}

라이선스

Apache-2.0

Metadata

Release files for scp-diagram-mcp-server 1.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scp-diagram-mcp-server 1.1.8
File Size Uploaded Provenance Actions
scp_diagram_mcp_server-1.1.8.tar.gz 800.9 kB Without provenance Details for scp_diagram_mcp_server-1.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scp-diagram-mcp-server 1.1.8
File Interpreter ABI Platform Actions
scp_diagram_mcp_server-1.1.8-py3-none-any.whl Python 3 none any Details for scp_diagram_mcp_server-1.1.8-py3-none-any.whl

Total release size: 1.9 MB

Release files / scp_diagram_mcp_server-1.1.8.tar.gz

Download URL scp_diagram_mcp_server-1.1.8.tar.gz
Size 800.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b3f2adcf30dd8e3193d559babd4de7a08139d8dbe7af2c67046e74092a21ab52
BLAKE2b-256 checksum
How to use checksums
d3c1777f9b84068423185719f831bb5417484569553e0ce92ef36042f42817ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / scp_diagram_mcp_server-1.1.8-py3-none-any.whl

Download URL scp_diagram_mcp_server-1.1.8-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c7028eb8318d91d5c303990efb91388dc8e229b35d5a92b6d5f55827d635b1ff
BLAKE2b-256 checksum
How to use checksums
630d0ddae711138d8975ad6a48cadefb679360e5b8f8d31edf6de17eb977f768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Security for scp-diagram-mcp-server 1.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page