cpl-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cpl-mcplook up CPL 245.20"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cpl-mcp
MCP server for the New York State Criminal Procedure Law (CPL). Wraps the NY Senate OpenLegislation API so any MCP client can look up CPL sections by citation and search the CPL by keyword.
Installation
With uv (recommended):
uvx cpl-mcpWith pip:
pip install cpl-mcp
python -m cpl_mcp.serverRelated MCP server: Open States API MCP Server
Auth setup
The server requires a free OpenLegislation API key.
Go to https://legislation.nysenate.gov and click Sign up for an API Key.
Fill in the form — the key is emailed to you within a few minutes.
Set the environment variable before starting the server:
export NYS_LEG_API_KEY="your-key-here"Or put it in a .env file in the project root — the server loads it automatically:
NYS_LEG_API_KEY=your-key-hereClaude Desktop config
Add the following to claude_desktop_config.json
(~/Library/Application Support/Claude/ on macOS,
%APPDATA%\Claude\ on Windows):
{
"mcpServers": {
"cpl": {
"command": "uvx",
"args": ["cpl-mcp"],
"env": {
"NYS_LEG_API_KEY": "your-key-here"
}
}
}
}If you prefer a local checkout instead of uvx:
{
"mcpServers": {
"cpl": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/cpl-mcp",
"run", "python", "-m", "cpl_mcp.server"
],
"env": {
"NYS_LEG_API_KEY": "your-key-here"
}
}
}
}Environment variables
Variable | Required | Description |
| Yes | OpenLegislation API key. Get one at https://legislation.nysenate.gov. |
Tools
Tool | Description |
| Retrieve the full text of a CPL section or article by citation (e.g. |
| Full-text keyword search across the CPL. Returns a ranked list of matching sections with snippets. |
cpl_lookup_section
Use when you know the section number. Accepts flexible citation formats —
CPL § 245.20, section 245.20, and 245.20 all resolve to the same
location. Returns the statute text, active date, structural breadcrumb
(article/title parents), and a link to the official nysenate.gov page.
cpl_search
Use when searching by topic rather than citation. Supports pagination via
limit (1–50, default 10) and offset (1-based, default 1).
Both tools accept a response_format parameter: "markdown" (default,
human-readable) or "json" (machine-readable, useful for chaining tools).
Running locally
# one-shot lookup — no MCP client needed
python -m cpl_mcp.server --selftest 245.20
# one-shot lookup + keyword search
python -m cpl_mcp.server --selftest 245.20 --search "speedy trial"
# HTTP transport for debugging (listens on 127.0.0.1:8000)
python -m cpl_mcp.server --httpThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/njrenaissance/cpl-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server