mendapi

com.mendapi由 mendapi.com 发布v0.5.6更新于 Oct 24, 2026

Detect API breaking changes, scan your codebase for impact, and draft the fix. Runs locally.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 MCP 服务器,扫描代码库中上游 API 的破坏性变更并起草迁移差异。

可以做什么
扫描代码库中上游 API 的破坏性变更,给出文件、行号、符号和置信度,并列出项目依赖的 API 提供方与 SDK。根据扫描报告起草可审阅的迁移差异,并复核已有发现。读取本地同步的上游 API 变更数据,覆盖多家主要服务商。
适用场景
适合依赖频繁变更的第三方 SDK 或 API 的项目,希望助手发现破坏性变更并起草迁移差异,同时不让源代码离开本机。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 22.13 或更高版本。需先用 sync 命令拉取变更数据,这是唯一联网的步骤;之后扫描、修复和 MCP 工具均离线使用本地 SQLite 数据库。
安装前请注意
修复仅生成差异,未传入应用参数前不会改动文件;推送分支或创建拉取请求需显式传入推送参数。可选的托管面板上报默认关闭,且只发送元数据。修复用的拉取请求使用仅有内容读取和拉取请求写入权限的 GitHub App。

安装

在 SourceWeft 中

  1. 打开 控制台中的 mendapi,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mendapi

Dependabot, but for every API you depend on. We watch your upstream API providers for breaking changes, scan your codebase for impact, and open the fix PR before your integration breaks.

30 seconds to your first result

bash
# In any repo — zero config, zero npm dependenciesnpx mendapi sync                          # one network call: fetch the change feednpx mendapi scan --out impact.json        # local only, from here onnpx mendapi fix --from-report impact.json

sync pulls the upstream API change feed into a local SQLite database. It is the only command that touches the network, and you run it once (then whenever you want fresher data).

scan reports every upstream breaking change that actually hits your code — file, line, and symbol — scored for confidence. fix drafts the migration as a reviewable diff, without touching a single file until you pass --apply. Neither reads or writes anything outside your machine.

Using an AI coding agent? One line plugs mendapi into Claude Code as an MCP server (Cursor and every other MCP client work too — details below):

bash
claude mcp add mendapi -- npx mendapi mcp

Requires Node.js 22.13 or newer. Everything runs locally: the scanner, fixer, and review CLIs contain no network code at all.

Security model (read this first)

This tool is designed for teams that cannot let source code leave their machines. The security model is the product, not a FAQ entry:

  1. Your code never leaves your machine. The scanner runs locally or in your CI. Nothing is uploaded by default — there is no network code in the scanner, fixer, or review CLIs at all (mechanically enforced by our test suite, which fails the build if any network primitive appears in those files).
  2. Metadata-only reporting, opt-in only. If you ever choose to report results to a hosted dashboard, the payload builder (payload.js) is whitelist-constructed: provider names, SDK versions, file basenames, line numbers, and symbol names only. Code snippets are structurally impossible to include — the field does not exist in the payload schema. Reporting requires an explicit --report-to flag; it is never on by default.
  3. Secrets are redacted in depth. Fifteen secret patterns (OpenAI, Stripe, AWS, GitHub, Slack, JWT, bearer tokens, generic key assignments, and more) are scrubbed from every field of any outbound payload, and a pre-transmission assertion throws if a forbidden key or unredacted secret survives.
  4. Auditable by design. The CLI is open source so your security team can verify, line by line, exactly what is read and what (if anything) is sent.
  5. Minimal GitHub permissions. Fix PRs use a GitHub App scoped to contents:read + pull_requests:write on repos you choose. Never admin.
  6. Self-hosting available. Enterprise plans run the entire stack — change feed included — inside your firewall.

What it does

Three components form a closed loop:

ComponentRoleWhere it runs
WatcherMonitors 20 major API providers (Stripe, OpenAI, Anthropic, Shopify, Twilio, Slack, GitHub, Google, AWS, Plaid, PayPal, Meta, Cloudflare, Vercel, Supabase, Firebase, Notion, HubSpot, Salesforce, SendGrid) via SDK release feeds and official developer changelogs. Classifies each change (breaking / deprecation / additive / fix / docs-only) into a structured SQLite database.Our infrastructure (or yours, self-hosted)
ScannerReads the change database, detects which providers your repo actually uses (SDK imports, API hosts, env vars — context-aware, not naive grep), and pinpoints the exact files, lines, and symbols affected by each breaking change. Three-tier confidence scoring plus an optional LLM semantic review pass keeps false positives near zero.Locally, on your machine or CI
FixerApplies deterministic migration rule packs (e.g. openai-v3-to-v4, stripe-v7-to-v8) to produce a reviewable diff, then opens a fix PR on a dedicated branch with the official migration guide cited in the commit message.Locally by default; hosted for paid plans

