croissant-validation

croissant-validation

Validates MLCommons Croissant dataset metadata (JSON-LD) for schema compliance, as a stateless MCP server.

Category
Visit Server

README

🥐 croissant-validation

A stateless MCP server for validating MLCommons Croissant dataset metadata — built as a working demonstration of the MCP 2026-07-28 specification, the revision that made the Model Context Protocol stateless.

Live endpoint: https://croissant-validation.jetty.bot/mcp

Why this exists

The 2026-07-28 spec removed the initialize/notifications/initialized handshake and the Mcp-Session-Id header. Every request is now self-contained: protocol version and client capabilities travel in _meta, and servers advertise themselves via server/discover. That means an MCP server can run on plain serverless functions behind any load balancer — no sticky sessions, no shared session store.

This repo is exactly that: the MCP Python SDK v2 (mcp==2.0.0, released alongside the spec) serving Croissant validation from Vercel serverless functions. Validation is performed by the official mlcroissant library — the same checks as the MLCommons croissant-validator, previously hosted in the mlcbakery MCP server.

Tools

Tool Description
validate_croissant Validate a Croissant JSON-LD document (object or JSON string) against the Croissant schema. Returns per-check results, blocking errors, and non-blocking warnings.
validate_croissant_url Fetch metadata from a URL (e.g. a Hugging Face dataset's /croissant endpoint) and validate it.
pdf_to_croissant Generate Croissant metadata from an academic paper: give it a PDF URL and a Jetty agent in an isolated sandbox reads the paper, extracts dataset metadata, writes croissant.json, and validates it — the MCP version of mlcroissant.jetty.bot. Runs take 2–5 minutes.
croissant_run_status Poll a running pdf_to_croissant job. Done when status is completed and croissant.json is in files.
croissant_run_result Fetch an output file from a completed run — croissant.json comes back parsed and re-validated by this server's own validator.

The generation tools mirror the API flow of jettyio/pdf2croissant (upload → runbook launch → trajectory poll → file download) and vendor its runbook verbatim. They need a JETTY_API_TOKEN_PDF2CROISSANT environment variable; without it, the validation tools still work — validation is pure and stateless.

Connect

Claude Code:

claude mcp add --transport http croissant-validator https://croissant-validation.jetty.bot/mcp

Or any MCP client that speaks Streamable HTTP — clients on the 2025-era protocol still work; the SDK answers the legacy handshake alongside server/discover.

One raw stateless request

No handshake — a single POST does everything:

curl -sS https://croissant-validation.jetty.bot/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'MCP-Protocol-Version: 2026-07-28' \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": {
      "name": "validate_croissant_url",
      "arguments": {"url": "https://huggingface.co/api/datasets/mnist/croissant"},
      "_meta": {
        "io.modelcontextprotocol/protocolVersion": "2026-07-28",
        "io.modelcontextprotocol/clientCapabilities": {}
      }
    }
  }'

The params._meta envelope replaces the old initialize handshake — the protocol version and client capabilities ride along on every request instead of being negotiated up front. (The server rejects 2026-07-28 requests without it.)

Development

uv sync
uv run pytest -q                                  # validation + stateless HTTP round-trip tests
uv run uvicorn croissant_mcp.server:app --reload  # local server on :8000

Layout:

  • croissant_mcp/validation.py — mlcroissant-backed validation (JSON well-formedness → Croissant schema; warnings surfaced from mlcroissant's issue tracker)
  • croissant_mcp/server.py — MCPServer definition, tools, landing page, and the stateless Streamable HTTP ASGI app (stateless_http=True, json_response=True)
  • main.py — Vercel entrypoint (the Python backend builder serves the ASGI app on all routes)
  • examples/ — a valid Croissant file (Titanic, from the MLCommons repo) and an invalid variant (invalid-not-a-dataset.json, missing its @type)

Record-set generation checks (actually materializing data) are intentionally out of scope here — they can download arbitrarily large files, which doesn't belong in a serverless request. Schema validation is the static contract check.

Deploy

Deployed on Vercel (Python runtime, Fluid Compute). The one serverless-specific consideration: streamable_http_app() starts its session manager via ASGI lifespan, which Vercel now runs. In stateless mode there is no cross-request state, so cold starts and horizontal scaling are free.

Roadmap

License

MIT

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