Skip to main content

mcp-metsuke-crunchtools

Stateful reports catalog MCP server. Metsuke (目付 — the Sengoku intelligence officer who gathered field reports and compiled them for the daimyō) is the durable, cross-agent home for report definitions and their gathered outputs.

An autonomous gatherer reads a definition, sweeps the configured sources, and writes findings — each carrying its own source URL. A compiler later reads the freshest output to draft a fully cited report. This replaces ad-hoc, run-scoped research caches with a real, queryable store.

Features

  • Definitions + outputs — separate what-to-gather from what-was-gathered
  • Built-in scheduler — Metsuke fires each definition's gather when its cron schedule comes due, or on demand via trigger_report — no external timer
  • Run lifecycle — every fire opens a durable run with a second-granularity run_id: a provisional row is recorded before the callback (a fire is never lost), and a per-report concurrency lock keeps two gathers from racing
  • Cited findings — payloads carry per-finding source URLs for one-click checking
  • Re-homeable gathering — owner_agent makes the gatherer identity data, not code
  • Local-first — plain SQLite (WAL), no external services, no per-seat fees
  • Three transports — stdio, SSE, streamable-http

Install

uvx mcp-metsuke-crunchtools

pip

pip install mcp-metsuke-crunchtools

Container

podman run --rm -v ~/.local/share/mcp-metsuke:/data:Z \
  quay.io/crunchtools/mcp-metsuke \
  --transport streamable-http --host 0.0.0.0 --port 8009

Claude Code Integration

claude mcp add mcp-metsuke-crunchtools -- uvx mcp-metsuke-crunchtools

Tools (9)

Definitions (4)

Tool Description
list_reports List all report definitions in the catalog, each with its next scheduled fire time.
get_spec Return the gather prompt + source config for one definition.
upsert_definition Create or update a definition (name, prompt, owner, cron schedule, timezone, sources).
trigger_report Fire a report gather right now, without waiting for its schedule.

Outputs (5)

Tool Description
save_output Complete a run by persisting its gathered findings (pass the run_id from the fire callback; each finding ideally carrying a source URL).
get_output Read the freshest output (or a specific day's) for compiling a report.
list_outputs Browse the run history — metadata + finding_count per saved gather, no payloads.
delete_output Delete one saved output by id.
prune_outputs Bulk-prune a report's outputs — keep the N newest, or drop those before a date.

Environment Variables

Variable Default Description
METSUKE_DB ~/.local/share/mcp-metsuke/metsuke.db SQLite database path
METSUKE_DB_FILE (none) Path whose contents override METSUKE_DB (container secret-file convention)
TRENTINA_ALERT_URL (none) Base URL of the Trentina alert endpoint the scheduler POSTs gather callbacks to
METSUKE_ALERT_TOKEN (none) Alert token identifying the reports profile; enables the scheduler when set with TRENTINA_ALERT_URL
METSUKE_ALERT_TOKEN_FILE (none) Path whose contents override METSUKE_ALERT_TOKEN (container secret-file convention)
METSUKE_SCHEDULER_POLL_SECONDS 60 How often the scheduler checks for due reports
METSUKE_SCHEDULER_ENABLED (auto) Force the scheduler on/off; defaults to on when the callback is configured
METSUKE_RUN_LOCK_TTL_SECONDS 1800 How long an in-flight run holds the per-report lock before it is expired (self-heals a dead gatherer)

The scheduler runs only under the sse and streamable-http transports (the long-lived production processes), never under stdio.

Data Model

  • report_definitions — name (PK), gather_prompt, owner_agent, schedule (cron), timezone (IANA), source_config (JSON), last_fired_at, updated_at
  • report_outputs (one row per run) — id, report_name (FK), run_id (second-granularity identity), trigger (scheduled/manual/direct), gathered_at, finished_at, window_start/window_end, payload (JSON findings with source URLs), status (gathering/ready/compiled/failed), gatherer_run_ref, detail. A partial unique index on (report_name) WHERE status='gathering' is the per-report concurrency lock.

MCP Registry

io.github.crunchtools/metsuke

License

AGPL-3.0-or-later

Metadata

Release files for mcp-metsuke-crunchtools 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-metsuke-crunchtools 1.0.0
File Size Uploaded
mcp_metsuke_crunchtools-1.0.0.tar.gz 169.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-metsuke-crunchtools 1.0.0
File Interpreter ABI Platform
mcp_metsuke_crunchtools-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 205.6 kB

Release files / mcp_metsuke_crunchtools-1.0.0.tar.gz

Download URL mcp_metsuke_crunchtools-1.0.0.tar.gz
Size 169.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab13c7beb758600ffa0a7412fba89d0550f5b2c7ade519be2398c5e467a5df2a
BLAKE2b-256 checksum
How to use checksums
6bae9aeb5629a5cdc159bf85c5efab43bd4df05d87474139a61f45f349ead811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / mcp_metsuke_crunchtools-1.0.0-py3-none-any.whl

Download URL mcp_metsuke_crunchtools-1.0.0-py3-none-any.whl
Size 36.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc261137ed21e8290caeabad54264eff98e6766f8abdc3137bd0f0bab57f526d
BLAKE2b-256 checksum
How to use checksums
8eb79a8633b4535e88f66f82a86029b9ffea897cadc85a5c8c7a75795de0f8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

3.2.0

2 release files

2.2.0

2 release files

1.1.0

2 release files

This release

1.0.0 This release

2 release files

0.5.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page