---
title: 코딩 에이전트 연결
description: Claude Code·Codex·OpenCode·OMP를 설치하고 API key를 비공개로 연결한 뒤 기존 프로젝트를 확인하세요.
url: https://docs.thegram.one/ko/guides/local-setup/
lang: ko
tier: current
editorial_sources:
  - https://thegram.one/install/agents.md
  - https://github.com/thegram-one/thegram-mcp
---

# 코딩 에이전트 연결

## 사용할 코딩 에이전트 선택 {#h0-5}

### Claude Code

```sh
claude mcp remove --scope user thegram >/dev/null 2>&1 || true
claude plugin marketplace add thegram-one/thegram-mcp || claude plugin marketplace update thegram-memory
claude plugin install thegram-memory@thegram-memory
claude plugin update thegram-memory@thegram-memory || true
```

### Codex

```sh
codex mcp remove thegram >/dev/null 2>&1 || true
codex plugin remove thegram@thegram-local >/dev/null 2>&1 || true
codex features enable hooks
codex plugin marketplace add thegram-one/thegram-mcp || codex plugin marketplace upgrade
codex plugin add thegram-memory@thegram-memory
```

### OpenCode

```sh
opencode plugin add github:thegram-one/thegram-mcp
```

### OMP

```sh
omp plugin marketplace add thegram-one/thegram-mcp || true
omp plugin install thegram-memory@thegram-memory
omp plugin marketplace update thegram-memory
omp plugin upgrade thegram-memory@thegram-memory --scope user
```

Source: https://thegram.one/install/agents.md

## 연결 전 확인

Node.js 22+와 최신 coding plugin을 사용하세요. 위에서 선택한 도구의 명령만 실행합니다. 실행 중인 Mac 앱·DMG·로컬 socket은 필요하지 않습니다. 설치만으로 계정 권한이나 프로젝트가 만들어지지 않습니다.

## 2. API key를 비공개로 연결

1. [Thegram](https://vault.thegram.one/)에서 **Settings → Agents → API keys**를 엽니다.
2. key 이름, 필요한 Vault·권한과 만료일을 검토합니다. Drive는 별도 연결과 권한이 필요합니다.
3. 한 번만 표시되는 secret을 복사합니다. 채팅·저장소·명령 인자·shell history에는 넣지 마세요.
4. 에이전트에게 설치된 plugin 경로를 찾게 하고, 본인의 터미널에서 `<installed-plugin>`을 실제 경로로 바꿔 실행합니다.

```sh
node <installed-plugin>/dist/thegram-memory.mjs connect
node <installed-plugin>/dist/thegram-memory.mjs doctor
```

숨김 prompt에 key를 입력합니다. POSIX에서는 설정 디렉터리 `0700`, credential 파일 `0600`으로 저장됩니다. `connect`는 Vault나 문서 대상을 선택·저장하지 않습니다.

**정상 결과:** `doctor`가 Cloud endpoint와 정확한 기존 repository project 문서를 보여줍니다. nonzero exit라면 연결·권한·association 원인을 먼저 해결하세요.

## 3. 기존 프로젝트 연결 {#h0-19}

설치 뒤 새 agent 세션을 시작하세요. adapter는 허용된 Vault 문서에서 정확한 `repo:<host>/<repository-path>` tag를 가진 기존 project record를 검색합니다. 같은 origin의 worktree는 identity를 공유합니다. 고정 경로, 선택한 Vault, `projects.json`은 저장 대상을 결정하지 않습니다.

기존 문서에 tag만 없다면 정확한 문서와 변경을 검토·승인한 뒤 한 번 연결합니다.

```sh
node <installed-plugin>/dist/thegram-memory.mjs bind --document @mounts/<vault-id>/<document>.gram [--project <id>]
```

`bind`는 해당 기존 문서의 쓰기 권한이 필요합니다. project record가 여러 개라면 `--project`를 지정하세요. 알려진 non-Git identity에는 공개 CLI의 `--repository <host>/<repository-path>`를 명시할 수 있지만 값을 추측하면 안 됩니다. 연결 뒤 host 세션을 다시 시작하세요.

association 없음·중복은 중단 상태입니다. 자동으로 대체 문서를 만들지 않습니다. 프로젝트가 아예 없다면 목적과 저장 대상을 먼저 승인하고 별도로 생성하세요.

## 4. 읽기 전용 확인

```text
이 프로젝트에 대해 Thegram이 기억하는 내용을 기존 문서에서 읽고 출처를 알려줘. 레코드를 생성하거나 바꾸지 마. repository association이 없거나 중복이면 다른 문서를 고르지 말고 정확한 문제를 설명해줘.
```

**정상 결과:** 의도한 기존 프로젝트를 읽거나, 해결할 association을 명확히 설명합니다. read-only key로 문서를 초기화하면 안 됩니다.

## 업데이트와 연결 해제

OMP는 위의 전체 marketplace ID를 사용합니다. bare `thegram-memory`는 upgrade 대상이 아닙니다. 업데이트 후 새 세션을 시작하세요.

CLI `disconnect`는 로컬 credential만 지웁니다. 서버 접근을 중단하려면 Thegram에서 key를 revoke합니다. [권한](/ko/guides/permissions/) · [오류별 해결](/ko/guides/troubleshooting/).
