MCP 서버(Node.js)의 연결
AI 어시스턴트가 Koneksi Storage에 접근하여 안전한 파일 저장 및 백업 작업을 수행할 수 있도록 지원하는 Node.js 기반 MCP(Model Context Protocol) 서버입니다.
특징
Koneksi Storage에 파일 업로드
Koneksi Storage에서 파일 다운로드
디렉토리 생성 및 관리
파일 나열 및 검색
선택적인 압축 및 암호화를 통한 파일 백업
API 키를 사용한 안전한 인증
경량 Node.js 구현
설치
저장소를 복제합니다.
git clone <repository-url>
cd mcp-server-nodejs종속성을 설치합니다.
npm installKoneksi API 자격 증명을 구성하세요.
cp .env.example .env
# Edit .env with your API credentials구성
.env 파일에서 다음 환경 변수를 설정하세요.
KONEKSI_API_CLIENT_ID: Your Koneksi API client IDKONEKSI_API_CLIENT_SECRET: Your Koneksi API client secretKONEKSI_API_BASE_URL: (Optional) Koneksi API base URL
용법
클로드 데스크탑과 함께
Claude Desktop 구성에 서버를 추가합니다. (claude_desktop_config.json):
{
"mcpServers": {
"koneksi": {
"command": "node",
"args": ["/path/to/mcp-server-nodejs/src/index.js"],
"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
개발
서버를 실행합니다:
npm start자동 다시 로드를 사용하여 개발 모드에서 실행:
npm run dev테스트
MCP 서버를 테스트합니다.
# Run the server
npm start
# In another terminal, send a test request
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | npm startClaude를 사용한 예시 사용
구성이 완료되면 다음과 같은 명령을 사용할 수 있습니다.
"/path/to/document.pdf 파일을 Koneksi 저장소에 업로드합니다."
"ID가 abc123인 파일을 데스크톱에 다운로드합니다."
"Koneksi 저장소에 있는 모든 디렉터리를 나열합니다."
"프로젝트 백업을 위해 'Project Files'라는 새 디렉터리를 만듭니다."
"xyz789 디렉터리의 모든 파일을 표시합니다."
"/path/to/important.doc 파일을 압축 및 암호화하여 백업합니다."
Go 구현과의 차이점
이 Node.js 구현은 Go 버전과 정확히 동일한 MCP 인터페이스를 제공합니다.
도구 이름 및 매개변수
JSON-RPC 프로토콜 처리
응답 형식
환경 변수 구성
주요 차이점은 다음과 같습니다.
Go 대신 JavaScript/Node.js로 작성됨
HTTP 요청에 Go의 net/http 대신 axios를 사용함
파일 처리는 Node.js fs 모듈을 사용함
특허
MIT
Last updated