- Legalis Ia
Legalis Ia
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.
Overview
Legalis MCP Server
Assistente jurídico com IA para advogados brasileiros
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
| Tool | Description |
|---|---|
list_cases | List cases (paginated, filterable by status) |
get_case | Get case details by ID |
create_case | Create a new case |
update_case | Update case fields |
search_cases | Full-text search across cases |
list_legal_documents | List peças processuais for a case |
get_legal_document | Get a document with all sections |
create_legal_document | Create a new legal document |
generate_section | AI-generate a document section (fatos, fundamentos, pedidos…) |
get_case_context | Get case context (facts, parties, evidence) |
run_interview | AI-guided case intake interview |
search_legislation | Search Brazilian legislation (LexML) |
get_my_usage | Check 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
| Variable | Default | Description |
|---|---|---|
LEGALIS_API_URL | https://hai-production-612f.up.railway.app | Backend URL |
LEGALIS_ACCESS_TOKEN | — | Pre-issued token (CI/test only) |
LEGALIS_REFRESH_TOKEN | — | Refresh token (CI/test only) |
LEGALIS_CREDENTIALS_FILE | ~/.legalis/credentials.json | Credentials file path |
LEGALIS_OAUTH_PORT | 3742 | Local OAuth callback port |
Security
- Credentials are stored in
~/.legalis/credentials.jsonwith600permissions (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.
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
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
WindsurfThe new purpose-built IDE to harness magic
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"
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.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
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.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Tavily Mcp
DeepChatYour AI Partner on Desktop
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.
Playwright McpPlaywright MCP server