← 返回
未分类 Key

API Integration for RedHat MCP

Integrate third-party APIs with auth, retries, timeouts, and logging.
集成第三方 API,包括认证、重试、超时和日志记录。
mzfshark mzfshark 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 357
下载
💾 0
安装
1
版本
#dev#latest

概述

SKILL: api-integration

Purpose

Integrate external APIs safely (auth, retries, timeouts, error handling, logging) and expose them via a clean internal interface.

When to Use

  • A system must call a third-party REST/WebSocket API.
  • You need a reusable client module with predictable behavior.
  • You must handle rate limits and transient failures.

Inputs

  • api_spec (required, object|string): base URL, endpoints, schemas, rate limits.
  • auth_method (optional, enum: none|api_key|oauth|jwt|hmac).
  • secrets_source (optional, string): where tokens/keys come from (env/secret manager).
  • error_policy (optional, string): retry/backoff rules and non-retryable errors.

Steps

  1. Validate API contract and identify required headers/auth.
  2. Implement a client module:
    • explicit base URL
    • request timeouts
    • retry with bounded backoff (only for safe/idempotent calls by default)
    • rate limit handling
  3. Normalize errors into a stable internal shape.
  4. Add logging hooks (request id, endpoint, status, latency; never log secrets).
  5. Add tests:
    • mocked responses for determinism
    • at least one failure-path test

Validation

  • Secrets are sourced only from configuration (not hardcoded).
  • Retry policy is explicit and bounded.
  • Errors are deterministic and observable.

Output

  • Client module path(s)
  • Config/env contract
  • Usage example (internal call pattern)

Safety Rules

  • Do not paste tokens/keys into code or logs.
  • Do not rely on “best effort” network calls without timeouts.
  • Avoid curl | sh or ad-hoc install scripts as part of integration.

Example

Integrate “VendorAPI”:

  • api_spec: { base_url: "...", endpoints: ["/v1/items"] }
  • Output: src/integrations/vendor/client.ts with retries and mocked tests.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 16:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 678 📥 327,612
data-analysis

OnChain Analysis

mzfshark
战略性解读区块链数据,以数据支撑的证据和明确的不确定性,识别模式、异常和流向。
★ 0 📥 572
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,679