Skip to main content
Glama

Docket

Python 3.13+ License: MIT MCP

Universal Public Record Interface β€” An MCP Server that connects AI agents to public data.


What is Docket?

Docket bridges AI agents and the global ecosystem of public records through the Model Context Protocol. It provides type-safe, validated access to datasets from thousands of government portals powered by the Socrata Open Data API.

Think of it as "USB-C for public data access" β€” a universal connector between AI and government data.


Related MCP server: MCP Data Cook County

Quick Start

# Clone and install
git clone https://github.com/your-org/docket.git && cd docket
uv sync

# Run the server
uv run src/docket/server.py

For detailed setup, see the Getting Started Tutorial.


Features

  • πŸ” Semantic Search β€” Find datasets across 1000+ government portals

  • πŸ“Š Dynamic Schema Generation β€” Auto-generate Pydantic models from any dataset

  • βœ… Runtime Validation β€” Type-checked records with automatic error handling

  • πŸ”Œ MCP Compatible β€” Works with Claude Desktop and any MCP-compliant host

  • πŸš€ Streaming Pagination β€” Memory-efficient handling of large datasets

  • πŸ” Input Validation β€” Secure by default with comprehensive input sanitization


Documentation

πŸ“– Full Documentation

Section

Description

Getting Started

First-time setup and hello world

Claude Desktop

Connect Docket to Claude

Query Datasets

Search and fetch public records

Tools Reference

Complete API specification

Architecture

System design and MCP details


Available Tools

Tool

Description

search_public_records

Search across Socrata catalogs for datasets

fetch_dataset_schema

Get JSON Schema for a dataset's structure

query_dataset_records

Retrieve validated records from a dataset


Configuration

Create a .env file from the template:

cp .env.example .env

Add your Socrata App Token for higher rate limits:

SOCRATA_APP_TOKEN=your_token_here

Claude Desktop Integration

Add to your Claude Desktop config:

{
  "mcpServers": {
    "docket": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/docket", "src/docket/server.py"],
      "env": {
        "SOCRATA_APP_TOKEN": "your_token_here"
      }
    }
  }
}

See How to Connect to Claude Desktop for details.


Example Usage

Once connected to Claude Desktop:

"Find parking violation datasets in New York City"

"What columns are in the 311 complaints dataset (erm2-nwe9)?"

"Get me 20 recent building permit records from Seattle"


Requirements

  • Python 3.13+

  • uv (recommended) or pip

  • Socrata App Token (optional but recommended)


Development

# Install dev dependencies
uv sync

# Run tests
uv run pytest

# Type check
uv run mypy src/

# Lint
uv run ruff check src/

Contributing

Contributions are welcome! Please see our contributing guidelines (coming soon).

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Run tests and linting

  5. Submit a pull request


License

MIT License β€” see LICENSE for details.


Acknowledgments

Available Tools

3 tools
fetch_dataset_schemaB

Get the schema (columns, types) for a specific dataset.

Args: resource_id: 4x4 dataset identifier (e.g., "erm2-nwe9") domain: Socrata portal domain

Inputs: resource_id (required), domain.

query_dataset_recordsC

Fetch records from a dataset with validation.

Args: resource_id: 4x4 dataset identifier limit: Max records to return domain: Socrata portal domain

Inputs: resource_id (required), limit, domain. Returns: result

search_public_recordsB

Search for public datasets across Socrata-powered portals.

Args: query: Search keywords (e.g., "parking violations", "building permits") limit: Max number of results (default: 5) domains: Optional list of domains to filter by.

Inputs: query (required), limit, domains. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools map to distinct stages of a workflow: find datasets, inspect schema, retrieve records. However, 'search_public_records' actually searches dataset metadata (not records), which could be confused with 'query_dataset_records' that does fetch records, creating a mild naming-driven ambiguity.

    Naming Consistency4/5

    All three follow a snake_case verb_noun pattern (search_, fetch_, query_), which is largely consistent. The verbs differ (search/fetch/query) in a way that is readable but slightly less uniform than an ideal set.

    Tool Count4/5

    Three tools is on the lean side but justified: discovery, schema inspection, and record retrieval form a complete minimal workflow with no redundant tools. It sits at the lower edge of the ideal range.

    Completeness3/5

    The core discover-schema-query lifecycle is covered, but query_dataset_records only supports a limit with no offset/pagination, filtering, or aggregation, which will block agents on anything beyond the first N records. Dataset-level metadata (row counts, last updated) is also absent.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to search, explore, and query San Francisco's open data portal through a standardized interface for public datasets. It supports SQL-like querying via the Socrata platform and includes features like fuzzy column matching and schema caching.
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that gives LLM agents typed, cached access to civic open-data portals via Socrata (SODA 2.1 + Discovery API), enabling search, query, profiling, sampling, and CSV export of datasets.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to query U.S. public-health datasets such as disease surveillance, mortality, behavioral risk factors, and flu activity through the Socrata API, using natural language or direct tool calls.
      296 npm
      MIT