Files
vpd-permission-poc/vpd-backoffice/src/main/resources/templates/mcp-sse.html

160 lines
5.7 KiB
HTML

<!doctype html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/layout :: head('MCP 연동')}"></head>
<body>
<nav th:replace="~{fragments/layout :: nav}"></nav>
<main class="container page-shell">
<section class="page-heading">
<h1>MCP 연동</h1>
<details class="explanation-details">
<summary>도움말</summary>
<p>사용자 Bearer Token을 검증한 뒤 <code>SGMP_POC_HAIKU45</code> Select AI 프로파일로 게임 데이터 Text2SQL을 생성하는 단일 MCP tool을 제공합니다. Select AI는 comment, annotation, constraint 메타데이터를 함께 사용하며, 생성 SQL은 자동 실행하지 않습니다.</p>
</details>
</section>
<section th:if="${runtimeError}" class="alert alert-warning">
<strong th:text="${runtimeError.title()}">DB 연결 설정이 필요합니다.</strong>
<div th:text="${runtimeError.message()}">DB 연결을 확인할 수 없습니다.</div>
</section>
<section class="content-band">
<h2>서비스 구성</h2>
<div class="mcp-service-grid">
<div class="mcp-service-item">
<span>공개 MCP Endpoint</span>
<strong><code th:text="${hmmMcpPublicUrl}">https://example.com/mcp</code></strong>
<small>Private Agent Factory와 외부 MCP client가 사용하는 Streamable HTTP Endpoint입니다.</small>
</div>
<div class="mcp-service-item">
<span>인증</span>
<strong><code>Authorization: Bearer &lt;사용자 토큰&gt;</code></strong>
<small>선택 사용자의 활성 토큰으로 인증합니다. DB 비밀번호와 Wallet은 전달하지 않습니다.</small>
</div>
<div class="mcp-service-item">
<span>도구 수</span>
<strong th:text="${#lists.size(tools) + '개'}">0개</strong>
<small>배포 환경의 MCP 도구 allowlist가 적용됩니다.</small>
</div>
</div>
</section>
<section class="content-band">
<details class="explanation-details">
<summary>Endpoint 상세 보기</summary>
<h2>Endpoint</h2>
<div class="table-responsive">
<table class="table align-middle">
<tbody>
<tr>
<th>MCP</th>
<td><code th:text="${hmmMcpPublicUrl}">https://example.com/mcp</code></td>
</tr>
<tr>
<th>Transport</th>
<td>Streamable HTTP</td>
</tr>
<tr>
<th>백오피스 호환 Endpoint</th>
<td><code>/mcp</code> — 같은 설정 기반 도구 계약을 제공합니다.</td>
</tr>
<tr>
<th>Auth</th>
<td><code>Authorization: Bearer &lt;사용자 토큰&gt;</code> — 활성 업무 사용자 토큰입니다.</td>
</tr>
<tr>
<th>Methods</th>
<td><code>initialize</code>, <code>tools/list</code>, <code>tools/call</code></td>
</tr>
</tbody>
</table>
</div>
</details>
</section>
<section class="content-band">
<h2>Tools</h2>
<div class="table-responsive">
<table class="table align-middle">
<thead>
<tr>
<th>Name</th>
<th>Object</th>
<th>실행 대상</th>
<th>Instruction</th>
</tr>
</thead>
<tbody>
<tr th:each="tool : ${tools}">
<td><code th:text="${tool.name()}">ords.query.admin.board_posts</code></td>
<td th:text="${tool.displayName()}">ADMIN.BOARD_POSTS</td>
<td><code th:text="${tool.ordsPath()}">AGENT_TOOL_OR_SELECT_AI</code></td>
<td>
<div th:text="${tool.description()}">ORDS 행 접근 조회 도구 설명</div>
<small class="text-muted">
HTTP <code>Authorization</code> → 활성 PoC 사용자 토큰 검증 · <code>prompt</code> → 게임 데이터 Text2SQL 생성 · 결과 SQL은 검토 후 별도 실행
</small>
</td>
</tr>
<tr th:if="${#lists.isEmpty(tools)}">
<td colspan="4" class="text-muted">등록된 MCP tool이 없습니다.</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="content-band">
<details class="explanation-details">
<summary>tools/call parameter 예시 보기</summary>
<h2>tools/call Arguments</h2>
<pre class="code-block">{
"prompt": "카제나의 최신 BASE_DT 기준 AU(활성 사용자 수)를 조회하는 SQL을 만들어줘."
}</pre>
<p class="form-hint">등록 tool은 <code>oracle.select_ai.smilegate_game_text2sql</code> 하나입니다. 활성 사용자 Bearer Token을 확인한 뒤 <code>SGMP_POC_HAIKU45</code>가 comment, annotation, constraint를 참고해 읽기 전용 게임 데이터 SQL을 생성합니다. 실행은 자동으로 수행하지 않습니다.</p>
</details>
</section>
<section class="content-band">
<details class="explanation-details">
<summary>JSON-RPC 예시 보기</summary>
<h2>JSON-RPC 예시</h2>
<div class="probe-exchange-grid">
<div class="probe-exchange">
<h3>initialize</h3>
<pre>{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {}
}</pre>
</div>
<div class="probe-exchange">
<h3>tools/list</h3>
<pre>{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}</pre>
</div>
<div class="probe-exchange">
<h3>tools/call</h3>
<pre>{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "oracle.select_ai.smilegate_game_text2sql",
"arguments": {
"prompt": "카제나의 최신 BASE_DT 기준 AU(활성 사용자 수)를 조회하는 SQL을 만들어줘."
}
}
}</pre>
</div>
</div>
</details>
</section>
</main>
</body>
</html>