cpl-mcp

cpl-mcp

MCP server that wraps the NY Senate OpenLegislation API to look up and search the New York Criminal Procedure Law by citation or keyword.

Category
Visit Server

README

cpl-mcp

CI Python Coverage

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-mcp

With pip:

pip install cpl-mcp
python -m cpl_mcp.server

Auth setup

The server requires a free OpenLegislation API key.

  1. Go to https://legislation.nysenate.gov and click Sign up for an API Key.
  2. Fill in the form — the key is emailed to you within a few minutes.
  3. 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-here

Claude 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
NYS_LEG_API_KEY Yes OpenLegislation API key. Get one at https://legislation.nysenate.gov.

Tools

Tool Description
cpl_lookup_section Retrieve the full text of a CPL section or article by citation (e.g. 245.20, A245).
cpl_search 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 --http

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured