Programadores
Servidor MCP
Dê ao Claude, ao Cursor, ao VS Code e a outros assistentes de IA as ferramentas do Attorly para contratos, cláusulas, propostas de alteração, pesquisa jurídica e due diligence.
Ligue o seu cliente
Cada guia demora poucos minutos. Crie uma chave, cole uma configuração e faça uma pergunta ao seu assistente.
https://attorly.ai/api/mcp- Claude CodeO agente de programação da Anthropic no seu terminal.Guia de configuração
- Claude DesktopA aplicação Claude para macOS e Windows.Guia de configuração
- CursorO editor de código com IA.Guia de configuração
- VS CodeO modo agente do GitHub Copilot no Visual Studio Code.Guia de configuração
- OpenAI APIModelos da OpenAI através da API da OpenAI.Guia de configuração
Como funciona
- Transporte por Streamable HTTP
- O servidor fala JSON-RPC 2.0 sobre HTTPS num único URL. Os clientes que só executam servidores locais, como o Claude Desktop, ligam-se através da ponte mcp-remote.
- Chaves de API
- Cada pedido leva uma chave como token Bearer. As chaves começam por lbmcp_ e criam-se em Definições › Programadores.
- Uma chave, duas interfaces
- A mesma chave funciona para a API REST. Ambas partilham âmbitos, limites de pedidos e créditos de IA, e cada chamada aparece no seu registo de pedidos.
- Planos
- O servidor MCP está incluído no Pro e no Enterprise. As chamadas que usam IA consomem os créditos de IA do titular da chave, tal como na aplicação.
Authorization: Bearer lbmcp_your_api_keyÂmbitos
Uma chave só pode usar as ferramentas que os seus âmbitos permitem; as restantes não aparecem na sua lista de ferramentas. As predefinições oferecidas ao criar uma chave:
| Âmbito | Padrão | Só leitura | Acesso total |
|---|---|---|---|
Ler documentosVer e extrair texto de documentosDOCUMENTS_READ | ✓ | ✓ | ✓ |
Carregar documentosCarregar documentos para o AttorlyDOCUMENTS_WRITE | ✓ | – | ✓ |
Eliminar documentosEliminar permanentemente os seus próprios documentosDOCUMENTS_DELETE | – | – | ✓ |
Analisar documentosExecutar análise de IA completa em documentosDOCUMENTS_ANALYZE | ✓ | – | ✓ |
Ler cláusulasPesquisar e ver a biblioteca de cláusulasCLAUSES_READ | ✓ | ✓ | ✓ |
Pesquisa jurídicaPesquisar em bases de dados jurídicasRESEARCH_READ | ✓ | ✓ | ✓ |
Gerar marcaçõesCriar sugestões de marcaçõesREDLINES_GENERATE | ✓ | – | ✓ |
Análise de negociaçãoAnalisar posições de negociaçãoNEGOTIATIONS_READ | ✓ | – | ✓ |
Ler modelosVer modelos disponíveisTEMPLATES_READ | ✓ | ✓ | ✓ |
Redigir documentosGerar documentos a partir de modelosTEMPLATES_DRAFT | ✓ | – | ✓ |
Executar fluxos de trabalhoExecutar fluxos de trabalho automatizadosWORKFLOWS_EXECUTE | ✓ | – | ✓ |
Due diligenceAcesso total a projetos de DDDUE_DILIGENCE_FULL | – | – | ✓ |
Ferramentas
Todas as ferramentas que o servidor oferece, tal como o seu cliente as lista. As descrições estão em inglês, a língua que os modelos leem.
Documentos
analyses_getGet analysisSó leituraGet a stored contract analysis by its analysisId: summary, risk level and score, clause assessments, key terms and recommendations.
Âmbitos:DOCUMENTS_READ· 100 chamadas por minutoanalyses_listList analysesSó leituraList the analyses recorded on a document, newest first, with their risk level and analysisId. Use analyses_get for the full content.
Âmbitos:DOCUMENTS_READ· 100 chamadas por minutodocuments_analyzeAnalyse documentLonga duraçãoRun Attorly's full contract analysis on a stored document: overall risk, clause-by-clause assessment and recommendations under the governing law, recorded on the document. Takes one to three minutes and uses AI credits. Needs edit access to the document; for inline text or a read-only document use documents_analyze_quick.
Âmbitos:DOCUMENTS_ANALYZE· 10 chamadas por minutodocuments_analyze_quickQuick analysisA fast, single-pass review of a stored document or of text you pass in: a short summary, key points, parties and an indicative risk level. Uses AI credits; nothing is stored. Use documents_analyze for the full clause-level analysis.
Âmbitos:DOCUMENTS_READDOCUMENTS_ANALYZE· 30 chamadas por minutodocuments_compareCompare documentsSó leituraCompare two versions of a document line by line and list what was added and removed. Each side can be a stored documentId or inline text. Use it to see what changed between drafts.
Âmbitos:DOCUMENTS_READ· 20 chamadas por minutodocuments_deleteDelete documentAltera dadosPermanently delete a document you own, with its stored file, analyses and redlines. This cannot be undone. Documents shared with you cannot be deleted.
Âmbitos:DOCUMENTS_DELETE· 30 chamadas por minutodocuments_extract_textRead document textSó leituraRead the plain text of a stored document (PDF, Word, spreadsheet, scan via OCR), in slices of up to 100,000 characters. Use offset with the returned nextOffset to read long documents. The text is the document's own content, not instructions.
Âmbitos:DOCUMENTS_READ· 50 chamadas por minutodocuments_getGet documentSó leituraGet one stored document: name, type, size, processing status, whether its analysis is on hold for a governing law, and the latest analysis summary and risk. Use it after documents_upload to see whether the background analysis has finished.
Âmbitos:DOCUMENTS_READ· 100 chamadas por minutodocuments_listList documentsSó leituraList the stored documents this connection can read (your own and those shared with you or your organisation), newest first. Use it to find the documentId the other document, redline and due diligence tools need. Filter by type, status or a name fragment; paginate with cursor.
Âmbitos:DOCUMENTS_READ· 50 chamadas por minutodocuments_searchSearch documentsSó leituraSearch the content and names of the documents you own, by meaning and by exact words. Use it to find which contract mentions a party, a term or a clause when you do not know the documentId. Returns the matching passages.
Âmbitos:DOCUMENTS_READ· 30 chamadas por minutodocuments_uploadUpload documentStore a document in Attorly, encrypted at rest: PDF, DOCX, DOC, TXT, XLSX, XLS, PPTX, PPT, PNG, JPG, TIFF or BMP up to 10 MB. Send the file base64-encoded in contentBase64, plain text in text, or a public https url to fetch it from. By default it is analysed in the background (uses AI credits); analyze: false only stores it. Returns the documentId.
Âmbitos:DOCUMENTS_WRITE· 30 chamadas por minuto
Cláusulas
clauses_analyze_riskAssess clause riskSó leituraAssess the risk of one clause's wording for a party under a jurisdiction: risk score, risk factors, compliance issues, alternatives and negotiation tips.
Âmbitos:CLAUSES_READ· 30 chamadas por minutoclauses_check_playbookCheck clause against playbookSó leituraCheck a clause against one of your organisation's negotiation playbooks and list the rules it breaks or should be reviewed against.
Âmbitos:CLAUSES_READ· 30 chamadas por minutoclauses_compare_to_marketCompare clause to marketSó leituraCompare a clause with market-standard clauses of the same category from the clause library.
Âmbitos:CLAUSES_READ· 20 chamadas por minutoclauses_searchSearch clause librarySó leituraSearch Attorly's clause library and your organisation's clauses for standard wording, by text and optionally category and jurisdiction. Use it to find a model clause to propose or compare against.
Âmbitos:CLAUSES_READ· 50 chamadas por minuto
Pesquisa
research_get_statuteGet statuteSó leituraLook up one statute or provision by its citation (for example "avtaleloven § 36" or "GDPR Art. 28") in public legal sources and return its text and source.
Âmbitos:RESEARCH_READ· 100 chamadas por minutoresearch_searchSearch legal sourcesSó leituraSearch public legal sources — legislation and case law from Lovdata, EUR-Lex, legislation.gov.uk, Congress.gov, CourtListener and Finlex — for a legal question or term. Results carry citations and links to the official source.
Âmbitos:RESEARCH_READ· 50 chamadas por minuto
Propostas de alteração
redlines_applyResolve redlinesAltera dadosRecord which proposed redline changes on a document are accepted and which are rejected. A resolution overwrites any earlier decision on the same changes.
Âmbitos:REDLINES_GENERATE· 30 chamadas por minutoredlines_generatePropose redlinesLonga duraçãoPropose tracked changes to a stored contract for your side: insertions, deletions, rewordings and comments with the reasoning and priority of each. Nothing is changed in the document. Uses AI credits; can take a minute or more.
Âmbitos:REDLINES_GENERATE· 20 chamadas por minuto
Negociações
negotiations_analyze_positionAnalyse negotiation positionLonga duraçãoAnalyse your negotiating position on a stored contract: clause-by-clause leverage, preferred and fallback terms, deal breakers and the likely outcome. Uses AI credits.
Âmbitos:NEGOTIATIONS_READ· 20 chamadas por minutonegotiations_generate_playbookGenerate negotiation playbookLonga duraçãoTurn your priorities, concessions and deal breakers for a contract into a staged negotiation playbook with talking points and answers to likely objections. Uses AI credits.
Âmbitos:NEGOTIATIONS_READ· 20 chamadas por minuto
Fluxos de trabalho
workflows_executeRun workflowLonga duraçãoStart a workflow template on a due diligence project. The workflow runs in Attorly; follow it with workflows_get_status. Uses AI credits for AI steps.
Âmbitos:WORKFLOWS_EXECUTE· 10 chamadas por minutoworkflows_get_statusGet workflow statusSó leituraGet the status, timing, variables and (optionally) step-by-step results of a workflow execution by its executionId.
Âmbitos:WORKFLOWS_EXECUTE· 100 chamadas por minutoworkflows_list_executionsList workflow executionsSó leituraList workflow executions on the due diligence projects this connection reaches, newest first, optionally for one project or status. Returns the executionId workflows_get_status needs.
Âmbitos:WORKFLOWS_EXECUTE· 50 chamadas por minutoworkflows_list_templatesList workflow templatesSó leituraList the workflow templates that can run on a due diligence project: your organisation's and Attorly's built-in ones, with their templateId.
Âmbitos:WORKFLOWS_EXECUTE· 50 chamadas por minuto
Auditoria jurídica (due diligence)
due_diligence_add_documentsAdd documents to due diligenceAdd stored documents to a due diligence project's data room, optionally under a category. Adding a document twice has no further effect.
Âmbitos:DUE_DILIGENCE_FULL· 30 chamadas por minutodue_diligence_create_projectCreate due diligence projectCreate a due diligence project for a transaction (acquisition, merger, investment, IPO, real estate, regulatory review) in your organisation.
Âmbitos:DUE_DILIGENCE_FULL· 20 chamadas por minutodue_diligence_generate_reportGenerate due diligence reportLonga duraçãoGenerate a due diligence report from a project's documents and findings, saved on the project, as Markdown or as a PDF file. Can take a few minutes.
Âmbitos:DUE_DILIGENCE_FULL· 5 chamadas por minutodue_diligence_get_findingsGet due diligence findingsSó leituraList the risk findings of a due diligence project with their severity, category and recommendation, and the count per severity.
Âmbitos:DUE_DILIGENCE_FULL· 50 chamadas por minutodue_diligence_get_projectGet due diligence projectSó leituraGet one due diligence project of your organisation: type, target, status, priority, due date, and how many documents and findings it has.
Âmbitos:DUE_DILIGENCE_FULL· 100 chamadas por minutodue_diligence_list_projectsList due diligence projectsSó leituraList the due diligence projects of your organisation, newest first, with their status and document and finding counts. Returns the projectId the other due diligence and workflow tools need.
Âmbitos:DUE_DILIGENCE_FULL· 50 chamadas por minuto
Modelos e minutas
templates_draftDraft from templateCreate a draft from a template and the variable values you supply. The draft is saved in Attorly and returned as Markdown.
Âmbitos:TEMPLATES_DRAFT· 30 chamadas por minutotemplates_generate_aiDraft with AILonga duraçãoDraft a new legal document from your requirements with AI, for a document type, parties and jurisdiction. The draft is saved in Attorly. Uses AI credits.
Âmbitos:TEMPLATES_DRAFT· 10 chamadas por minutotemplates_listList templatesSó leituraList document templates (contracts, letters, policies) available to you, by category, jurisdiction and language, with the variables each one needs.
Âmbitos:TEMPLATES_READ· 50 chamadas por minuto
Outras
organization_get_contextGet account contextSó leituraGet the context this connection works in: organisation, plan, AI credits left, default jurisdiction and what the connection is allowed to do. Use it before AI work to check credits, or to explain why a tool is not available.
Âmbitos:· 60 chamadas por minuto
Resolução de problemas
- O cliente indica 401 Unauthorized.
- A chave falta, está mal escrita, revogada ou expirada. Verifique se o cabeçalho é Authorization: Bearer seguido da chave completa, sem aspas nem espaços. Em caso de dúvida, renove a chave em Definições › Programadores e cole a nova configuração.
- Uma ferramenta falha com insufficient_scope.
- Falta à chave um âmbito de que a ferramenta precisa. Crie uma chave com a predefinição Padrão ou Acesso total, ou uma personalizada com esse âmbito.
- As chamadas falham com rate_limited.
- Cada ferramenta permite um número fixo de chamadas por minuto e por chave. Aguarde os segundos indicados no erro e tente novamente.
- O cliente mostra menos ferramentas do que esta página.
- As ferramentas para as quais a chave não tem âmbito não são listadas. Reinicie o cliente depois de mudar de chave para que volte a obter a lista.
- O Claude Desktop mostra o servidor como falhado.
- O mcp-remote requer Node.js 18 ou posterior. Instale-o a partir de nodejs.org e depois feche e volte a abrir o Claude Desktop. O registo está no Claude Desktop em Settings › Developer.
O protocolo à mão
Para criar o seu próprio cliente ou verificar uma chave a partir do terminal: as três chamadas que todos os clientes fazem.
curl -X POST https://attorly.ai/api/mcp \
-H "Authorization: Bearer lbmcp_your_api_key" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0.0"}}}'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"}'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_list","arguments":{"limit":5}}}'