MCP Setup Guide
PROConnect Compliarch to your AI workflow. Look up building regulations directly from Claude Desktop, Cursor, or any MCP-compatible client.
Prerequisites
Before you begin, make sure you have:
- An active Compliarch Pro subscription. MCP API access is a Pro-only feature. View pricing
- An API key generated from your dashboard account page
- Python 3.10+ installed on your machine
- The Compliarch MCP package:
pip install compliarch-mcp
Quick Start
Get up and running in three steps:
Generate an API key
Go to your dashboard account page and create a key in the API Keys section.
Add the MCP config
Add the Compliarch server block to your AI client's MCP configuration file.
Restart and verify
Restart your AI client and test with a query like "Look up building regulations for 123 Main St, Austin, TX."
Claude Desktop
Step 1: Generate an API key
Navigate to Dashboard → Account and scroll to the API Keys section. Enter a name like "Claude Desktop" and click Generate. Copy the key immediately — it won't be shown again.
Step 2: Open your config file
Locate (or create) your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Step 3: Add the Compliarch server
Paste the following into your config file. Replace
your-api-key-herewith the key you generated:{ "mcpServers": { "compliarch": { "command": "python", "args": ["run_mcp.py"], "env": { "COMPLIARCH_API_KEY": "your-api-key-here", "DATABASE_URL": "your-neon-connection-string" } } } }Step 4: Restart Claude Desktop
Quit and reopen Claude Desktop. You should see "compliarch" listed in the MCP servers panel.
Step 5: Verify it works
Try a query like: "What building regulations apply to 742 Evergreen Terrace, Springfield, IL?" You should see Compliarch tools being invoked in the response.
Cursor IDE
Cursor supports MCP servers through its settings. Add Compliarch to your Cursor MCP config:
{
"mcpServers": {
"compliarch": {
"command": "python",
"args": ["run_mcp.py"],
"env": {
"COMPLIARCH_API_KEY": "your-api-key-here",
"DATABASE_URL": "your-neon-connection-string"
}
}
}
}Open Cursor Settings → MCP, then add the server. Restart Cursor to apply changes.
Other MCP Clients
Any MCP-compatible client that supports the stdio transport can connect to Compliarch. Use this generic config:
{
"name": "compliarch",
"transport": "stdio",
"command": "python",
"args": ["run_mcp.py"],
"env": {
"COMPLIARCH_API_KEY": "your-api-key-here",
"DATABASE_URL": "your-neon-connection-string"
}
}Available Tools
Compliarch exposes three tools through MCP:
lookup_building_regulations(address, jurisdiction_levels?)Returns a full regulation report for the given address. Searches across all 10 regulation categories (zoning, structural, fire, electrical, plumbing, HVAC, energy, accessibility, environmental, permits) at up to 4 jurisdiction levels.
list_regulation_categories(address)Returns a lightweight summary of which regulation categories have been found for an address. Useful for a quick overview before requesting the full report.
ask_about_regulations(address, question)Ask a natural-language question about building regulations for a specific address. Powered by RAG with citations from official sources.
Usage & Billing
MCP API calls share the same usage quota as the Compliarch web dashboard:
- Pro plan: 150 regulation lookups per month (shared between web + MCP)
- Overage: $0.75 per additional lookup beyond your monthly allowance
ask_about_regulationscalls do not count toward your lookup limit
You can track your current usage on the account page.
Troubleshooting
“Invalid or revoked API key”
Your API key may have been revoked or entered incorrectly. Go to Dashboard → Account and generate a fresh key.
“MCP API access requires a Pro subscription”
MCP access is limited to Pro subscribers. Upgrade your plan to unlock API access.
“Lookup limit reached”
You've used all lookups for the billing period. Additional lookups are billed at $0.75 each, or you can wait for the next billing cycle to reset.
“Server not connecting”
Verify that Python is on your system PATH by running python --version in a terminal. Ensure you've installed the MCP package with pip install compliarch-mcp. Check that the config file path is correct and the JSON is valid.
Need Help?
If you run into issues not covered here, reach out and we'll help you get set up:
Email: jaime@compliarch.com