Copilot や Windsurf などの AI 搭載コード編集ツールを設定して、SOAtest を Model Context Protocol (MCP) サーバーとして使用できます。設定が完了すると、これらのツールは SOAtest を直接使用できるようになります。これは、SOAVirt WAR とデスクトップサーバーの両方で機能します。この機能を使用するには、「LLM 統合」が有効になっているライセンスが必要です。
SOAtest MCP サーバーの設定
SOAtest に MCP サーバーとしてアクセスするには、エンドポイント <BASE_URL>/soavirt/mcp を指定してツールを設定する必要があります。設定方法はいくつかあります。
現在の設定に追加する
現在の設定にエンドポイントを追加できます。例:
{
"servers": {
"soatest": {
"type": "http",
"url": "http://localhost:9080/soavirt/mcp",
"headers": {"Authorization": "Bearer <token>"}
}
}
}
VS Code で追加する
VS Code CLI を使用して、SOAtest MCP サーバーエンドポイントを追加できます。例:
Linux
code --add-mcp '{"name":"soatest","type":"http","url":"http://localhost:9080/soavirt/mcp"}'
Windows
"C:\Program Files\Microsoft VS Code\bin\code" --add-mcp {\"name\":\"soatest\",\"type\":\"http\",\"url\":\"http://localhost:9080/soavirt/mcp\"}
プロンプトの例
以下の例(公開されている ParaBank サイトを使用)は、SOAtest を MCP サーバーとして使用するように構成した後、AI 搭載コード編集ツールで実行できる操作の種類を示しています。それぞれの例にはレスポンスの例が含まれているので、どのようなフィードバックが得られるか参考になります。
- SOAtest を使用して https://parabank.parasoft.com/parabank/services/bank/customers/12212/accounts を取得します。レスポンスの例
Ran runRestClient - soatest (MCP server)The GET request to `https://parabank.parasoft.com/parabank/services/bank/customers/12212/accounts` was successful.The response contains a list of accounts for customer 12212 in XML format, including account IDs, types (CHECKING/SAVINGS), and balances. - どの口座にもマイナス残高がないことを確認します。レスポンスの例
Ran runAiAssertor - soatest (MCP server)The assertion failed: there are accounts with negative balances in the response.Specifically, account IDs 12345 and 12678 have balances of -2400.00 and -100.00, respectively.This violates the requirement that none of the accounts have a negative balance.
2番目のプロンプトで assert という言葉が使われていることに注意してください。LLM が特定のツール (この場合は AI Assertor) に誘導する用語を選択すると、LLM が最初から必要な情報を理解できるようになります。