Skip to main content
Glama
MahaR54

API Debugger MCP

by MahaR54

API Debugger MCP 🚀

基于 FastMCP 构建的、面向生产环境的 Model Context Protocol (MCP) 服务器,用于检查、测试、验证、比较和调试 HTTP API。

为什么做这个项目?

API 故障的排查往往需要在 API 客户端、OpenAPI 文档、日志、测试套件和 bug 跟踪器之间来回切换。API Debugger MCP 为兼容 MCP 的 AI 代理提供了一套结构化工具包,以便执行这些调查工作。

Related MCP server: mcp-api-tools

功能特性

  • 12 个 MCP 工具,用于 API 调试和 QA

  • 对常见凭据字段和请求头进行安全的敏感信息脱敏

  • 可配置的超时和响应大小限制

  • 默认阻止私有/本地网络访问

  • JSON-schema 风格的响应契约验证

  • 响应体之间的回归比较

  • 多端点健康检查

  • 自动化 API 测试场景生成

  • 结构化 bug 报告生成

  • 端到端事件调查工作流

  • MCP 资源和可复用的提示词

  • Docker 支持

  • Pytest + coverage

  • Ruff 代码检查

  • 支持 Python 3.10–3.12 的 GitHub Actions CI

MCP 工具

  1. inspect_endpoint

  2. send_request

  3. validate_response

  4. compare_responses

  5. analyze_error

  6. detect_api_issue

  7. generate_api_tests

  8. generate_bug_report

  9. check_contract

  10. api_health_check

  11. redact_sensitive_data

  12. investigate_incident

项目结构

api-debugger-mcp/
├── .github/workflows/ci.yml
├── docs/
├── src/api_debugger_mcp/
│   ├── analysis.py
│   ├── client.py
│   ├── config.py
│   ├── models.py
│   ├── security.py
│   ├── server.py
│   └── tools.py
├── tests/
├── .dockerignore
├── .env.example
├── .gitignore
├── Dockerfile
├── LICENSE
├── Makefile
├── docker-compose.yml
└── pyproject.toml

快速开始

1. 创建虚拟环境

python -m venv .venv

Windows:

.venv\Scripts\activate

macOS/Linux:

source .venv/bin/activate

2. 安装

pip install -e ".[dev]"

3. 配置

.env.example 复制为 .env,并且只设置环境所需的值。

切勿提交真实环境中的 API 密钥或 bearer 令牌。

4. 本地运行

对于 HTTP MCP 服务器:

api-debugger-mcp

默认 MCP 端点为:

http://localhost:8000/mcp

对于本地 stdio 模式:

MCP_TRANSPORT=stdio

然后运行:

api-debugger-mcp

Docker

docker compose up --build

服务器暴露在 8000 端口上。

测试

pytest

Lint(代码检查):

ruff check .

格式化:

ruff format .

示例 MCP 工作流

兼容 MCP 的代理可以这样组合工具使用:

investigate_incident
    ↓
inspect_endpoint
    ↓
send_request
    ↓
detect_api_issue
    ↓
analyze_error
    ↓
check_contract
    ↓
generate_bug_report

用于回归测试:

send_request (baseline)
        ↓
send_request (current)
        ↓
compare_responses
        ↓
validate_response

安全说明

该服务器的默认设计目标就是避免意外泄露凭据和不安全的网络访问。

  • 常见的 auth/cookie/API-key 请求头会在返回结果中脱敏。

  • 常见的敏感字段会被递归脱敏。

  • 默认阻止对本地/私有网络地址的请求。

  • 不要提交含真实凭据的 .env 文件。

  • 生产环境中,将 MCP 服务器置于组织的身份验证和网络访问控制之后。

  • 在敏感化环境中启用私有网络请求时,先增加明文访问白名单。

生产路线图

  • OpenAPI 3.x 导入和端点发现

  • OAuth/API-key 密钥提供者

  • 持久化基线

  • Sentry/可观测系统集成

  • Jira/GitHub issue 创建

  • 请求关联 ID

  • 限流

  • 审计日志

  • RBAC/身份验证

  • 异步并行健康检查

  • 支持长时间运行的调查的 MCP 任务/后台执行

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI agents to dynamically discover and interact with APIs through Swagger/OpenAPI specifications and Postman collections using a strategic four-tool approach. It streamlines API integration by providing universal tools for endpoint discovery, detailed request information, and authenticated execution.
    1
  • A
    license
    A
    quality
    D
    maintenance
    A comprehensive suite of HTTP and API testing tools that enables AI agents to perform requests, check endpoint health, and decode JWTs. It also provides utilities for URL parsing and detailed security analysis of HTTP response headers.
    5
    37
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to perform comprehensive web application testing including visual, functional, performance, accessibility, and SEO analysis using browser automation without requiring API keys.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MahaR54/API-DEBUGGER-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server