Hopp til hovedinnhold

MCP-dokumentasjon

Integrer Attorlys juridiske AI-funksjonalitet i applikasjonene dine ved hjelp av Model Context Protocol (MCP)

Komme i gang

Sett opp din MCP-integrasjon på minutter

1. Opprett en API-nøkkel

Gå til Innstillinger > MCP i dashbordet ditt og opprett en ny tilkobling. Velg omfangene (tillatelsene) integrasjonen din trenger.

Åpne innstillinger

2. Gjør din første forespørsel

Initialiser tilkoblingen med MCP-serveren:

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. List opp tilgjengelige verktøy

Oppdag hvilke verktøy som er tilgjengelige med dine tillatelser:

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. Kall et verktøy

Utfør et verktøy for å analysere et dokument:

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..."
    }
  }
}'