Legalis MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Legalis MCP ServerCrie um caso de rescisão indireta para João Silva"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-mcp2. Authenticate
legalis-mcp authThis 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?"
Related MCP server: Legal Document AI MCP
Available tools
Cases
Tool | Description |
| List cases (paginated, filterable by status) |
| Get case details by ID |
| Create a new case |
| Update case fields |
| Full-text search across cases |
| Delete a case permanently |
Legal documents
Tool | Description |
| List peças processuais for a case |
| Get a document with all sections |
| Create a new legal document |
| AI-generate a document section (fatos, fundamentos, pedidos…) |
| Manually edit a document section |
| Get case context (facts, parties, evidence) |
| Update case context |
| Delete a legal document |
| Export a document as DOCX |
Events & Tasks
Tool | Description |
| Create an event on a case (internal or client-visible) |
| List events for a case |
| Delete a case event |
| Create a task with due date and priority |
| List tasks for a case |
| Update a task's fields |
| Mark a task as complete |
| Delete a task |
| List upcoming tasks across all cases |
| List all overdue tasks |
Other
Tool | Description |
| AI-guided case intake interview |
| List available document templates |
| Get template details and sections |
| Search Brazilian legislation (LexML) |
| Check AI quota and billing period usage |
API coverage
The table below maps every Legalis backend endpoint to its MCP tool (when available).
Cases
Endpoint | Method | MCP Tool |
| GET |
|
| POST |
|
| GET |
|
| PUT |
|
| DELETE |
|
| GET |
|
| GET | — |
| POST / DELETE | — |
Legal documents
Endpoint | Method | MCP Tool |
| GET |
|
| POST |
|
| GET |
|
| DELETE |
|
| POST |
|
| PUT |
|
| GET |
|
Case context
Endpoint | Method | MCP Tool |
| GET |
|
| PUT |
|
| GET | — |
Tasks
Endpoint | Method | MCP Tool |
| GET |
|
| POST |
|
| PUT |
|
| DELETE |
|
| POST |
|
| GET |
|
| GET |
|
Events
Endpoint | Method | MCP Tool |
| GET |
|
| POST |
|
| DELETE |
|
Templates & Legislation
Endpoint | Method | MCP Tool |
| GET |
|
| GET |
|
| GET |
|
Usage
Endpoint | Method | MCP Tool |
| GET |
|
Not yet covered
Endpoint | Notes |
| BFF endpoint — case + tasks + events in one call |
| Share case status with clients via public link |
| Context version history |
| User profile read/update |
| Notification and UI preferences |
| Uploaded documents (non-generated) |
| Voice assistant (plan-gated feature) |
| Team member management |
| Invite team members |
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 credentialsDevelopment
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/ -vEnvironment variables
Variable | Default | Description |
|
| Backend URL |
| — | Pre-issued token (CI/test only) |
| — | Refresh token (CI/test only) |
|
| Credentials file path |
|
| 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)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/edsonsousa/legalis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server