MCP Integration
Connect Mailroom Agent directly to Claude Code for seamless document classification.
What is MCP?
Model Context Protocol (MCP) allows Claude to directly interact with external services. With our MCP integration, Claude Code can classify legal documents automatically.
Setup
1. Get Your API Key
Create an API key from the Console.
2. Configure Claude Code
Edit ~/.claude/settings.json and add the Mailroom server:
JSON
{
"mcpServers": {
"mailroom": {
"type": "url",
"url": "https://api.mailroomagent.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
3. Restart Claude Code
Restart Claude Code to load the new MCP server.
Available Tools
TOOL
classify_document
Classify a document from base64-encoded content.
document | Base64 encoded PDF or plain text content | Required |
document_type | "pdf" or "text" (default: "pdf") | Optional |
extract_dates | Extract dates from document (default: true) | Optional |
extract_adj | Extract ADJ numbers (default: true) | Optional |
TOOL
classify_file
Classify a document from a file path (Claude reads and encodes the file).
file_path | Path to the PDF file | Required |
Usage Examples
Once configured, just ask Claude naturally:
# Classify a specific file
> Classify this document: /path/to/legal-notice.pdf
# Extract specific information
> What hearing dates are in this PDF?
# Batch classification
> Classify all PDFs in this folder and summarize the document types
# Extract case information
> Find all ADJ numbers and associated parties in this document
Example Response
Claude will receive structured data and can summarize it naturally:
// Claude's response based on API data:
"This is a WCAB Notice of Hearing with 95% confidence.
Key Details:
- Case: ADJ13226857
- Parties: Ana Guevara vs. Ascena Retail Group
- Hearing Date: January 22, 2026
- Location: 3737 Main St, Riverside CA
The document is 6 pages and contains notice of an upcoming
workers' compensation hearing."
Ready to Connect?
Get your API key and start using Mailroom Agent with Claude Code.
Get API Key