본문으로 건너뛰기
Skillpedia
커넥터 (MCP)48k · #5187

mcp-server-security

하는 일

이 가이드는 AI를 다른 도구와 데이터에 연결하는 서버를 안전하게 보호하는 방법을 설명합니다. 해커가 이런 서버에 접근하거나 조작하는 것을 막는 데 도움을 줍니다.

사용하는 경우

  • ✓AI를 중요한 시스템에 연결할 때.
  • ✓데이터 보안이 매우 중요할 때.
  • ✓무단 접근을 막고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mcp-server-security/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mcp-server-security/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“해커로부터 내 AI 서버를 어떻게 보호할 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 가이드는 암호화를 사용해 통신을 보호하는 방법, 도구를 사용할 수 있는 사람을 확인하는 방법, 감사를 위해 모든 작업을 기록하는 방법을 설명합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

MCP Server Security

Comprehensive hardening guide for Model Context Protocol (MCP) servers. MCP is the open standard for connecting AI agents to external tools, data sources, and services. Because MCP servers execute real actions on real infrastructure, they are a high-value attack surface. This skill covers every layer of defense you need before exposing an MCP server to agents in production.


2. MCP Threat Model

Before hardening, understand what you are defending against.

Threat Vector Impact
Unauthorized tool access Agent calls tools the user should not have access to Privilege escalation, data breach
Prompt injection via resources Malicious content in MCP resources influences agent behavior Arbitrary tool execution
Data exfiltration via results Tool results leak sensitive data back to an untrusted agent Data loss, compliance violation
SSRF via MCP tools Agent tricks a tool into making internal network requests Internal service compromise
Credential theft API keys or tokens stored insecurely on the MCP server Full account takeover
Denial of service Agent floods server with tool calls or huge payloads Service unavailability
Man-in-the-middle Unencrypted transport between agent and MCP server Eavesdropping, request tampering
Supply chain compromise Malicious MCP server package or plugin Arbitrary code execution

3. Transport Security

3.1 TLS for Streamable HTTP and SSE Transports

Every MCP server exposed over HTTP must terminate TLS. Never run plain HTTP in production.

Nginx reverse proxy with TLS termination for an MCP server:

# /etc/nginx/sites-enabled/mcp-server.conf
server {
    listen 443 ssl http2;
    server_name mcp.internal.example.com;

    ssl_certificate     /etc/ssl/certs/mcp-server.crt;
    ssl_certificate_key /etc/ssl/private/mcp-server.key;
    ssl_protocols       TLSv1.3;
    ssl_ciphers         TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256;
    ssl_prefer_server_ciphers on;
    ssl_session_timeout 1d;
    ssl_session_tickets off;

    # HSTS header
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;

    location / {
        proxy_pass http://127.0.0.1:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;

        # SSE-specific: disable buffering so events stream immediately
        proxy_buffering off;
        proxy_cache off;
        proxy_read_timeout 86400s;
    }
}

3.2 mTLS Between Agent and Server

For high-security environments, require the agent (client) to present a certificate.

# Add to the server block above
ssl_client_certificate /etc/ssl/certs/agent-ca.crt;
ssl_verify_client on;
ssl_verify_depth 2;

Generate a client certificate for an agent:

# Create CA (one-time)
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 \
  -days 365 -noenc -keyout ca-key.pem -out ca-cert.pem \
  -subj "/CN=MCP Agent CA"

# Create agent client cert signed by the CA
openssl req -newkey ec -pkeyopt ec_paramgen_curve:P-256 \
  -noenc -keyout agent-key.pem -out agent-csr.pem \
  -subj "/CN=agent-orchestrator-01"

openssl x509 -req -in agent-csr.pem -CA ca-cert.pem -CAkey ca-key.pem \
  -CAcreateserial -out agent-cert.pem -days 90

3.3 Securing stdio Transport

For local stdio-based servers, the attack surface is the process boundary itself:

Use an already reviewed, version-pinned local server entrypoint and a separately enforced sandbox. Do not launch a moving npx -y package or describe Node flags as a complete host-permission boundary. The server needs runtime/module access in addition to its data root; network, process creation, links and writes need explicit platform controls. A configuration example is not permission to create or replace a user's host entry.

…

자주 묻는 질문

MCP란 무엇인가요?

AI를 외부 도구와 데이터에 안전하게 연결하기 위한 표준입니다.

MCP 서버 보안이 왜 중요한가요?

MCP 서버는 시스템에서 실제 작업을 수행할 수 있어서, 공격의 매력적인 대상이 되기 때문입니다.

TLS와 mTLS란 무엇인가요?

TLS는 에이전트와 서버 사이의 통신을 암호화합니다. mTLS는 에이전트도 보안 인증서를 제시해야 합니다.

상세 정보

작성자의 원본 설명

Secure Model Context Protocol (MCP) servers with transport encryption, tool authorization, input validation, and audit logging for safe AI agent integrations.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5187
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