原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

MCP API Guardian

作者:petrovicistefan版本 0.1.2i★ –i在你的电脑上运行
注册名称io.github.petrovicistefan/mcp-api-guardian

安装

概览

作者提供的说明(英文原文)

Local OpenAPI contract and breaking-change checks for AI agents.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 开发者工具

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "api-guardian": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-api-guardian"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add api-guardian -- npx -y mcp-api-guardian

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "api-guardian": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-api-guardian"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "api-guardian": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-api-guardian"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 petrovicistefan 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“开发者工具”中的其他服务器比较i

  • 星标数多于此分类中其他 4914 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 4914 个服务器的 67% 更新
  • 基础检查结果等于或优于此分类中其他 4914 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

MCP API Guardian 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.2)于19天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:GitHub, Desktop Commander, Cloudflare MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

电脑或云端★ 34,245MIT4天前更新
安装

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

在你的电脑上运行★ 10,225MIT16天前更新
安装

Cloudflare MCP

作者:cloudflare

Cloudflare MCP servers

在云端运行★ 4,446Apache-2.014个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

MCP API Guardian

Stop your AI agent from breaking your API: OpenAPI contract checks and breaking-change diffs over MCP, fully local.

Local-first guardrails for AI coding agents working with OpenAPI specs: catch contract errors (missing operation IDs, unresolved references, public auth), detect breaking changes (removed operations, new required parameters, changed authentication), and keep API consumers working before you ship.

Zero configuration. No API keys. No network. Runs entirely on your machine via the Model Context Protocol.


Table of Contents

  • Quick Install
  • Why API Guardian
  • Tools
  • Use Cases
  • Comparison with Alternatives
  • Limitations
  • Run from Source
  • Roadmap
  • Hosted Path (Control Plane)
  • Contributing
  • License
  • More MCP Servers by the Author

Quick Install

One-Click Install

Cursor:

Or use the direct protocol link: cursor://anysphere.cursor-deeplink/mcp/install?name=api-guardian&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1hcGktZ3VhcmRpYW4iXX0=

Claude Code:

claude mcp add api-guardian -- npx -y mcp-api-guardian

Or if installed in the petrovicistefan/mcp-marketplace:

/plugin marketplace add petrovicistefan/mcp-marketplace
Manual Install

Claude Desktop:

Add to claude_desktop_config.json:

{

"mcpServers": { "api-guardian": { "command": "npx", "args": ["-y", "mcp-api-guardian"] } } }

Cursor:

Add to ~/.cursor/mcp.json:

{

"mcpServers": { "api-guardian": { "command": "npx", "args": ["-y", "mcp-api-guardian"] } } }

VS Code / GitHub Copilot:

Or manually create/edit .vscode/mcp.json:

