Katatan MCP API は Model Context Protocol (MCP) を通じて AI エージェントがテスト管理機能を操作するインターフェースです。
エンドポイント: https://mcp.katatan.com/mcp(HTTP transport)
すべての通信は MCP プロトコルの tools/call リクエスト経由で行われます。HTTP ヘッダーはトランスポート層の設定として渡し、ツール引数にトークンを含める必要はありません。
Authorization: Bearer ヘッダーに MCP アクセストークンを指定します。
{
"mcpServers": {
"katatan": {
"type": "http",
"url": "https://api.katatan.com/mcp",
"headers": {
"Authorization": "Bearer kat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}KATATAN_TOKEN 環境変数にアクセストークンを指定します。
{
"mcpServers": {
"katatan": {
"type": "stdio",
"command": "node",
"args": ["dist/src/scripts/local-mcp.js"],
"env": {
"DATABASE_URL": "postgresql://...",
"KATATAN_TOKEN": "kat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}| 単位 | 上限 | 時間窓 |
|---|---|---|
| プロジェクトあたり(無料プラン) | 100回 | 1時間 |
| プロジェクトあたり(有料プラン) | プラン依存 | 1時間 |
レート制限超過時はエラーコード RATE_LIMIT_EXCEEDED が返ります。
すべてのツールは author パラメータを受け付けます。Audit ログおよびデータの createdBy/updatedBy に記録される操作者名です。未指定の場合はアクセストークンのUUIDが使用されます。
author: string(最大100文字、省略可)| フィールド | フォーマット | 例 |
|---|---|---|
| テスト仕様書 複合ID | {projectId}.{specUuid} |
proj-abc.550e8400-e29b-41d4-a716-446655440000 |
| テスト報告書 複合ID | {projectId}.{specUuid}.{reportUuid} |
proj-abc.550e8400....7f000001 |
ツール呼び出しがエラーになった場合、MCP レスポンスの isError: true フラグが立ち、content[0].text に以下の JSON が含まれます。
{
"error": {
"code": "ERROR_CODE",
"message": "エラーメッセージ",
"details": {}
}
}| コード | 原因 | 発生条件 |
|---|---|---|
AUTHENTICATION_ERROR |
認証失敗 | トークン未指定・無効・期限切れ |
AUTHORIZATION_ERROR |
認可失敗 | トークンに対象ツールの権限がない、プロジェクトアクセス不可 |
VALIDATION_ERROR |
入力値不正 | 必須パラメータ欠落・型不一致・文字数超過など |
NOT_FOUND |
リソース不存在 | 指定IDのリソースが存在しない |
CONFLICT |
競合 | 同一キーのエントリが既に存在する(Dictionary等) |
RATE_LIMIT_EXCEEDED |
レート制限超過 | 1時間あたりの呼び出し上限に達した |
QUOTA_EXCEEDED |
プランクォータ超過 | プランの利用上限リソース数に達した |
FEATURE_NOT_AVAILABLE |
機能利用不可 | 現在のプランでは使えない機能 |
INTERNAL_ERROR |
サーバー内部エラー | 予期しないエラー |
{
id: string // UUID
projectId: string // プロジェクトID
name: string // 仕様書名
description: string | null
webhookId: string | null
webhook: {
url: string
headers: Record<string, string> | null
} | null
requiredTesterEnv: string | null
requiredProductEnv: string | null
testCaseCount?: number // 一覧取得時のみ付与
labels?: Label[] // 一覧取得時のみ付与
createdBy: string | null
updatedBy: string | null
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
}{
id: string // UUID(内部ID)
specId: string // 所属仕様書UUID
index: number // 表示順(並び替え・削除で変動する)
caseNumber: number // 安定ID(UI表示: "case-{caseNumber}")
labels: Label[]
testSubject: string
preconditions: string | null
steps: string[]
expectedResult: string
notes: string | null
createdBy: string | null
updatedBy: string | null
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
}{
id: string // UUID
specId: string // 元となる仕様書UUID
name: string
notes: string | null
status: "NOT_STARTED" | "IN_PROGRESS" | "COMPLETED" | "ABORTED"
webhookEnabled: boolean
startedAt: string // ISO 8601
completedAt: string | null // 初回完了日時
lastCompletedAt: string | null
createdBy: string | null
updatedBy: string | null
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
reportResults?: TestReportResult[] // 詳細取得(get_test_report)時のみ付与
}{
id: string // UUID
reportId: string
testCaseId: string
testResult: "OK" | "NG" | "SKIP" | null
tester: string | null
notes: string | null
executionResultLink: string | null
resultRecordedAt: string | null // 結果入力日時
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
// スナップショット列(レポート作成時点のテストケース内容)
snapshotCaseNumber: number | null
snapshotTestSubject: string | null
snapshotPreconditions: string | null
snapshotSteps: string[] | null
snapshotExpectedResult: string | null
snapshotLabels: { id: string; name: string; color: string }[] | null
snapshotNotes: string | null
}{
id: string
workspaceId: string
name: string
color: "gray" | "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink"
createdBy: string | null
updatedBy: string | null
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
}{
id: string
projectId: string
key: string
value: string
description: string | null
createdBy: string | null
updatedBy: string | null
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
}| ツール名 | 説明 | 権限 | 処理方式 |
|---|---|---|---|
list_test_specs |
テスト仕様書一覧取得 | 全ユーザー | 同期 |
get_test_spec |
テスト仕様書詳細取得 | 全ユーザー | 同期 |
create_test_spec |
テスト仕様書作成 | Owner/Editor | 同期 |
update_test_spec |
テスト仕様書更新 | Owner/Editor | 同期 |
list_test_cases_by_spec |
仕様書配下のテストケース一覧取得 | 全ユーザー | 同期 |
list_test_cases |
全テストケース一覧取得 | 全ユーザー | 同期 |
get_test_case |
テストケース詳細取得 | 全ユーザー | 同期 |
create_test_case |
テストケース作成 | Owner/Editor | 同期 |
batch_create_test_cases |
テストケース一括作成(最大1000件) | Owner/Editor | 同期 |
update_test_case |
テストケース更新 | Owner/Editor | 同期 |
start_test |
テスト開始(報告書作成) | Owner/Editor | 同期 |
list_test_reports |
テスト報告書一覧取得 | 全ユーザー | 同期 |
get_test_report |
テスト報告書詳細取得 | 全ユーザー | 同期 |
update_test_report_result |
テスト結果更新(1件) | Owner/Editor | 非同期キュー経由 |
batch_update_test_results |
テスト結果一括更新(最大100件) | Owner/Editor | 同期 |
abort_test_report |
報告書中止 | Owner/Editor | 同期 |
reopen_test_report |
報告書再開 | Owner/Editor | 同期 |
force_complete_test_report |
報告書強制完了 | Owner/Editor | 同期 |
get_completion_summary |
消化率サマリー取得 | 全ユーザー | 同期 |
create_label |
ラベル作成 | Owner/Editor | 同期 |
list_labels |
ラベル一覧取得 | 全ユーザー | 同期 |
assign_labels_to_test_case |
テストケースへのラベル割り当て | Owner/Editor | 同期 |
create_dictionary_entry |
Dictionaryエントリ作成 | Owner/Editor | 同期 |
list_dictionary_entries |
Dictionaryエントリ一覧取得 | 全ユーザー | 同期 |
get_dictionary_entry |
Dictionaryエントリ取得 | 全ユーザー | 同期 |
update_dictionary_entry |
Dictionaryエントリ更新 | Owner/Editor | 同期 |
upload_test_case_image |
テストケースに画像を添付 | Owner/Editor | 同期 |
list_vulnerability_targets |
脆弱性チェック対象 URL 一覧取得 | 全ユーザー | 同期 |
list_vulnerability_reports |
脆弱性スキャンレポート一覧取得 | 全ユーザー | 同期 |
get_vulnerability_report |
脆弱性スキャンレポート詳細取得 | 全ユーザー | 同期 |