- DATA
- ANALYSIS
- REPORTING
- HUMAN
Short answer
How can I query judicial metadata with my AI?
Your agent translates your requests into Elasticsearch queries to pull specific records from the CNJ Datajud API. You can filter by date, party, or metadata to get structured datasets for your work.
Where the data goes
What you get from these queries
The AI handles the API calls so you can focus on the legal information.
DATA
Filtered legal datasets
The AI uses the search tool to pull specific records based on your criteria. You get the exact metadata you asked for without manual API calls.
ANALYSIS
Pattern recognition
Once the data is pulled, your agent can identify trends in case filings or party involvement. It turns raw JSON into readable insights.
REPORTING
Structured summaries
The AI organizes the retrieved judicial metadata into clean formats. You can move this data directly into your own documents or spreadsheets.
HUMAN
Legal verification
The AI provides the raw data and summaries, but you must verify the legal accuracy of the findings. It cannot provide legal advice or confirm the current status of a case.
The workflow
What your AI does when a query arrives.
The AI translates your plain English requests into precise technical queries.
Translate intent
Your agent takes your request, like searching for a specific party, and maps it to the required Elasticsearch parameters.
search_processes_advancedExecute search
The AI sends the formatted query to the CNJ Datajud API to fetch the matching legal records.
search_processes_advancedFilter results
The agent parses the large response from the API to isolate the specific metadata fields you need.
search_processes_advancedFormat output
The AI presents the final dataset in a way that makes sense for your specific task or report.
search_processes_advanced
Try it
Copy these to start.
Use these prompts to trigger the first search.
Starting points
Swap the bracketed info with the specific names, dates, or court details you are looking for.
CNJ Datajud Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_aUA43ZGXwIeUcu4xQJ3UprlIzZu7awEnioPwYGgR/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — CNJ Datajud capabilities are ready to use.
{
"mcpServers": {
"cnj-datajud-api-publica-mcp": {
"url": "https://edge.vinkius.com/vk_preview_aUA43ZGXwIeUcu4xQJ3UprlIzZu7awEnioPwYGgR/mcp"
}
}
}Search for all processes involving [Party Name] filed between [Date] and [Date].
Find judicial metadata for cases in [Specific Court] related to [Legal Topic].
Pull a list of all processes updated in the last 24 hours that match the metadata [Field Name].
Query the CNJ API for any records associated with the CPF [Number] and summarize the results.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect CNJ (Datajud API Pública) once, then ask.
Click the link to connect the MCP to your client. Your credentials stay encrypted and the connection is ready to use immediately.
Connect CNJ (Datajud API Pública) to your AIFAQ
How this task behaves
- 01
Can the AI change the data in the CNJ database?
No. The AI can only read and query existing metadata through the search tool.
- 02
Does the AI provide legal opinions on the cases it finds?
No. The AI only retrieves and summarizes the metadata. You are responsible for all legal interpretations.
- 03
Can I search for specific case numbers?
Yes, you can use the search tool to find specific processes using case numbers or other unique identifiers.
- 04
How large can the datasets be?
The AI can pull large datasets, but it is best to use specific filters like dates or party names to keep the results manageable.
- 05
Can the AI automatically file a new lawsuit?
No. This MCP is designed for querying and retrieving judicial metadata, not for submitting new legal filings.
More questions about CNJ (Datajud API Pública)? The Connector page answers them. See everything the CNJ (Datajud API Pública) Connector can do
Connect CNJ Datajud to Claude, Cursor, ChatGPT & more
