# Connect Any MCP Agent to Law
> Source: https://legalcode.md/integrations/mcp | [HTML version](https://legalcode.md/integrations/mcp)

Legalcode works with any MCP-compatible AI agent. Use the standard protocol to access global legal data without vendor lock-in.

**For:** Developers building with any MCP-compatible AI platform

## Setup

`npx legalcode init`

1. **Run the CLI** -- Run npx legalcode init and select your target client from the interactive prompt.
2. **Configure MCP endpoint** -- Apply the generated MCP configuration. The remote endpoint is https://mcp.legalcode.md/mcp.
3. **Authenticate** -- Complete OAuth in your browser and start using legal tools.

## Capabilities

- Standard MCP protocol — works with any compatible agent
- 18+ supported AI clients (Claude, ChatGPT, Codex, Cursor, Copilot, and more)
- 24 jurisdictions with law, case law, and guidance
- 318+ legal skills available on Pro Annual plans
- Zero data retention

## Security

- Open protocol — no proprietary lock-in
- OAuth 2.0 authentication
- Zero search query logging
- TLS 1.3 encryption

## FAQ

### What is MCP?

Model Context Protocol (MCP) is an open standard that lets AI agents access external tools and data sources. Legalcode uses MCP to serve law, case law, and legal skills to any compatible agent.

### Which agents support MCP?

Claude, ChatGPT, Codex, Cursor, GitHub Copilot, Windsurf, Cline, and many more. Any agent that supports the MCP protocol can connect to Legalcode.

### Do I need to self-host anything?

No. Legalcode runs as a remote MCP server. You just point your agent at the endpoint and authenticate.

---
*Legalcode -- legalcode.md*
