各種AIエージェントやCI/CDツールとHuman Testerを連携する方法をまとめています。
@human-tester/mcp-server
MCP対応AIエージェントから人間テスターサービスを利用するためのサーバー
# npx経由で自動インストール(推奨)
npx @human-tester/mcp-server
# グローバルインストール
npm install -g @human-tester/mcp-server
# プロジェクトにインストール
npm install @human-tester/mcp-serverAnthropicの公式CLIツール。MCP設定ファイルに追加するだけで連携可能。
設定
// .claude/mcp.json
{
"mcpServers": {
"human-tester": {
"command": "npx",
"args": ["-y", "@human-tester/mcp-server"],
"env": {
"HT_API_KEY": "ht_live_your_api_key"
}
}
}
}使い方
「このLPを5人のユーザーにUXテストしてもらって」 → AIが自動的にcreate_testツールを呼び出し、テストを作成します
AI搭載のコードエディタ。設定画面のMCPセクションから連携設定を追加。
設定
// .cursor/mcp.json
{
"mcpServers": {
"human-tester": {
"command": "npx",
"args": ["-y", "@human-tester/mcp-server"],
"env": {
"HT_API_KEY": "ht_live_your_api_key"
}
}
}
}使い方
Cursorのチャットで「前回のテスト結果を見せて」 → get_test_resultsツールが呼び出され、結果がチャット上に表示されます
任意のHTTPクライアントからREST API経由で直接呼び出し。CI/CDパイプラインへの組み込みにも最適。
設定
# テストを作成する
curl -X POST https://human-tester.jp/api/tests \
-H "Authorization: Bearer ht_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"title": "新機能のUX評価",
"description": "新しい機能の使いやすさをテスト",
"category": "ux_test",
"target_url": "https://your-app.com",
"target_testers": 5,
"test_scenario": {
"tasks": [
{
"instruction": "トップページの第一印象を教えてください",
"evaluation_items": [
{ "label": "見やすさ", "type": "rating_5" },
{ "label": "改善点", "type": "free_text" }
]
}
]
}
}'使い方
# テスト結果を取得する
curl https://human-tester.jp/api/tests/{testId}/results \
-H "Authorization: Bearer ht_live_your_api_key"fetch APIを使ったプログラムからの直接呼び出し。
設定
const API_KEY = process.env.HT_API_KEY;
const BASE_URL = "https://human-tester.jp";
// テストを作成
const res = await fetch(`${BASE_URL}/api/tests`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "新LP UXテスト",
description: "LPの第一印象と使いやすさを評価",
category: "ux_test",
target_url: "https://example.com",
target_testers: 5,
test_scenario: {
tasks: [{
instruction: "トップページの第一印象を教えてください",
evaluation_items: [
{ label: "見やすさ", type: "rating_5" },
{ label: "改善点", type: "free_text" }
]
}]
}
}),
});
const data = await res.json();
console.log(data.test.id); // テストID使い方
// 結果を取得
const results = await fetch(
`${BASE_URL}/api/tests/${testId}/results`,
{ headers: { "Authorization": `Bearer ${API_KEY}` } }
).then(r => r.json());
console.log(results.summary.key_findings);| 変数名 | 説明 | 必須 |
|---|---|---|
HT_API_KEY | APIキー(ht_live_ で始まる。ダッシュボードで発行) | 必須 |
HT_API_URL | APIのベースURL(デフォルト: https://human-tester.jp) | 任意 |