home / mcp / lumenx-mcp: the legal spend intelligence server
Powered by DatSciX. This is a legal spend MCP within the suite of LumenX.
Configuration
View docs{
"mcpServers": {
"datscix-ceo-lumenx-mcp": {
"command": "python",
"args": [
"-m",
"legal_spend_mcp.server"
],
"env": {
"ONIT_API_KEY": "YOUR_API_KEY",
"ONIT_ENABLED": "true",
"ONIT_BASE_URL": "https://<your-company>.onit.com",
"LEGALTRACKER_API_KEY": "YOUR_API_KEY",
"LEGALTRACKER_ENABLED": "true",
"LEGALTRACKER_BASE_URL": "https://api.legaltracker.com"
}
}
}
}LumenX-MCP is an open-source, enterprise-grade server that unifies your legal and financial data from multiple sources into a single, queryable resource for AI agents and analytics platforms. It connects to e-billing platforms, ERPs, databases, and local files, delivering fast, extensible access to spend insights and vendor performance.
You interact with the server through an MCP client to run analytics, retrieve spend summaries, compare budgets, and search transactions. Start by ensuring your data sources are enabled in your environment, then start the MCP server and point your client at the server runtime. Use the available tools to fetch aggregated spend data, vendor performance, and spend-overview insights. The server is designed to be AI-ready, so you can feed its data into large language models and analytics pipelines for deeper insights.
Key capabilities you can leverage via an MCP client include getting a legal spend summary, analyzing vendor performance, comparing budget versus actual spend, and performing full-text searches across transactions. You can enable multiple data sources, then query them in a unified way without managing each source separately.
Prerequisites you need before installing: Python 3.10 or higher, Docker (recommended for the easiest setup), and access to at least one supported data source.
Option A: Using Docker (recommended for a consistent environment)
docker build -t legal-spend-mcp .
docker run -d --name legal-spend-mcp -v ./.env:/app/.env -v ./data:/app/data legal-spend-mcpOption B: Install from source
Editable install (recommended for developers) follows the project’s packaging descriptor and dev dependencies.
# Clone the repository
git clone https://github.com/DatSciX-CEO/LumenX-MCP.git
cd LumenX-MCP
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e .[dev]Using requirements.txt for deployment or general use
# After cloning and activating your virtual environment
pip install -r requirements.txtCreate your environment file to configure sources and behavior, then enable the data sources you use. The server will initialize only the sources you enable.
# Enable the data sources you want to use
LEGALTRACKER_ENABLED=true
LEGALTRACKER_API_KEY=your_api_key_here
LEGALTRACKER_BASE_URL=https://api.legaltracker.com
ONIT_ENABLED=true
ONIT_API_KEY=your_api_key
ONIT_BASE_URL=https://<your-company>.onit.comStart the MCP server after you have configured your environment. The following command runs the server in the local runtime.
python -m legal_spend_mcp.server- Use Docker for the simplest, most reproducible deployment. - Keep your credentials secure by using environment variables and secret management in production. - Enable only the data sources you actually need to minimize surface area. - Use the server’s analytics tools to build dashboards and AI prompts that leverage unified data across sources.
Protect access to your MCP endpoints and data sources with rotated API keys, restricted network access, and regular dependency updates. Validate your configuration prior to deployment and monitor the runtime for performance and error signals.
If a data source fails to connect, verify that the enabled flag is true and credentials (API keys, base URLs) are correct. Check logs for authentication errors, network access issues, or missing dependencies, and ensure the environment file is loaded by the server at startup.
Retrieve aggregated spend data with filtering to break down spend by matter, vendor, category, and time period.
Analyze performance metrics for a specific vendor, including spend, count, and variance against benchmarks.
Compare actual spend against budgeted amounts to highlight variances and trends.
Perform a full-text search across legal transactions to locate specific invoices, matters, or line items.