Skip to main content

mcp

Run the explicit read-only MCP tool surface. Requires pip install 'metawarc[mcp]'.

metawarc mcp --dbfile collection.db # stdio
metawarc mcp --dbfile collection.db --transport http # loopback only by default
metawarc mcp --dbfile collection.db --transport http --host 0.0.0.0 --allow-insecure

--transport: stdio (default), http, or sse. --host: default 127.0.0.1. --port: default 8191.

Non-loopback HTTP/SSE binding requires --allow-insecure.

Tools​

The server exposes seven allowlisted read-only tools. No raw SQL, filesystem paths, payloads, or mutations.

ToolPurpose
list_archivesRegistered WARC archives and catalog status
list_recordsRecord metadata with typed filters (allowlisted fields, bound values; default limit 50, max page 100)
get_record_metadataOne indexed record by archive ID and WARC record ID
get_record_headersStored HTTP headers for one record
search_recordsPhrase-search across the indexed texts sidecar (requires metawarc index-content --text)
collection_statsPer-dimension rollups via AnalysisService.summary (mime, ext, status, host, date, size_bucket)
metadata_summaryPer-type extraction rollups via AnalysisService.stored_metadata (pdfs, images, ooxmldocs, oledocs, videos, audio, fonts, or all)

See MCP integration and Agents and MCP.