CaseCanopy is an AI-powered legal platform that bridges the justice gap by enabling cross-jurisdiction legal precedent discovery and outcome prediction. It provides equal access to legal insights through a modern, responsive web application.
- agentic-ai/: Python FastAPI service for legal document generation using AI.
- backend/: Go (Gin) backend for user, admin, file, and document management.
- frontend/: Next.js/React frontend for user interaction and legal research.
- RAG/: Python Flask server for retrieval-augmented generation (LangChain-based).
- mcp_server/: Model Context Protocol server for Claude Desktop integration, providing legal precedent search, document generation, and analysis tools.
- AI-powered legal document generation (petitions, RTIs, complaints, etc.)
- Case law and legal precedent search
- Outcome prediction and legal insights
- User authentication and admin approval
- Document upload, management, and PDF generation
- Modern, responsive frontend UI
- Claude Desktop integration via MCP server for seamless AI legal assistance
git clone https://github.com/Arpit529Srivastava/Case_Canopy.git
cd Case_Canopycd ai_agent
# Follow instructions in ai_agent/README.mdcd backend
go mod tidy
go run main.go
# Server runs on :8000, requires MongoDB running locallycd frontend
npm install
npm run dev
# App runs on http://localhost:3000cd RAG
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py
# Server runs on http://localhost:8000
# in other terminal tab run:
source venv/bin/activate
pip install -r requirements.txt
python analyzer.pycd mcp_server
npm install- Add configuration to Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
- Windows:
{
"mcpServers": {
"case-canopy-legal": {
"command": "node",
"args": ["C:/path/to/your/case-canopy/mcp_server/index.js"],
"env": {
"RAG_BASE_URL": "http://localhost:9000",
"AI_AGENT_BASE_URL": "http://localhost:8001"
}
}
}
}- Ensure RAG system (port 9000) and AI agent (port 8001) are running
- Restart Claude Desktop
- 🔍 Legal Precedent Search: Search Supreme Court cases and jurisprudence
- 📄 Document Generation: Auto-generate PIL, RTI, and Complaint documents
- ⚖️ Combined Analysis: Get legal analysis with document generation in one step
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
MODEL_NAME=gpt-4o-mini
QDRANT_URL=your_link
QDRANT_API_KEY=your_qdrant_api_key_here
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email
SMTP_PASS=generate_password_and paste_here
JWT_SECRET=your_token
GEMINI_API_KEY=your_api_key
MONGODB_URI=you_uri
JWT_SECRET=secret_token
- This project is licensed under the MIT License.