deveshmaster/Indian-Kanoon-MCP-Server
3.2
If you are the rightful owner of Indian-Kanoon-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP server provides tools for searching and retrieving Indian legal documents from Indian Kanoon.
Tools
search_legal_documents
Search cases, acts, and rules
get_document_by_id
Retrieve complete documents
get_document_fragments
Extract relevant excerpts
get_document_metadata
Get document information
get_court_copy
Access original court documents
search_with_pagination
Handle large result sets
n MCP (Model Context Protocol) server that provides tools for searching and retrieving Indian legal documents from Indian Kanoon.
Features
- Search legal documents with various filters (court, date, judge, etc.)
- Retrieve complete legal documents by ID
- Extract document fragments matching specific queries
- Get document metadata
- Access original court copies
- Paginated search for large result sets
Installation
-
Clone this repository
-
Install dependencies:
pip install -e .
-
Set up your Indian Kanoon API token:
- Create a
.env
file in the root directory - Add your token:
INDIANKANOON_API_TOKEN=your_token_here
- Create a
Usage
Start the server using SSE (recommended for Present.ai):
# Default port 8000
python -m mcp_indiankanoon
# Custom port
python -m mcp_indiankanoon --port 8080
Configure in Present.ai:
Add to your MCP servers configuration:
{
"name": "Indian Kanoon",
"url": "http://localhost:8000/sse"
}
Available Tools
- search_legal_documents - Search cases, acts, and rules
- get_document_by_id - Retrieve complete documents
- get_document_fragments - Extract relevant excerpts
- get_document_metadata - Get document information
- get_court_copy - Access original court documents
- search_with_pagination - Handle large result sets
Examples
Search for privacy cases:
"Search for Supreme Court cases about right to privacy from 2020"
Get specific document:
"Get the complete document with ID 1234567"
Find mentions within a document:
"Find all mentions of Article 21 in document 1234567"