# Portal-MCP 계약 문서 이 디렉터리는 포털과 MCP Server 사이의 Tool Server registry 조회 계약을 관리한다. ```text Portal ──[portal-mcp 계약]──▶ MCP Server ──[tool-service-mcp 계약]──▶ Tool Server ▲ └──[agent-builder-mcp 계약]── Agent Builder ``` | 문서 | 상태 | 용도 | |---|---|---| | [protocol-v0.1-registry.md](protocol-v0.1-registry.md) | Implemented | route별 Tool Server 목록 조회 계약. 응답 형태, 필드, 실패 동작, 갱신 주기 | ## 현재 원칙 - 포털은 **route가 무엇이고 그 route에 어떤 Tool Server가 있는가**만 소유한다. `serviceDomain`과 `manifestPath`까지다. - Tool 목록과 Tool 실행 endpoint는 포털이 아니라 Tool Server 매니페스트에서 온다([ADR-0010](../../decisions/ADR-0010-tool-service-manifest-owns-execution-endpoint.md)). - registry 응답은 그 시점의 전체 상태다. 증분은 없다. - 조회 실패는 route 삭제가 아니다. 성공한 registry가 route를 제외했을 때만 제거를 반영한다. - route 조회는 서로 독립이지만, 한 route 안에서는 전부 아니면 전무다. 부분 목록으로 snapshot을 만들지 않는다. - MCP는 요청 경로에서 포털을 호출하지 않는다. route key 검증도 in-memory snapshot만 본다. ## 관련 문서 - 요청 URL의 route key 규약: [Agent Builder 계약 v0.3](../agent-builder-mcp/protocol-v0.3-streaming-policy.md#공개-url과-route-key) - 매니페스트 조회·실행 계약: [Tool Service 계약 v0.2](../tool-service-mcp/protocol-v0.2-bundle-discovery.md) ## 운영 적용 전 확정할 항목 1. 포털 API의 인증 방식과 MCP → 포털 방향 NetworkPolicy 2. `registryRevision`의 형식과 변경 통지 방식 3. route 추가·폐기 시 rolling 호환 기간 4. 저장소 샘플(`config/local-toolserver-info-sample-v1.json`, `deploy/portal-registry.json`)을 이 계약에 맞추는 시점 상세 필드와 장애 처리는 [v0.1 계약](protocol-v0.1-registry.md)을 따른다.