Skip to main content
Glama
tbrew13

Legal MCP Server

by tbrew13

Legal MCP Server

A Model Context Protocol (MCP) server for legal document search and retrieval, powered by Azure Cosmos DB and Voyage AI embeddings.

Overview

This MCP server exposes 12 search and retrieval tools for legal documents, providing semantic search, keyword search, and metadata-based queries over a corpus of vectorized legal documents.

Related MCP server: CodeAlive MCP

Features

  • Semantic Search: Vector search over 3,275+ document chunks using Voyage AI voyage-law-2 embeddings

  • Keyword Search: BM25-based full-text search for precise term matching

  • Bates Number Lookup: Direct document retrieval by filing number

  • Claim-Specific Queries: Filter documents by claim status and party

  • Document Mapping: Cross-reference documents across the corpus

  • Statutory Citation Search: Find legal precedents and statutory references

  • Compression Support: Retrieve facts (compressed) or raw text for efficiency

Architecture

Azure Integration

  • Cosmos DB: Stores 3,275 document chunks and 2,772 embeddings

  • Azure Key Vault: Manages API keys and secrets (Voyage AI, etc.)

  • Azure Container Apps: Hosts the MCP server

Data Model

Documents are chunked and vectorized using Voyage AI's legal-specialized model (1024 dimensions).

See SCHEMA.md for complete database schema documentation.

Setup

Requirements

  • Python 3.10+

  • Azure credentials (for Cosmos DB and Key Vault access)

  • Voyage AI API key

Installation

pip install -r requirements.txt

Environment

Set the following environment variables:

  • COSMOS_DB_ENDPOINT: Cosmos DB endpoint URL

  • COSMOS_DB_KEY: Cosmos DB read key

  • VOYAGE_API_KEY: Voyage AI API key

  • AZURE_KEY_VAULT_URL: Key Vault URL

Or store them in Azure Key Vault (recommended for production).

Usage

Start the MCP server:

python legal_mcp.py

The server exposes tools via the Model Context Protocol for use by Claude or other MCP clients.

Tools

The server provides the following tools:

  1. semantic_search - Search documents by meaning

  2. keyword_search - Full-text search by keywords

  3. search_by_bates - Find documents by Bates number

  4. search_by_header - Find documents by section headers

  5. search_by_claim - Find documents related to specific claims

  6. map_documents - Cross-reference related documents

  7. search_citations - Find statutory and case citations

  8. And more...

Deployment

The server is deployed as an Azure Container App in the personal Azure account.

Status: Active
Image: legalmcpacr.azurecr.io/legal-mcp:joinfix
Endpoint: legal-mcp-server.purplesky-9ea73a76.eastus.azurecontainerapps.io

License

Private repository for legal case support.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

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/tbrew13/legal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server