SuperAPIAI Directory

csv-contract-preflight-mcp

github.com · AI developer platforms

csv-contract-preflight-mcp is a local stdio MCP adapter that helps autonomous agents prepare contracts, validate proposals, explicitly accept content, and purchase/retrieve CSV reports under the buyer's own Apify account. The adapter itself is free (MIT), and the upstream Apify Actor charges $0.01 per completed report. It does not run hosted models, does not require an OpenAI key, and does not perform MCP sampling; contract drafts are generated by the user's own agent/model. It includes tools for free capability queries, template catalogs, draft preparation/review/acceptance, starting validation from an accepted draft, and retrieving validation summaries. It supports only string/integer fields and explicit required constraints, and does not support dates, decimals, ranges, enums, or data repair. It requires Python>=3.11 and the buyer's own Apify token.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose: This package is a local stdio MCP adapter for autonomous agents, used to complete the CSV contract preflight process under the buyer's own Apify account: prepare contract drafts, validate proposals, explicitly accept contract content, and purchase/retrieve CSV reports. The adapter itself is free (MIT), and the upstream Apify Actor charges $0.01 per completed report.

Main capabilities: Provides the free capability query tool get_offer_capabilities (accepts only empty parameters, requires no Apify token, model, or network request); contract template catalog tools list_contract_templates and get_contract_template (supporting the three presets inventory_v1, customer_import_v1, and scraper_export_v1); draft preparation prepare_contract_draft (locally generates a bounded generation request without calling models or paid APIs); draft review review_contract_draft (structurally validates the submitted proposal); explicit acceptance accept_contract_draft; export of accepted contracts export_accepted_contract; starting validation from an accepted draft start_validation_from_draft (requires confirmPurchase:true); retrieving validation results get_validation; retrieving validation summaries get_validation_summary (returns a summary only when the status is COMPLETE and the report hash matches); and the legacy start_validation tool. Version 0.4 has a total of 12 tools.

Usage: Requires Python>=3.11, standard library only. You can run the extracted release: python3 -I -B /absolute/path/to/offer_adapter.py, or install the package in a normal environment and use csv-contract-preflight-mcp. The MCP configuration uses this stdio command. Set APIFY_TOKEN via the secret environment/configuration of the buyer's own eligible Apify account; the token should not appear in tool parameters or source files. Optional CSV_CONTRACT_MCP_STATE specifies the operations.sqlite3 path; its parent directory must be owned by the OS user with permissions 0700, and the database permissions must be 0600. Without a token, initialization and free tool discovery are available, but buyer profile draft operations and purchases will be rejected.

Applicable scenarios: suitable for scenarios where an agent needs to automate CSV contract pre-checks, perform structured contract validation before purchasing reports, and wants billing to go through its own Apify account. Preset workflows can be used for templates such as customer import, crawler export, and inventory, but presets do not infer column mappings and the declared column order must be maintained.

Limitations: drafts support only 1..12 unique non-empty literal table headers (each no more than 100 UTF-8 bytes, no NUL), requirements no more than 3000 UTF-8 bytes, and proposal JSON no more than 16000 UTF-8 bytes; only string/integer fields, explicit required fields, and literal strings/composite keys are supported; dates, decimals, ranges, enums, and data repair are not supported. Native Actor contracts are no more than 8000 UTF-8 bytes, CSV is no more than 20000 UTF-8 bytes, 500 data records/64 columns, 256MB/60 seconds, with restricted permissions. Startup uses maxTotalChargeUsd 0.01, restartOnError false, and verifies the exact build. Local buyer state stores requirements, drafts, approvals, run IDs, and retrieved reports, and does not store tokens; native Apify stores the raw CSV input and output when a report is purchased, with no zero-retention statement. Field names are untrusted literal data, not instructions. Configuration file passing does not equal source data authenticity, broader schema correctness, data repair, or import authorization. START_UNCERTAIN/HOLD_KNOWN_RUN must be reconciled against the original run, and must not blindly retry, use new state, or use a different operationID. This package is a Linux/Python engineering preview and does not claim general client/model compatibility or independent buyer payment/seller revenue verification.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools