Sponsored by Deepsite.site

Legalis Ia

Created By
edsonsousaa month ago
O Legalis MCP traz todo o fluxo de trabalho jurídico da sua area de trabalho. Advogados podem criar e gerenciar casos, gerar peças processuais profissionais seção por seção com IA, conduzir entrevistas guiadas de intake processual e monitorar o uso de cota — sem sair da conversa. Desenvolvido para o direito brasileiro. Funciona com Claude Desktop, Claude Code e qualquer cliente compatível com MCP. Autenticação via OAuth no browser — nenhuma senha armazenada em arquivos de configuração ---------- English Version ----------------- Legalis MCP brings your entire legal workflow into Claude. Attorneys can create and manage cases, generate professional legal documents (peças processuais) section by section using AI, run guided case intake interviews, and monitor AI quota usage — without ever leaving the conversation. Built for Brazilian law. Works with Claude Desktop, Claude Code, and any MCP-compatible client. Authentication via secure browser OAuth flow — no passwords stored in config files.
Content

Legalis MCP Server

Assistente jurídico com IA para advogados brasileiros

Leia em Português

MCP (Model Context Protocol) server for Legalis — Brazilian legal document AI for attorneys.

Connect Claude (or any MCP-compatible client) to your Legalis account and interact with cases, generate legal documents, search legislation, and more using natural language.


Quick start

1. Install

pip install legalis-mcp
# or with uv:
uv tool install legalis-mcp

2. Authenticate

legalis-mcp auth

This opens your browser. Log in to Legalis normally — tokens are saved to ~/.legalis/credentials.json (owner-readable only).

3. Configure Claude

Add to your Claude configuration (~/.claude/claude_desktop_config.json for Claude Desktop, or claude_code_config.json for Claude Code):

{
  "mcpServers": {
    "legalis": {
      "command": "legalis-mcp",
      "args": ["serve"]
    }
  }
}

4. Use

In Claude, try:

  • "Liste meus casos no Legalis"
  • "Crie um caso de rescisão indireta para João Silva"
  • "Gere a seção de fundamentos jurídicos da peça X do caso Y"
  • "Pesquise legislação trabalhista sobre justa causa"
  • "Quantas gerações ainda tenho disponíveis este mês?"

Available tools

ToolDescription
list_casesList cases (paginated, filterable by status)
get_caseGet case details by ID
create_caseCreate a new case
update_caseUpdate case fields
search_casesFull-text search across cases
list_legal_documentsList peças processuais for a case
get_legal_documentGet a document with all sections
create_legal_documentCreate a new legal document
generate_sectionAI-generate a document section (fatos, fundamentos, pedidos…)
get_case_contextGet case context (facts, parties, evidence)
run_interviewAI-guided case intake interview
search_legislationSearch Brazilian legislation (LexML)
get_my_usageCheck AI quota and billing period usage

CLI commands

legalis-mcp auth      # Authenticate via browser
legalis-mcp serve     # Start MCP server (stdio)
legalis-mcp status    # Verify authentication
legalis-mcp logout    # Remove stored credentials

Development

git clone <repo>
cd mcp
pip install -e ".[test]"

# Run unit tests (no external services needed)
pytest tests/unit/ -v

# Run integration tests (requires Docker)
cd ../integration && docker-compose up -d
cd ../mcp
LEGALIS_API_URL=http://localhost:8000 \
LEGALIS_ACCESS_TOKEN=<token> \
LEGALIS_REFRESH_TOKEN=<refresh> \
pytest tests/integration/ -v

Environment variables

VariableDefaultDescription
LEGALIS_API_URLhttps://hai-production-612f.up.railway.appBackend URL
LEGALIS_ACCESS_TOKENPre-issued token (CI/test only)
LEGALIS_REFRESH_TOKENRefresh token (CI/test only)
LEGALIS_CREDENTIALS_FILE~/.legalis/credentials.jsonCredentials file path
LEGALIS_OAUTH_PORT3742Local OAuth callback port

Security

  • Credentials are stored in ~/.legalis/credentials.json with 600 permissions (owner read/write only).
  • The OAuth redirect is restricted to http://localhost — open-redirect attacks are blocked at the backend.
  • Tokens are never stored in the MCP configuration file.
  • All API calls go through the existing Legalis backend — RBAC, rate limiting, and quotas apply normally.

Publishing

# PyPI
pip install build twine
python -m build
twine upload dist/*

# Then register at:
# - smithery.ai (MCP marketplace)
# - mcp.so (community directory)
# - github.com/modelcontextprotocol/servers (official list)
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Amap Maps高德地图官方 MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
WindsurfThe new purpose-built IDE to harness magic