feat(contact): NAVER WORKS 연락처 API 지원 추가 (CLI + MCP) - #6
Merged
Conversation
개인 연락처(명함첩) API를 CLI와 MCP 양쪽에 노출한다. - CLI: nworks contact list/get/create/update/delete/list-tags - MCP: nworks_contact_list/_get/_create/_update/_delete/_list_tags - scope: contact/contact.read를 프리셋에 추가하고 contact -> contact.read 의존성을 등록한다. 없으면 기본 로그인 토큰으로 연락처 도구가 403이 난다. 타입은 실제 응답에 맞춘다. 연락처는 이름 하나에 이메일·전화·소속을 여러 개 달 수 있어 API가 emails/telephones/organizations를 배열로 돌려준다. 단수 필드로 접으면 두 번째 값부터 유실되므로 배열 그대로 노출한다. 이름 필드도 name이 아니라 contactName이다. create/update는 연락처 스펙이 넓고 자주 바뀌어 고정 스키마로 못 박지 않고 payload를 그대로 통과시키되, 실호출로 확인한 필수 필드(contactName, permission.accessibleMembers 최소 1명)를 도구 설명과 README에 명시한다. update/delete는 destructiveHint를 달아 클라이언트 승인 게이트를 태운다. 실제 계정으로 검증: 목록/태그 조회, 생성 -> 조회 -> 수정(전화번호 변경 반영 확인) -> 삭제 -> 삭제 후 NOT_FOUND까지 CLI와 MCP 양쪽에서 확인.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
개인 연락처(명함첩) API를 CLI와 MCP 도구로 노출합니다.
nworks contact list / get / create / update / delete / list-tagsnworks_contact_list/_get/_create/_update/_delete/_list_tags(26 → 32 tools)src/auth/scopes.ts에contact/contact.read추가 +contact → contact.read의존성 등록scope 프리셋을 함께 건드린 이유
프리셋에 넣지 않으면
--preset all로 로그인해도 연락처 도구가 전부 403(has not permission api scope)이 납니다. 기능이 실제로 동작하려면 필요한 변경입니다.구현 노트
타입을 실제 응답에 맞췄습니다. 연락처는 이름 하나에 이메일·전화·소속을 여러 개 달 수 있어 API가 배열로 돌려줍니다.
name이 아니라contactNameemails[],telephones[],organizations[]배열,contactTagIds[]배열email,tel)로 접으면 두 번째 값부터 조용히 사라지므로 배열 그대로 노출합니다create/update는 payload를 그대로 통과시킵니다. 연락처 스펙이 넓고 자주 바뀌어 zod로 고정하면 API 변경 때마다 도구가 막힙니다. 대신 실호출로 확인한 필수 조건을 도구 설명과 README에 명시했습니다.contactName,permission필수permission.accessibleMembers에 최소 1명 필요 (보통 본인,nworks whoami로 확인)INVALID_PARAMETER: permission is required./INSUFFICIENT: You must add at least 1 member.update/delete에는destructiveHint를 달아 클라이언트 승인 게이트를 태웁니다.검증
실제 NAVER WORKS 계정에서 CLI와 MCP 양쪽으로 전체 사이클을 돌렸습니다.
list/list-tagscreatecontactId발급, 이름·이메일·전화 반영 확인getupdate010-0000-0000→010-1234-5678, 재조회로 반영 확인delete[NOT_FOUND] The contact does not exist.MCP 경로에서도 6개 도구 등록·실호출·
destructiveHint확인했고, 테스트로 만든 연락처는 삭제해 잔존 데이터가 없습니다.npm run lint/npm test(54 passed) /npm run build통과.참고
문서의 도구 개수(32)는 이 PR만 머지되는 기준입니다. 다른 PR이 먼저 들어가면 해당 줄만 리베이스하겠습니다.