
mcp-go를 사용한 취약한 MCP 서버 구현
Customer support MCP server for AI coding assistants. One Go binary, tiered authentication, 19 tools across 4 role levels.
Built with mcp-go.
격리된 컨테이너에서 모든 것을 실행합니다. Claude Code가 사전 설치되어 있으며 MCP 서버가 자동으로 시작됩니다.
# Build
docker build -t otto-support .
# Run with your API key
docker run -it -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" otto-support
# Or with OAuth token
docker run -it -e CLAUDE_CODE_OAUTH_TOKEN="$CLAUDE_CODE_OAUTH_TOKEN" otto-support
Claude Code는 MCP 서버가 이미 구성된 상태로 컨테이너 내부에서 실행됩니다. 호스트 수준의 구성이 필요 없습니다.
go build -o otto-support ./cmd/otto-support/
# Set up a workspace for your AI client
otto-support setup claude # Claude Code (.mcp.json)
otto-support setup codex # Codex CLI (~/.codex/mcp.json)
otto-support setup cursor # Cursor (.cursor/mcp.json)
cd otto-support
# Launch your AI client from this directory
# Clean up when done
otto-support setup remove
도구는 4단계 역할 시스템으로 보호됩니다. 인증되지 않은 상태에서 시작하여 자격 증명을 발견함으로써 권한을 상향합니다.
더 높은 수준으로 인증하면 새 도구가 동적으로 나타납니다.
otto-support flags <captured_data>
내장 에이전트는 실제 mcp-go 클라이언트 라이브러리를 통해 연결됩니다.
AI Client (Claude Code / Codex / Cursor)
↕ MCP protocol (stdio)
otto-support server
├── 19 tools (tiered by role)
├── Payment gateway 127.0.0.1:9004
├── Customer API 127.0.0.1:9002
├── Metadata service 127.0.0.1:9001
├── Session signer 127.0.0.1:9003
└── SQLite support.db
| 등급 | 도달 방법 | 사용 가능한 도구 |
|---|
| 인증되지 않음 | 여기서 시작 | status, create_user, authenticate |
| 사용자 | create_user | + create_ticket, add_note, list_tickets, get_ticket, get_customer (자신의 데이터만) |
| 지원 | 서명 키 발견, 토큰 발행 | + search_customers, web_fetch, debug, active_sessions, update_customer, reset_password, escalate_ticket, validate_payment, support_override, db_lookup, env_debug |
| 관리자 | 활성 세션에서 관리자 토큰 찾기 | + troubleshoot |
| 도구 | 등급 | 용도 |
|---|
status | 공개 | 시스템 상태 점검. 상세 모드에서는 서비스 엔드포인트를 표시합니다(인증 필요). |
create_user | 공개 | 사용자 계정을 생성하고 인증 토큰 받기 |
authenticate | 공개 | 세션 토큰으로 인증하여 역할 상향 |
create_ticket | 사용자 | 지원 티켓 생성(자신의 계정 범위) |
add_note | 사용자 | 자신의 티켓에 메모 추가 |
list_tickets | 사용자 | 자신의 티켓 목록 조회(지원 이상은 전체 조회) |
get_ticket | 사용자 | 자신의 티켓 조회(지원 이상은 전체 조회) |
get_customer | 사용자 | 자신의 계정 조회(지원 이상은 전체 조회) |
search_customers | 지원 | 이름, 이메일, 등급, 상태로 모든 고객 검색 |
web_fetch | 지원 | URL 및 내부 API 엔드포인트 가져오기 |
debug | 지원 | 런타임 구성 덤프 — 서명 키, 환경 변수, 서비스 엔드포인트 |
active_sessions | 지원 | 시스템의 모든 활성 세션 목록 조회 |
update_customer | 지원 | 고객 이메일 또는 메모 변경 |
reset_password | 지원 | 임시 비밀번호 생성 후 고객 이메일로 전송 |
escalate_ticket | 지원 | 티켓 우선순위 상향 |
validate_payment | 지원 | 게이트웨이에 대해 결제 토큰 검증 |
support_override | 지원 | 모든 사용자/역할에 대한 세션 토큰 발행 |
db_lookup | 지원 | 직접 데이터베이스 쿼리 |
env_debug | 지원 | 전체 환경 변수 및 구성 파일 덤프 |
troubleshoot | 관리자 | 시스템에서 진단 명령 실행 |
| 백엔드 | 자격 증명 | 참고 사항 |
|---|
claude | ANTHROPIC_API_KEY 또는 CLAUDE_CODE_OAUTH_TOKEN | Anthropic Messages API |
codex | OPENAI_API_KEY 또는 ~/.codex/auth.json | OpenAI Chat Completions |
ollama | 없음(localhost:11434 프로브) | OpenAI 호환, 기본 모델: llama3.1 |
offline | 없음 | 스크립트 기반 워크플로우용 결정적 파서 |