@certiwatt/mcp
v0.1.4
Published
MCP server for CertiWatt flight-safe power bank verification
Downloads
674
Maintainers
Readme
CertiWatt MCP server
Agent-facing MCP adapter for CertiWatt's HTTP API.
Package
npx -y @certiwatt/mcpTools
search_modelssearch_rulesget_modelverify_power_bankget_sources
The server intentionally stays thin. Canonical catalog, source, and verdict logic remain in the web/API layer.
Recommended agent flow
- If the user gives any product name, alias, or recall model, call
search_models. - If a canonical
model_idis found and model facts or related models matter, callget_model. - For the actual travel question, call
verify_power_bank. - If the user asks about a rule loosely, call
search_rules. - If the user asks "why" or requests evidence, call
get_sources.
Do not use search_rules as a substitute for product lookup. Product, recall, and related-model questions still begin with search_models.
Do not treat insufficient as a weak version of allowed. It means CertiWatt does not have enough verified coverage to produce a fully supported verdict.
If search_models returns no result and the user has not provided usable manual specs (watt_hour, or capacity_mah + voltage_v), ask for the device-label details instead of calling verify_power_bank just to force an insufficient response.
Example prompts
- "Can I fly with my Anker 737 from China to Japan on Cathay?"
- "Find the closest match for PowerCore 24K, then tell me if it can fly."
- "Show the evidence behind that power-bank verdict."
Error behavior
Malformed requests and server failures still raise errors.
Domain gaps are returned as structured results so an agent can continue reasoning:
MODEL_NOT_FOUNDAIRLINE_NOT_COVEREDCOUNTRY_NOT_COVEREDRULE_NOT_FOUND
These responses include:
statusreason_codemessagesuggested_next_stephttp_status
Production behavior
By default the published server calls:
https://certiwatt.app/apiNo API configuration is required for normal use:
npx -y @certiwatt/mcpLocal development
cd apps/mcp
npm install
npm run buildOnly override the API base URL when you are developing against a local web app:
CERTIWATT_API_BASE_URL=http://localhost:3004/api npm run devLocal tests
With the web app running locally on http://localhost:3004:
CERTIWATT_API_BASE_URL=http://localhost:3004/api npm run test:contract
CERTIWATT_API_BASE_URL=http://localhost:3004/api npm run test:protocoltest:contract validates the four tool handlers against the HTTP API.test:protocol starts the compiled MCP server over stdio, lists tools, and performs a real MCP tool call.
Repo-local plugin
The current plugin scaffold lives at:
plugins/certiwatt/Its .mcp.json launches:
npx -y @certiwatt/mcpPackaging
Validate the publishable tarball locally:
npm pack --dry-runExpected package contents are intentionally small:
dist/README.mdpackage.json
