> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/ko/products/rome-cli.md).

# Rome CLI + MCP

Rome 개발자 CLI와 MCP 서버 — 근거 있는 체인 사실, 올바른 빌드 패턴, 그리고 사람이나 AI 에이전트를 위한 Rome 고유 작업(fund, deploy, verify).

`rome` 빌더—사람이든 AI 에이전트든—를 build-on-Rome 전체 라이프사이클에 걸쳐 안내합니다: 검증된 체인 정보, 올바른 패턴, 컨트랙트 호출, 자금 조달 온램프, deploy/send, 크로스-VM 진단, 그리고 양쪽 레인을 아우르는 works-gate. 하나의 핵심 기능, 두 개의 정렬된 표면 — CLI (`rome <command>`) 그리고 [MCP](https://modelcontextprotocol.io) 서버 (`rome mcp`) — 그래서 에이전트와 사람이 하나의 멘탈 모델을 공유합니다.

## 설치

저장소 우선(npm 배포 예정):

```bash
# 1회 실행, 설치 없음:
npx github:rome-protocol/rome-cli#v0.12.0 facts chain hadrian

# 영구 설치 — clone + link:
git clone --branch v0.12.0 https://github.com/rome-protocol/rome-cli
cd rome-cli && npm install && npm install -g .
```

일반적인 `npm install -g github:rome-protocol/rome-cli` 는 **가 아니라** 현재는 작동하지 않습니다 — npm이 패키지의 git 의존성을 자체 node\_modules 없이 준비하기[rome-cli#25](https://github.com/rome-protocol/rome-cli/issues/25)). 위의 npx 1회 실행 또는 clone + link를 사용하고, 위처럼 태그를 고정하세요: npx는 처음 가져온 복사본을 유지하므로, 고정하지 않은 `npx github:rome-protocol/rome-cli` 는 오래된 버전을 계속 실행할 수 있지만, 고정된 태그는 항상 그 버전을 가져옵니다.

## 하나의 코어 위의 두 계층

**읽기 — 근거 제시 + 진단.** 키 없음; CLI와 MCP 서버 모두에서.

| 명령                                                       | 반환값                                                                              |
| -------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `rome facts chain·tokens·contracts·gas·balance·programs` | 레지스트리 + RPC에서 가져온 실시간 체인 정보 — 추정된 id, 주소, 선택자 없음                                 |
| `rome cookbook patterns·cpi-recipe·errors`               | 어떤 예제가 목표에 맞는지 · 에이전트가 자주 틀리는 CPI 계정 규칙 · Rome 실패를 해석 → 원인 + 해결책                 |
| `rome call <chain> <addr> <sig> [args]`                  | 컨트랙트를 읽기 (`eth_call`) — 여러 값 인자는 하나의 인수에 쉼표로 구분해 넣습니다: `"0xOwner…,0xSpender…"`   |
| `rome doctor <chain>`                                    | 사전 점검 — 체인이 활성 상태인가? RPC에 연결 가능한가? 프로그램이 설정되었는가? 지갑에 자금이 있는가?                    |
| `rome tx <chain> <hash>`                                 | 트랜잭션 진단 — EVM 영수증 + Solana 정산 트랜잭션(들) + Via 링크 (Rome에는 `debug_traceTransaction`) |
| `rome preset foundry\|hardhat <chain>`                   | 사용 중인 툴체인에 맞는 준비된 Rome 네트워크 설정 + 특이사항                                            |

**작업 — 온체인 서명.** CLI 전용, 키는 환경에서 가져옴, **절대** MCP에서는.

| 명령                                                                         | 하는 일                                                                                                                                                                                                   |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `rome deploy <chain> <artifact>`                                           | 컴파일된 컨트랙트를 배포하며, Rome의 가스 특이사항을 처리합니다                                                                                                                                                                  |
| `rome send <chain> <addr> <sig>`                                           | 올바른 Rome 쓰기 경로를 통해 컨트랙트에 기록합니다                                                                                                                                                                         |
| `rome fund <chain> --from <src> --amount <usdc>`                           | USDC → Rome 가스(CCTP)로 브리지 — "집에서" 들어오는 온램프                                                                                                                                                             |
| `rome bridge <chain> --from <src> --amount <usdc> [--intent gas\|wrapper]` | USDC를 브리지 **을** 가스 또는 wUSDC로                                                                                                                                                                           |
| `rome bridge <chain> --to <dest> --amount <usdc>`                          | wUSDC를 브리지 **밖으로** — Rome에서 소각; 대상 체인에서 클레임합니다(Rome는 inbound를 지원하며 outbound 클레임은 지원하지 않습니다)                                                                                                            |
| `rome activate <chain>`                                                    | 선택적 PDA 자금 조달; out 브리지는 필요하지 않습니다. 브리지 컨트랙트(RomeBridgeWithdraw v12 이상)가 메시지 렌트를 지불하고 이를 가스로 청구하기 때문입니다                                                                                                 |
| `rome verify <chain> [--path …]`                                           | 그 **경로 인식 works-gate**, 진입 경로마다 하나씩: `solidity` — 동일한 컨트랙트가 EVM 레인에서 응답합니다 *그리고* Solana 레인 · `solana-program` — EVM 레인 호출이 CPI를 통해 Solana 프로그램을 구동합니다 · `홈 체인에서` — 브리지 인 → Rome에서 작업 → 브리지 아웃, 왕복이 입증됨 |

## AI 에이전트(MCP)에 연결하기

아무것도 실행하거나 호스팅할 필요가 없습니다 — MCP 클라이언트가 `rome mcp` 요청 시 (stdio 서버)를 실행합니다. 한 번만 등록하세요:

```json
{ "mcpServers": { "rome": { "command": "npx", "args": ["-y", "github:rome-protocol/rome-cli#v0.12.0", "mcp"] } } }
```

(clone + link 설치의 경우, `{ "command": "rome", "args": ["mcp"] }` 도 작동합니다 — npx 형식은 사전 설치가 필요 없을 뿐입니다.)

그런 다음 에이전트는 다음과 같은 도구를 호출합니다 `facts_chain`, `cookbook_cpi_recipe`, `doctor`, `tx`, 그리고 `preset` — 실시간 레지스트리 + RPC에 근거하므로, 주소와 선택자를 추측하지 않게 됩니다. MCP 표면은 **읽기 전용이며 키를 보유하지 않습니다** — 어떤 에이전트에 연결해도 안전합니다; 서명하거나 자금을 이동할 수 없습니다. 서명 작업은 CLI에 남고, 키는 환경 변수를 통해 제공됩니다.

## 에이전트 그라운딩 루프

1. `rome cookbook patterns <what I'm building>` → 어떤 예제 저장소 + 아키텍처인지
2. `rome facts chain <chain>` → RPC, 프로그램 ID, 가스 토큰(하드코딩 없음)
3. …그 정확한 값들을 바탕으로 코드를 작성…
4. `rome verify <chain> --path <your way in>` → 어떤 경로로 들어왔든 동작함을 증명

## 더 알아보기

* 저장소 + 전체 가이드: [`rome-protocol/rome-cli`](https://github.com/rome-protocol/rome-cli)
* [생태계 및 저장소](https://docs.rome.builders/ko/getting-started-1/ecosystem.md) · [듀얼 레인 앱 빌드](https://docs.rome.builders/ko/developer-guides/dual-lane-app.md) · [홈 체인에서: 다른 체인에서 Rome에 도달](https://docs.rome.builders/ko/developer-guides/from-home.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/ko/products/rome-cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
