Indian-Kanoon-MCP-Server

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
  1. search_legal_documents

    Search cases, acts, and rules

  2. get_document_by_id

    Retrieve complete documents

  3. get_document_fragments

    Extract relevant excerpts

  4. get_document_metadata

    Get document information

  5. get_court_copy

    Access original court documents

  6. 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

  1. Clone this repository

  2. Install dependencies:

    pip install -e .
    
  3. Set up your Indian Kanoon API token:

    • Create a .env file in the root directory
    • Add your token: INDIANKANOON_API_TOKEN=your_token_here

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

  1. search_legal_documents - Search cases, acts, and rules
  2. get_document_by_id - Retrieve complete documents
  3. get_document_fragments - Extract relevant excerpts
  4. get_document_metadata - Get document information
  5. get_court_copy - Access original court documents
  6. 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"