{

"servers": { "api-guardian": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-api-guardian"] } } }

Windsurf:

Add to ~/.codeium/windsurf/mcp_config.json:

{

"mcpServers": { "api-guardian": { "command": "npx", "args": ["-y", "mcp-api-guardian"] } } }

Zed:

Add to your Zed settings.json:

{

"context_servers": { "api-guardian": { "command": "npx", "args": ["-y", "mcp-api-guardian"] } } }

Direct npx (one-line test):

npx -y mcp-api-guardian

⭐ Star This Repo If It Helps

Found this MCP useful? [Star this repository](https://github.com/petrovicistefan/mcp-api-guardian)!

A GitHub star helps other developers discover the project and lets you save it for later. Thanks for supporting open source!


Why API Guardian

AI coding agents increasingly modify OpenAPI specs as they work on API features, documentation, and integrations. A single agent iteration can:

  • Remove an operation a client depends on
  • Add a required request parameter without a default
  • Change an operationId that generated SDKs rely on
  • Accidentally publish a public endpoint with no authentication
  • Break external references or introduce duplicate IDs

API Guardian catches these before they break production. It provides two MCP tools your AI agent can call:

  1. `audit_openapi` — lints a single OpenAPI spec for contract errors, missing metadata, auth risks
  2. `compare_openapi` — diffs two spec versions and detects breaking changes

Fully local, read-only, zero dependencies. No telemetry, no API keys, no network calls.


Tools

API Guardian provides 2 MCP tools for validating OpenAPI 3.0.x and 3.1.x documents:

ToolDescriptionInputs
`audit_openapi`Static OpenAPI 3.0/3.1 lint and authentication declaration review. Does not call endpoints.spec (object): OpenAPI document as JSON

| `compare_openapi` | Find selected breaking changes between two OpenAPI documents; not exhaustive schema compatibility. | before (object): Original OpenAPI document after (object): Updated OpenAPI document |

audit_openapi({spec})

Static contract checks on a single OpenAPI spec:

  • Contract errors: Unresolved $ref references, missing info.title/info.version, invalid paths
  • Operation metadata: Missing or duplicate operationId, missing response definitions
  • Path parameters: All {param} placeholders must be declared as required path parameters
  • Security warnings: Public operations (no auth required), basic auth over HTTP, API keys in query strings
  • External references: Flags unchecked external $ref URLs (not fetched)

Reports errors and warnings with severity, location, and actionable messages. Explicitly states coverage limits.

compare_openapi({before, after})

Breaking-change detection between two OpenAPI spec versions:

  • Removed operations: Previously available endpoints deleted
  • Changed operation IDs: Generated clients and agents may depend on stable IDs
  • New required parameters: Added inline required parameters (clients can't provide them)
  • Request body requirement: Optional body became required
  • Removed response codes: Status codes clients may handle are gone
  • Security changes: Authentication requirements modified (warning-level)

Reports definite breaks (error) and potential compatibility issues (warning). Schema variance and composed schemas are not yet analyzed (see Limitations).


Use Cases

For Individual Developers

Prompt: "Audit the OpenAPI spec at api/openapi.json before I commit"

Your AI agent calls audit_openapi, catches a missing operation ID, and suggests a fix — before the PR.


For CI / PR Checks

Prompt: "Compare the OpenAPI spec on this branch to main and fail if there are breaking changes"

Your agent runs compare_openapi, detects a removed endpoint, and blocks the merge with an actionable report.


For Teams and Enterprises

Prompt: "Check all OpenAPI specs in api/ for public endpoints without authentication"

Your agent audits each spec, flags public operations, and generates a security review checklist.


Comparison with Alternatives

FeatureMCP API Guardianoasdiffpb33f/openapi-changesoptic (archived)
MCP integration✅ Native MCP server❌ CLI only❌ CLI only❌ CLI only
AI agent friendly✅ JSON-RPC stdio, designed for agents⚠️ CLI output parsing⚠️ CLI output parsing⚠️ Archived
Fully local (no network)✅ Zero network calls✅ Offline✅ Offline⚠️ Cloud offering existed
Breaking-change detection✅ Core feature✅ Comprehensive (773 checks)✅ Comprehensive✅ (legacy)
Static contract linting✅ Core feature⚠️ Validation only⚠️ Change-focused⚠️ Traffic-focused
Git revision comparison❌ Planned✅ Built-in✅ Built-in✅ (legacy)
Schema compatibility❌ Planned✅ Full✅ Full✅ (legacy)
HTML/Markdown reports❌ JSON only✅ Multiple formats✅ Multiple formats✅ (legacy)
LicenseMITApache 2.0GPL-3.0 / CommercialMIT (archived)

When to use API Guardian:

  • ✅ You want your AI agent (Claude, Cursor, etc.) to natively check OpenAPI contracts without CLI wrappers
  • ✅ You need local-first, zero-network validation (no external dependencies)
  • ✅ You want targeted linting + breaking-change detection in one MCP server

When to use alternatives:

  • Use oasdiff if you need the most comprehensive breaking-change ruleset (773 checks) and CI-native workflows
  • Use pb33f/openapi-changes if you need beautiful HTML/Markdown diff reports for human review
  • Both oasdiff and openapi-changes support full schema compatibility checks and git-native comparison, which API Guardian will add in future releases

Limitations

API Guardian is a targeted linter, not a complete OpenAPI validator. Current limitations:

  • ❌ YAML specs not supported: Only JSON OpenAPI documents are accepted. Pass parsed JSON objects to the MCP tools. YAML support is on the roadmap (see below).
  • ❌ External `$ref` not fetched: External HTTP/HTTPS references are flagged as warnings but not resolved or validated
  • ❌ Schema compatibility not checked: Request vs response variance, oneOf/anyOf/allOf composed schemas, and property-level breaking changes require a later release
  • ❌ Referenced parameters not compared: Only inline parameters are checked in compare_openapi
  • ❌ No live HTTP probes: Does not test actual API behavior or validate runtime responses
  • ❌ No filesystem access: You must pass the spec as a parsed JSON object (no file paths)

Public endpoints may be intentional; warnings are not proof of a vulnerability. Reports explicitly state coverage limits.


Run from Source

git clone https://github.com/petrovicistefan/mcp-api-guardian.git

cd mcp-api-guardian npm test npm start

Add to an MCP client's configuration, replacing the absolute path:

{

"mcpServers": { "api-guardian": { "command": "node", "args": ["/absolute/path/mcp-api-guardian/src/server.js"] } } }

Requirements: Node.js 22+


Roadmap

Future releases will add:

  1. YAML support: Parse and validate YAML OpenAPI specs (currently JSON only)
  2. Full schema compatibility: Detect property-level breaking changes, composed schemas (oneOf/anyOf/allOf), request vs response variance
  3. Local reference resolution: Fetch and validate external $ref references with configurable allowlists
  4. Git-native comparison: Compare specs across branches/commits without manual file extraction
  5. Live response validation: Opt-in HTTP probes with target allowlists, size limits, and secret redaction

Hosted Path (Control Plane)

The local stdio MCP server above stays fully useful without an account or network. Quotas are enforced only by a separate hosted HTTP process that reserves units on mcp-control-plane before running the same analysis core.

# Terminal 1 — control plane (see its README for ADMIN_TOKEN)

node --env-file=.env src/server.js # in mcp-control-plane

Terminal 2 — hosted api-guardian

cp .env.example .env # set CONTROL_PLANE_URL npm run start:hosted

Bootstrap a customer key with the control-plane admin API (POST /v1/admin/accounts, POST /v1/admin/keys). Then:

MethodPathBody
GET/healthLiveness
POST

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx