Skip to main content

MCP Documentation

Integrate Attorly's legal AI capabilities into your applications using the Model Context Protocol (MCP)

Getting Started

Set up your MCP integration in minutes

1. Create an API Key

Go to Settings > MCP in your dashboard and create a new connection. Select the scopes (permissions) your integration needs.

Open Settings

2. Make Your First Request

Initialize the connection with the MCP server:

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 Available Tools

Discover what tools are available with your permissions:

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. Call a Tool

Execute a tool to analyze a document:

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