feat: MCP 서버 추가 — AI 에이전트용 웹 검사 도구

Node.js + TypeScript MCP 서버 구현:
- 5개 도구: inspect_page, inspect_site, get_inspection, get_issues, get_history
- 듀얼 트랜스포트: stdio (Claude Desktop) + Streamable HTTP (Docker/원격)
- i18n 지원 (영어/한국어)
- Docker 통합 (port 3100) + Nginx /mcp 프록시
- Smithery 레지스트리 배포 설정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2026-02-14 15:44:35 +09:00
parent bffce65aca
commit 69e0f80282
51 changed files with 4327 additions and 0 deletions

View File

@ -0,0 +1,46 @@
import { ApiClient } from "../api-client.js";
import { t } from "../i18n/index.js";
export async function getHistory(
client: ApiClient,
lang: "en" | "ko",
url?: string,
limit?: number,
): Promise<string> {
const result = await client.getInspections(url, limit || 10);
const lines: string[] = [];
lines.push(`# ${t("get_history.title", lang)}`);
lines.push(`**${t("get_history.total", lang)}**: ${result.total}`);
if (url) {
lines.push(`**Filter**: ${url}`);
}
lines.push("");
if (result.items.length === 0) {
lines.push("No inspection records found.");
return lines.join("\n");
}
lines.push("| # | URL | Score | Grade | Issues | Date |");
lines.push("|---|---|---|---|---|---|");
for (let i = 0; i < result.items.length; i++) {
const item = result.items[i];
const date = item.created_at.split("T")[0];
const urlShort =
item.url.length > 50 ? item.url.slice(0, 47) + "..." : item.url;
lines.push(
`| ${i + 1} | ${urlShort} | ${item.overall_score} | ${item.grade} | ${item.total_issues} | ${date} |`,
);
}
lines.push("");
// Include inspection IDs for follow-up
lines.push("## Inspection IDs");
for (const item of result.items) {
lines.push(`- ${item.url}: \`${item.inspection_id}\``);
}
return lines.join("\n");
}