MCP 서버 연결(Go)
AI 어시스턴트가 Koneksi Storage에 액세스하여 안전한 파일 저장 및 백업 작업을 수행할 수 있도록 지원하는 Go 기반 MCP(Model Context Protocol) 서버입니다.
특징
Koneksi Storage에 파일 업로드
Koneksi Storage에서 파일 다운로드
디렉토리 생성 및 관리
파일 나열 및 검색
선택적인 압축 및 암호화를 통한 파일 백업
API 키를 사용한 안전한 인증
경량 Go 구현
설치
mcp-server 디렉토리로 이동합니다.
cd mcp-server종속성을 설치합니다.
go mod download프로젝트를 빌드합니다.
go build -o koneksi-mcp main.goKoneksi API 자격 증명을 구성하세요.
cp .env.example .env
# Edit .env with your API credentials구성
.env 파일에서 다음 환경 변수를 설정하세요.
KONEKSI_API_CLIENT_ID: Koneksi API 클라이언트 IDKONEKSI_API_CLIENT_SECRET: Koneksi API 클라이언트 비밀번호KONEKSI_API_BASE_URL: (선택사항) Koneksi API 기본 URL
용법
클로드 데스크탑과 함께
Claude Desktop 구성에 서버를 추가합니다. (claude_desktop_config.json):
{
"mcpServers": {
"koneksi": {
"command": "/path/to/koneksi-backup-cli/mcp-server/koneksi-mcp",
"env": {
"KONEKSI_API_CLIENT_ID": "your_client_id",
"KONEKSI_API_CLIENT_SECRET": "your_client_secret"
}
}
}
}사용 가능한 도구
upload_file: Koneksi Storage에 파일 업로드
filePath: Path to the file to uploaddirectoryId: (Optional) Directory ID to upload to
download_file: Koneksi Storage에서 파일을 다운로드하세요
fileId: ID of the file to downloadoutputPath: Path where to save the file
list_directories: 모든 디렉토리 나열
create_directory: 새 디렉터리 만들기
name: Name of the directorydescription: (Optional) Description
search_files: 디렉토리의 파일 나열
directoryId: Directory ID to search in
upload_content: 컨텐츠를 직접 업로드하세요(Claude의 첨부 파일용)
fileName: Name for the filecontent: Base64 encoded file contentdirectoryId: (Optional) Directory ID to upload to
backup_file: 선택적 압축 및 암호화를 사용하여 파일 백업
filePath: Path to the file to backupdirectoryId: (Optional) Directory ID to backup tocompress: (Optional) Compress the file before backupencrypt: (Optional) Encrypt the file before backupencryptPassword: (Optional) Password for encryption
개발
서버를 실행합니다:
go run main.go다양한 플랫폼에 맞춰 빌드:
# macOS
GOOS=darwin GOARCH=amd64 go build -o koneksi-mcp-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -o koneksi-mcp-darwin-arm64
# Linux
GOOS=linux GOARCH=amd64 go build -o koneksi-mcp-linux-amd64
# Windows
GOOS=windows GOARCH=amd64 go build -o koneksi-mcp-windows-amd64.exe테스트
MCP 서버를 테스트합니다.
# Run the server
./koneksi-mcp
# In another terminal, send a test request
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | ./koneksi-mcpClaude를 사용한 예시 사용Example Usage with Claude
구성이 완료되면 다음과 같은 명령을 사용할 수 있습니다.
"/path/to/document.pdf 파일을 Koneksi 저장소에 업로드합니다."
"ID가 abc123인 파일을 데스크톱에 다운로드합니다."
"Koneksi 저장소에 있는 모든 디렉터리를 나열합니다."
"프로젝트 백업을 위해 'Project Files'라는 새 디렉터리를 만듭니다."
"xyz789 디렉터리의 모든 파일을 표시합니다."
"/path/to/important.doc 파일을 압축 및 암호화하여 백업합니다."
특허
MIT
Last updated