MCPドキュメント
Model Context Protocol(MCP)を使用してAttorlyの法務AI機能をアプリケーションに統合する
はじめに
MCP統合を数分で設定する
2. 最初のリクエスト
MCPサーバーとの接続を初期化します:
curl -X POST https://attorly.ai/api/mcp \
-H "Authorization: Bearer lbmcp_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "your-client",
"version": "1.0.0"
}
}
}'3. 利用可能なツールの一覧
お使いの権限で利用可能なツールを確認します:
curl -X POST https://attorly.ai/api/mcp \
-H "Authorization: Bearer lbmcp_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}'4. ツールの呼び出し
ツールを実行してドキュメントを分析します:
curl -X POST https://attorly.ai/api/mcp \
-H "Authorization: Bearer lbmcp_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "documents/analyze_quick",
"arguments": {
"content": "This Agreement is entered into..."
}
}
}'