Quickstart

Requires Node.js 22.13 or newer (uses built-in node:sqlite). Zero npm dependencies.

bash
# Fetch the latest API change feed (the only command that touches the network)mendapi sync
# Scan the current repo against the breaking-change database (zero config)mendapi scan
# Or scan a specific repo and save the reportmendapi scan --repo /path/to/your/repo --out impact.json
# Review medium-confidence findings (optional LLM semantic pass)mendapi review impact.json --pending
# Preview fixes (dry-run: writes a unified diff, changes nothing)mendapi fix --from-report impact.json
# Create a fix branch + commit + PR-ready description (local only;# --push is required to actually push, and is never implied)mendapi pr --repo /path/to/your/repo --from-report impact.json

Running from a checkout? node app/cli.js <command> works identically.

What a fix looks like

This is real output — the exact diff our test suite pins, byte for byte, for the openai-node v3 → v4 migration pack. Note the two lines that mention the legacy calls inside a string and a template literal: the codemod leaves both untouched, because rules anchor on call positions in the syntax tree, not on text patterns.

diff
--- a/lib/ai.js+++ b/lib/ai.js@@ -1,28 +1,27 @@ // Demo service using the legacy openai-node v3 SDK (pre-v4 breaking change). // Docs note: openai.createChatCompletion({...}) was the v3 entry point.-const { Configuration, OpenAIApi } = require('openai');+const OpenAI = require('openai');  // This string mentions the legacy call and must never be rewritten by the fixer: const LEGACY_HINT = 'if you still call openai.createChatCompletion( upgrade to v4'; const AUDIT_LOG_LINE = `migrating away from .createEmbedding( for tenant`; -const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY });-const openai = new OpenAIApi(configuration);+const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });  async function summarize(text) {-  const response = await openai.createChatCompletion({+  const response = await openai.chat.completions.create({     model: 'gpt-4',     messages: [{ role: 'user', content: `Summarize: ${text}` }],   });-  return response.data.choices[0].message.content;+  return response.choices[0].message.content; }  async function embed(text) {-  const response = await openai.createEmbedding({+  const response = await openai.embeddings.create({     model: 'text-embedding-ada-002',     input: text,   });-  return response.data.data[0].embedding;+  return response.data[0].embedding; }  module.exports = { summarize, embed };

Every migration pack ships with a pinned diff like this one; the build fails if a pack's output drifts from its gold evidence. Six more, embedded with the same byte-match guarantee, are on the provider guides: OpenAI, AWS, Cloudflare, PayPal, Vercel, Stripe, Shopify.

Use it from your AI coding agent (MCP)

mendapi mcp starts a Model Context Protocol server on stdio — offline-first, zero network: every tool call runs the local CLIs against the local SQLite database only, and the server ships with zero npm dependencies. It speaks the current MCP revision (2026-07-28, per-request _meta version negotiation + server/discover) and keeps full backward compatibility with older clients that use the initialize handshake (2025-06-18 / 2025-03-26) — a dual-era server, because a tool that repairs breaking changes should not ship one.

Claude Code (one line):

bash
claude mcp add mendapi -- npx mendapi mcp

Cursor (or any JSON-configured MCP client) — add to .cursor/mcp.json:

json
{  "mcpServers": {    "mendapi": { "command": "npx", "args": ["mendapi", "mcp"] }  }}

Tools exposed: scan, deps, fix, revalidate, changes — the same schema_version-stamped JSON as the CLI --json flags. See the For AI agents docs page for the full tool catalog and an autonomous-maintenance recipe.

Why precision matters

Alert fatigue kills tools like this. Our scanner gates every finding through:

  • Source-aware evidence rules — an SDK release only affects repos that import that SDK; a changelog entry about an API endpoint affects anyone calling that host.
  • Sub-API filtering for monorepo providers (Google, AWS) — a youtube release does not page the team that only uses S3.
  • Identifier-boundary symbol matching — getR never matches getRelatedArticles.
  • Context-aware env-var detection — process.env.STRIPE_KEY counts; a regex constant named META_RE does not.

Dogfooding across three production repos: the current pipeline reports zero false positives where an earlier naive version produced 27.

Measured in public

We benchmark the change database against real provider spec corpora and publish the full accounting — every headline number is recomputed from archived evidence by the site's build gates, so the reports cannot drift from the data:

Status

Published on npm as mendapi (v0.5.6). Early release — the change database and migration pack registry grow daily; interfaces may still shift before 1.0.

License

AGPL-3.0-only for the CLI (see LICENSE). Chosen so security teams can audit every line that reads code or builds a payload, and so hosted forks must share their changes.

来源:README.md,提交 2452f3c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.5.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分