Legal MCP Server
A Model Context Protocol (MCP) compliant server for legal document analysis using Azure Blob Storage and Anthropic Claude API.
Features
Document Management: List and retrieve pre-loaded PDF documents from Azure Blob Storage
Prompt Library: Manage curated prompts for legal document analysis
Streaming Analysis: Execute document analysis with real-time progress updates via MCP progress notifications
MCP SSE Transport: Full compliance with MCP specification using Server-Sent Events
Prerequisites
Node.js 18+
Azure Storage Account with:
documentscontainer (for PDF files)promptscontainer (for prompt library JSON)
Anthropic Claude API key with credits
Setup
Clone and install dependencies:
git clone <your-repo-url> cd Legal-MCP npm installConfigure environment variables:
cp .env.example .env # Edit .env with your actual valuesUpload initial prompt library to Azure:
# Using Azure CLI (after setting up connection) az storage blob upload \ --account-name legalmcpstore \ --container-name prompts \ --name "library.json" \ --file ./prompts/library.json \ --connection-string "$AZURE_STORAGE_CONNECTION_STRING"Upload documents to Azure:
# Upload PDF files to the documents container az storage blob upload \ --account-name legalmcpstore \ --container-name documents \ --name "your-document.pdf" \ --file ./path/to/your-document.pdf \ --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
Running Locally
Development mode (with auto-reload):
Production mode:
The server will start on http://localhost:3000 (or the port specified in PORT env var).
MCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Note: For SSE transport, you'll need to configure the HTTP endpoint instead. See MCP documentation for SSE client setup.
Testing with MCP Inspector
You can test the server using the MCP Inspector or any MCP-compatible client:
Available Tools
list_documents: Returns all available PDF documents
list_prompts: Lists available analysis prompts (with optional search)
get_prompt: Retrieves full prompt details by ID
add_prompt: Adds a new user-contributed prompt
execute_analysis: Executes document analysis with streaming progress updates
Project Structure
Deployment to Azure
See the deployment section in the original plan for Azure App Service deployment instructions.
License
ISC
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables legal document analysis using Azure Blob Storage and Anthropic Claude API with streaming capabilities, prompt library management, and document retrieval for PDF files.