# US Code Federal Statutes [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/lrehmann/uscode-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/us-code-federal-statutes

## Description
Search and read U.S. Code statutes with legal and inline citations linking to uscode.ecfr.io.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "us-code-federal-statutes": {
    "url": "https://uscode.ecfr.io/mcp"
  }
}
```

## Documentation

## What US Code Federal Statutes MCP server does

The US Code Federal Statutes MCP server exposes a read-only MCP interface to the United States Code hosted at uscode.ecfr.io. It lets an agent find statutory text, retrieve complete sections in bounded requests, and enumerate published titles. Responses include source links, legal or inline citation data, release information, and retrieval timing.

The service is an independent mirror of the Office of the Law Revision Counsel corpus rather than a government service. Retrieved statutory text is source material, not instructions. This makes the US Code Federal Statutes MCP server suitable for research, document drafting, and citation-oriented workflows where the agent needs to identify a provision and link readers to the corresponding page.

## How it works

The hosted deployment is available at `https://uscode.ecfr.io/mcp` over streamable HTTP. It is stateless, returns JSON responses, and does not require an API key or account. A local stdio process is also available from the repository. That mode builds the project and starts `dist/stdio.js` with Node.js.

Search can accept a phrase such as “freedom of information” or a direct reference such as `5 USC 552`. After finding a result, retrieve the canonical section path, for example `/title/5/section/552`, before quoting statutory text. Search results contain excerpts, not necessarily the whole section.

Section responses use bounded pages. Text defaults to 20,000 characters and accepts a maximum length of 60,000 characters. Continue with `nextOffset` until it is null when retrieving a long section. The `complete` flag is true only when the response contains the full text from offset zero.

## Setup and configuration

For hosted use, add the endpoint to an MCP client configuration:

```json
{
  "mcpServers": {
    "uscode": { "url": "https://uscode.ecfr.io/mcp" }
  }
}
```

Claude Code can add it with `claude mcp add --transport http uscode https://uscode.ecfr.io/mcp`.

For local use, clone the repository, run `npm ci`, build with `npm run build`, and start `node dist/stdio.js`. The local configuration points the client’s `command` to `node` and passes the absolute path to `dist/stdio.js` as an argument. Docker is also supported through the included image build and interactive run commands.

`USCODE_ORIGIN` can select another HTTPS deployment. HTTP is permitted only for localhost or `127.0.0.1` development. Requests have a 30-second timeout, and logs stay off stdout so that stdout remains available for MCP messages.

## Tools and capabilities

The US Code Federal Statutes MCP server provides three tools:

- `search_uscode` performs full-text or direct-citation searches. It accepts a query and an optional result limit from 1 to 20, and returns snippets, linked citations, and release metadata.
- `get_section` retrieves a section by canonical path, with optional offset and length values. Results include text, citations, release metadata, and pagination fields.
- `list_titles` returns published title names, canonical site URLs, citations, and release metadata without requiring input.

The `uscode://citation-guide` resource and `cite_statutes(question)` prompt provide citation guidance. For statutory claims or quotations, use the returned `inlineCitation` or `legalCitation` and its uscode.ecfr.io URL.

## Limitations and notes

Release metadata identifies the published OLRC release and its source date; it is not a real-time check for later amendments. Include the release information when currency matters. API and MCP failures are distinct from empty search results: tool failures set `isError`, while HTTP failures use JSON status responses such as 400, 404, 405, or 503.

Use bounded requests and cache appropriately. The repository has no published npm package for installation with `npx`, so local setup requires cloning the source. The service and its HTTP API are read-only and require no credentials.

_Full upstream README: https://allmcps.com/mcp/us-code-federal-statutes/readme_

