courtmesh-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for the HTTP transport. | 3000 |
| MCP_TRANSPORT | No | Set to 'http' to run the Streamable HTTP transport instead of stdio. Equivalent to passing --http. | stdio |
| COURTMESH_API_KEY | No | Your CourtMesh API key. Tools list fine without it, but any real API call will fail with a 401 style error until it is set. | |
| COURTMESH_API_BASE_URL | No | Override to point at a different CourtMesh environment. | https://research.courtmesh.ai/api/v1/prod |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_indian_court_casesA | Keyword and boolean search over the full 310M plus record OpenSearch index of Indian court cases. Fast, exact match, does not consume AI credits. Prefer this over semantic_search_cases for case numbers, party names, citations, judge names and exact phrases. Use semantic_search_cases instead when the request is a natural language question about legal concepts, doctrines or fact patterns rather than exact terms. Note: the caseNumber field is accepted and echoed back but does not actually filter results, put case number text in query instead. Note: sortBy only accepts relevance or date at the validation layer, but the underlying search engine only understands relevance, recent or oldest internally, so date is accepted yet may not reorder results as expected. |
| semantic_search_casesA | AI vector search over the roughly 2M case subset that has embeddings, out of the full 310M plus corpus. CONSUMES AI CREDITS. Prefer this over search_indian_court_cases for natural language questions about legal concepts, fact patterns or doctrines, where exact keywords will not match. Slower, a single call can take a minute or more. Real behaviour note: this endpoint's validation layer also accepts top level court, year, caseType, caseNumber, judgeName, judges, judge, fromDate and toDate fields, but the handler silently ignores all of them, only query, page, limit and filters are actually used, so this tool only exposes those. Put any filtering inside the filters object instead. Another quirk: if the cleaned query text ends up shorter than 3 characters after internal processing, the service falls back to a plain keyword search and marks the response with meta.fallbackMode = "opensearch". |
| get_caseA | Fetches full details for one case, without AI analysis. No AI credits consumed. Returns id, caseNumber, title, court, caseType, judges, petitioners, respondents, decisionDate, disposalNature, summary, optional metadata.diaryNumber, hasDocuments, documentCount and hasAnalysis. Fields like detailedSummary, headnote, holding and keyFacts are NOT included here, call get_case_analysis for those. |
| get_case_analysisA | Reads any existing AI analysis for a case. Read only: does NOT trigger new analysis and does NOT consume AI credits. If analysis has not been generated yet, hasAnalysis will be false and you will get a message field instead of an analysis field; in that case call analyze_case to generate it. When hasAnalysis is true, analysis may include summary, detailedSummary, comprehensiveSummary, headnote, holding, keyFacts, issues, courtsReasoning, citedCases (followed, distinguished, overruled, referred), precedentRelationships, arguments (petitioner, respondent), practiceAreas, subCategories, tags, procedureType, precedentValue, legalPrinciples, doctrinesApplied, statutoryInterpretation and constitutionalProvisions. Fields with no value are omitted from the response. |
| find_related_casesA | Finds other documents sharing the same case number as the given case, plus a derived procedural timeline. No AI credits consumed. This is NOT similarity search, it only follows the shared case number; for conceptually similar cases use semantic_search_cases instead. Returns relatedDocuments (each with id, title, caseNumber, court, decisionDate, caseType, isCurrent), capped at 50, and timeline entries (date, status, statusLabel, documentId), where status is one of Case Initiated, Hearings / Orders, or Final Judgment. Only documents that have both a decision date and a stored PDF appear in the timeline. meta carries caseNumber, totalDocuments and timelineEvents. |
| search_judgesA | Autocomplete over the combined Supreme Court and High Court judge name list. No AI credits consumed. Use this to get the exact spelling of a judge name before passing it to search_indian_court_cases as judgeName. Matching is case insensitive substring matching. An empty or omitted q returns the first 50 names in the list. Results are always capped at 50. |
| analyze_caseA | Triggers AI analysis of a single case. CONSUMES AI CREDITS. ASYNCHRONOUS: normally returns immediately with status processing while the analysis runs in the background; poll get_case_analysis after roughly 30 to 60 seconds to retrieve the result. If analysis already exists and force is not set, the existing analysis is returned immediately instead with alreadyExists true. Set force true to re-analyze a case that already has analysis, which also consumes credits again. Fails with a clear message if the case has no usable text or PDF content to analyze. |
| analyze_consolidated_caseA | Runs AI analysis across ALL documents that share the given case number, producing one merged view of the whole matter. CONSUMES SIGNIFICANTLY MORE AI CREDITS than analyze_case. SYNCHRONOUS: this call blocks until the analysis completes, which can take several minutes, so a long timeout is used. For a High Court case it analyzes the case document plus up to 5 most recent orders. For a Supreme Court case it analyzes up to 20 documents sharing the case number. Set force true to redo analysis that already exists, at the cost of credits again. Fails if the case has no case number or no text content, or if AI credits are exhausted. |
| get_case_pdf_urlA | Returns a time limited link to the official judgment PDF for a case. No AI credits consumed. CRITICAL: the returned pdfUrl is an ENCRYPTED presigned S3 URL, not a directly fetchable link, it must be decrypted with a case specific key before use, and it expires after the returned expiresIn seconds (normally 3600). Do not attempt to fetch pdfUrl directly, treat it as an opaque token to hand back to the user or to a CourtMesh client that knows how to decrypt it. Returns 404 if the case has no stored document. |
| request_case_timelineA | Kicks off a fetch of the live order and hearing history for a case directly from the court's own systems. Asynchronous job, no AI credits consumed. case_id must be the 24 character MongoDB ObjectId string, the id field from search results, a case number will fail. Supreme Court cases return immediately with status completed and orderCount 0, since SC cases have no separate order history in this system. District Court cases are fetched synchronously and come back completed or failed. High Court cases usually return pending and must be polled with get_case_timeline using the returned requestId. |
| get_case_timelineA | Polls the status and result of a job started by request_case_timeline. No AI credits consumed. Returns requestId, status, createdAt, updatedAt plus, when available, startedAt, completedAt, error, result, orders, orderCount and totalOrderCount. Returns 404 if the request is not found, which can mean the requestId is wrong or has expired. |
| check_api_healthA | Checks whether the CourtMesh API is reachable and healthy. No authentication required and no AI credits consumed. Useful to verify connectivity, and to confirm that connectivity problems are not caused by API key configuration, since this endpoint works even without a key. Returns success, status, version and timestamp; note this endpoint does not use the standard data envelope used by every other tool here. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/thinkscoop-technologies/courtmesh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server