legal-context-ce
LegalContext is an open-source Model Context Protocol (MCP) server that creates a secure, standardized bridge between law firms' document management systems (specifically Clio) and AI assistants (starting with Claude Desktop)
claude mcp add --transport stdio protomated-legal-context-ce bun run src/server.ts \ --env CLIO_CLIENT_ID="your_clio_client_id" \ --env CLIO_API_REGION="us" \ --env CLIO_REDIRECT_URI="http://127.0.0.1:3001/clio/auth/callback" \ --env CLIO_CLIENT_SECRET="your_clio_client_secret"
How to use
LegalContext exposes a local MCP server that securely bridges your Clio document management system with Claude Desktop. It runs entirely within your infrastructure to keep client data in your control, and uses Retrieval-Augmented Generation (RAG) to ground Claude's responses in your Clio documents. The server indexes documents locally with LanceDB for fast, semantic search, and every Claude response includes citations to source documents to maintain traceability. To use it, install and configure Bun, set up your Clio API credentials, and start the server. Then configure Claude Desktop to recognize the MCP server named legalcontext, which will enable Claude to query your Clio documents through the LegalContext bridge. You can issue questions like “What are the key provisions in our standard NDA?” and Claude will retrieve relevant documents, reason over them, and present findings with citations.
Key capabilities include:
- Secure, on-premises document access via Clio API
- Local processing and indexing with LanceDB for semantic search
- Direct integration with Claude Desktop through MCP
- Interactive querying with citation tracking for each result
- Free tier limits: up to 100 documents and 50 queries per day
How to install
Prerequisites:
- Bun runtime (version 1.0 or later)
- Clio API credentials (client ID, client secret, redirect URI)
- Claude Desktop installed
Step-by-step installation:
- Install Bun
curl -fsSL https://bun.sh/install | bash
- Clone the repository and install dependencies
git clone https://github.com/protomated/legal-context.git
cd legal-context
bun install
- Configure environment variables
cp .env.example .env
Edit .env with your Clio credentials and any other settings required by your deployment
- Run the MCP server
bun run src/server.ts
- Configure Claude Desktop to use the MCP server (Automated or Manual as described in the README). The automated path uses the install.sh script to set up Claude Desktop configuration and environment variables. If configuring manually, ensure Claude Desktop points to the legalcontext MCP server with the Bun command and the path to src/server.ts.
Additional notes
Tips and common issues:
- Ensure the Bun executable path is absolute in Claude Desktop configuration.
- Use absolute paths for server.ts and the repository root in your MCP setup.
- If you encounter authentication failures with Clio, re-check the CLIO_CLIENT_ID, CLIO_CLIENT_SECRET, and CLIO_REDIRECT_URI in your environment.
- The environment variables in the MCP config will override values in your .env file.
- Monitor Claude Desktop logs for integration issues (macOS: ~/Library/Logs/Claude/; Windows: %USERPROFILE%\AppData\Local\Claude\Logs).
- For the free tier, be mindful of indexing limits (up to 100 documents) and query limits (50/day).
Related MCP Servers
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
mcp -arangodb
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!
CodeRAG
Advanced graph-based code analysis for AI-assisted software development
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!