mcp-server-api-client
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-api-client GET https://api.example.com/users and assert the status is 200"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
atengk-mcp-server-api-client
📖 项目简介
atengk-mcp-server-api-client 是一款面向 AI Agent / LLM 的 Model Context Protocol (MCP) API 客户端服务端,基于 Python 3.11+ + MCP Python SDK v2 (MCPServer) + httpx + Pydantic v2 构建。
当前基线与演进规划
当前基线(
v0.1.0工程骨架):已完成标准化开源工程底座、CI/CD 质量门禁、提交/发版守卫及最小可运行MCPServer服务骨架(内置就绪探针工具ping)。规划核心能力:
多协议请求执行:基于
httpx.AsyncClient的异步 HTTP/REST/GraphQL 请求调用、超时防线、连接池与流式/大响应体安全裁剪;OpenAPI / Swagger 契约解析:导入并检索接口定义、自动生成合规测试参数;
多环境与鉴权管理:隔离开发/测试/生产环境变量,支持 Bearer、API Key、Basic、OAuth2 与敏感头自动脱敏;
响应断言与 cURL 互转:结构化提取 JSONPath / 响应校验规则,以及与标准
cURL命令的双向转换。
Related MCP server: cURL MCP Server
🛠️ 快速开始
1. 环境准备
请确保本地已安装:
Python:
>= 3.11uv:Python 包与虚拟环境管理工具
2. 本地安装与校验
# 1. 克隆仓库并激活本地提交规范钩子 (Conventional Commits 守门)
git clone https://github.com/atengk/mcp-server-api-client.git
cd mcp-server-api-client
git config core.hooksPath .githooks
# 2. 同步依赖与开发工具链
uv sync --all-extras --dev
# 3. 查看版本与命令行参数
uv run mcp-server-api-client --version
uv run mcp-server-api-client --help
# 4. 运行代码规范扫描、格式化检查与单元测试
uv run ruff check .
uv run ruff format --check .
uv run pytest3. MCP 客户端接入示例
在支持 MCP 的客户端(如 Claude Desktop、Cursor、Antigravity 等)配置中添加本地源码启动项:
{
"mcpServers": {
"api-client": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-server-api-client",
"run",
"mcp-server-api-client"
]
}
}
}4. 内置就绪探针工具 (ping)
当前骨架内置最小就绪探针工具 ping,用于校验 MCP 服务端实例与客户端连通性:
{
"status": "ok",
"server": "mcp-server-api-client",
"version": "0.1.0"
}🚀 版本发版与发布
本项目基于 .github/workflows/release.yml 实现自动化发版(前置质量门禁 + uv build 不可变产物 + GitHub Release + 按需分发 PyPI / GHCR 容器镜像):
GitHub 网页端一键发版:前往仓库 Actions -> Release -> Run workflow,填入版本号(如
v0.1.0)即可;原生 Git 标签发版:
git tag -a v0.1.0 -m "Release v0.1.0" && git push origin v0.1.0;本地防呆发版脚本:运行
bash scripts/release.sh --dry-run预检,确认后运行bash scripts/release.sh(自动执行uv version递增并校验主干同步状态)。
📂 仓库目录结构
.
├── .githooks/
│ └── commit-msg # Git 原生 Conventional Commits 提交校验钩子
├── .github/
│ ├── ISSUE_TEMPLATE/ # Bug 反馈与特性建议 Issue 模板
│ ├── workflows/
│ │ ├── ci.yml # Python (uv) + Ruff + ShellCheck + pytest 分层门禁
│ │ └── release.yml # 统合发版编排流水线 (Release / PyPI / GHCR)
│ ├── CODEOWNERS # PR 代码属主自动指派配置
│ ├── dependabot.yml # GitHub Actions 与 Python 依赖月度自动巡检
│ └── PULL_REQUEST_TEMPLATE.md # Pull Request 标准模板
├── scripts/
│ ├── commit.sh # 规范化提交助手 (支持交互向导与 AI 非交互调用)
│ └── release.sh # 发版防呆脚本 (支持 Pre-flight 自检与版本号递增)
├── src/
│ └── mcp_server_api_client/ # MCP Server 核心源码包
│ ├── __init__.py # 包版本元数据入口
│ ├── __main__.py # CLI 启动入口 (stdio / sse / streamable-http)
│ └── server.py # MCPServer 服务构造与工具注册
├── tests/
│ └── test_smoke.py # 基础包结构、探针工具与 CLI 冒烟测试
├── .cliff.toml # git-cliff 自动化变更日志配置
├── .dockerignore # Docker 构建上下文忽略配置
├── .editorconfig # 跨编辑器编码与缩进规范
├── .gitattributes # 跨平台换行符归一化配置 (强制 LF)
├── .gitignore # Python / uv 与通用忽略配置
├── AGENTS.md # Python (MCP SDK v2) 工程规范与 AI Agent 协作准则
├── CODE_OF_CONDUCT.md # 社区行为准则
├── CONTRIBUTING.md # 贡献指南与提交/发版规范
├── LICENSE # 开源许可证 (Apache-2.0)
├── pyproject.toml # Python 项目元数据、依赖与 Ruff/pytest 配置
├── README.md # 项目主文档
└── SECURITY.md # 安全策略与漏洞披露指南🤝 参与贡献
欢迎提交 Issue 与 Pull Request!参与前请先阅读:
📄 开源许可证
本项目基于 Apache License 2.0 协议开源。
Available Tools
1 toolpingA
检查 API 客户端 MCP Server 是否处于就绪运行状态。
Returns: 包含服务状态、实例名称与版本号的结构化响应。
Inputs: no named parameters. Returns: MCP 服务就绪探针返回结果模型。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only a single tool there is nothing to confuse, so an agent cannot misselect. However, the surface provides no evidence of boundary design, so it cannot earn a top score.
"ping" is a conventional, readable verb-style name, but a single tool gives no pattern to evaluate for consistency. Neutral score reflects the absence of any naming convention to judge.
One tool is far too thin for a server billed as an "API client" — the only capability is a readiness check. There is essentially no functional surface to scope.
The server exposes no API-calling operations at all (no request, list endpoints, auth, or response handling), only a health probe. This is a severely incomplete surface for the stated purpose.
Maintenance
Related MCP Connectors
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Email inboxes, webhooks, mock APIs, 2FA codes, approvals and 170 tools for AI agents.
Create, test, and manage uptime monitors for websites and APIs from your AI agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables automatic HTTP requests (GET, POST, PUT, DELETE, etc.) with JSON validation and proxy support. Supports custom headers, request bodies, and environment variable configuration for seamless API integration.1MIT
- AlicenseAqualityBmaintenanceEnables LLMs to make HTTP requests using structured cURL commands with support for multiple authentication methods, custom headers, and comprehensive request/response control.24MIT
- AlicenseAqualityDmaintenanceEnables AI agents to send HTTP requests to any endpoint with full control over methods, headers, query parameters, and request bodies.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to inspect, test, validate, compare, and debug HTTP APIs through a structured toolkit, with features such as secret redaction, response contract validation, regression comparison, health checks, and incident investigation workflows.MIT