원격 Plugin MCP
Remote Plugin MCP는 파일시스템이 없는 AI client가 Morit 조직의 Cloud Project를 만들고 검증·배포할 수 있게 하는 OAuth 보호 Streamable HTTP 서비스입니다.
https://morit-api.moring.co/mcp
인증 전 응답은 401과 RFC 9728 protected-resource metadata 위치를 반환합니다. Morit SSO의
authorization code + PKCE 흐름으로 로그인하며 승인된 scope와 사용자 RLS를 모든 Tool에 적용합니다.
연결
Codex:
codex mcp add morit-plugin-remote --url https://morit-api.moring.co/mcp
codex mcp login morit-plugin-remote
Claude Code:
claude mcp add --transport http --scope user \
morit-plugin-remote https://morit-api.moring.co/mcp
Tool 목록
계약과 문서
조직과 Project
검증과 artifact
Deployment
Secret과 Connection
Secret Tool은 평문을 반환하지 않습니다. source, log, Tool 응답에 Secret 값을 복사하지 마세요.
ID와 경로
- organization, Project, Deployment, artifact ID는
format: uuid입니다. - Manifest plugin ID는 소문자 reverse-domain ID입니다.
- source path는 상대 POSIX 형식입니다.
.., 역슬래시, 절대 경로, Windows 예약명, symlink는 거부합니다.manifest.json은 삭제할 수 없습니다.- 한 파일 512 KiB, source 최대 64개 파일·1 MiB입니다.
- 한
files_put변경은 최대 64개입니다.
AI가 UUID나 경로를 추측하지 않고 list/create/get 결과를 그대로 다음 Tool에 전달해야 합니다.
응답 추적과 큰 결과
모든 Tool 성공은 ok, request_id, tool, result, elapsed_ms envelope를 반환합니다. 실패는
MCP isError와 함께 같은 request_id, error.code/message/details, retryable을 반환합니다.
클라이언트는 일반적인 “Tool 실패” 대신 이 메시지와 request ID를 사용자에게 표시하고,
retryable: true일 때만 OAuth 갱신·재연결 후 재시도합니다.
morit_project_files_get(project_id, cursor=0, limit=8, paths?)은 기존 project_id 단독 호출을
유지하면서 file_count(Project 전체), selected_file_count(paths 적용 후),
returned_file_count(현재 page)를 구분합니다. partial: true이면 next_cursor와 그대로 호출할 수
있는 next_request가 반드시 있으며, paths를 사용하지 않은 page는 MCP resources/read가 실제로
읽을 수 있는 next_resource_uri도 제공합니다. 마지막 page는 complete: true,
next_cursor: null입니다. 응답 크기 때문에 본문을 분리한 경우 truncation_reason이
response_size_limit이고 해당 파일의 resource_uri로 원문을 읽습니다.
Binary source는 files 본문에 넣지 않습니다. binary_files의 path, MIME, byte size, SHA-256과
artifact_uri를 반환하며 해당 URI는 인증된 MCP resources/read에서 원래 bytes를 제공합니다.
큰 일반 결과도 morit://responses/... resource로 전환되며 cursor가 끝날 때까지 읽어야 합니다.
HTTP 200이더라도 body나 result가 비어 있으면 성공이 아닙니다.
Revision과 파일 변경
{
"project_id": "00000000-0000-4000-8000-000000000000",
"revision": 3,
"files": {
"ui/home.json": "{...}\n",
"ui/old.json": null
}
}
null은 파일 삭제입니다. revision이 오래되면 전체 요청을 거부하고 최신 source를 반환하므로
files_get → 변경 병합 → files_put을 반복합니다. conflict를 force로 숨기지 않습니다.
이미지 asset과 child .mplg는 morit-base64-v1:<canonical-base64> binary envelope로만 JSON
경계를 지나며 MIME magic과 경로를 검증합니다. 최종 source ZIP과
package에서는 원래 바이트로 복원됩니다.
Theme/Storage를 생성·수정할 때는 contract의 ui_runtime.theme_*, storage_tools,
storage_ai_access, storage_limits를 기준으로 Manifest와 UI fragment를 함께 변경합니다. Remote
MCP validation은 Host와 같은 잘못된 token, 확정적으로 보이지 않는 색 조합, namespace/permission,
migration과 binding 오류를 거부하고 정적으로 확정하기 어려운 대비는 warning으로 반환합니다.
Build와 다운로드
morit_build_start
→ job_id와 deployment_id
morit_build_status 반복
→ completed + artifact_id + size + sha256
morit_deployment_get
→ exact artifact hash와 visibility
morit_artifact_download
→ 짧은 수명 URL
morit_build_start에는 client가 생성한 안정적인 idempotency_key를 전달합니다. timeout이나
재연결 뒤 같은 key로 재시도하면 기존 job/deployment를 반환하므로 중복 build가 생기지 않습니다. status가
failed이면 logs의 공개 진단을 source에 반영하고 새 build를 시작합니다. processing을 완료로
간주하지 않습니다.
Protocol compatibility
서비스는 직접 tools/list/tools/call을 보내는 최신 handshake-free client와
initialize → initialized → Tool 호출 방식의 client를 모두 지원합니다. MCP-Protocol-Version과
Mcp-Method/Mcp-Name 같은 routing header는 서버가 협상한 값과 맞춰야 합니다. 지원 protocol
date는 서비스 응답을 사용하며 client가 임의로 고정하지 않습니다.
복구
로컬 파일을 직접 편집해야 하면 Local MCP를 사용합니다. Remote 서비스에 local absolute path나 publisher private key를 전달하지 않습니다.