157
vpd-backoffice/src/main/resources/templates/mcp-sse.html
Normal file
157
vpd-backoffice/src/main/resources/templates/mcp-sse.html
Normal file
@@ -0,0 +1,157 @@
|
||||
<!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>환경 설정으로 승인한 MCP 도구만 제공합니다. <code>tools/list</code>의 설명과 입력 스키마를 확인한 뒤 사용자 Bearer Token으로 호출하세요.</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 <사용자 토큰></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 <사용자 토큰></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">정확한 argument 이름과 필수 여부는 <code>tools/list.inputSchema</code>를 사용합니다.</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">{
|
||||
"<tools/list의 argument 이름>": "<조회할 자연어 질문>"
|
||||
}</pre>
|
||||
<p class="form-hint">도구명, 설명, argument 이름은 배포 환경에서 바뀔 수 있으므로 <code>tools/list</code> 결과를 기준으로 호출합니다.</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": "<tools/list의 name>",
|
||||
"arguments": {
|
||||
"<required argument>": "조회할 자연어 질문"
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user