Kiểm tra MCP server API
Kết nối MCP server từ xa, chạy initialize và liệt kê tools / prompts / resources, kiểm tra theo spec 2025-11-25, OAuth và mô tả tool đáng ngờ.
Truyền url của một MCP server (Model Context Protocol) từ xa. Công cụ dùng Streamable HTTP (trả JSON hoặc SSE, Mcp-Session-Id, MCP-Protocol-Version) và tự chuyển sang giao thức HTTP+SSE cũ khi cần. Nó chạy initialize, notifications/initialized, tools/list (đủ các trang), prompts/list và resources/list nếu server khai báo, thêm một lần gọi method không tồn tại để thử xử lý lỗi, rồi đóng phiên. Không bao giờ gọi tool trừ khi bạn chỉ định bằng call_tool (+ arguments).
Kiểm tra: cấu trúc JSON-RPC, phiên bản giao thức đã thương lượng, serverInfo và capabilities; với từng tool: độ dài và ký tự của tên (spec 2025-11-25), tên trùng, thiếu mô tả, cấu trúc inputSchema / outputSchema (type, properties, required), annotations; mã lỗi cho method không tồn tại. Bộ quét bảo mật cảnh báo mô tả có dấu hiệu prompt injection (bảo bỏ qua chỉ dẫn, giấu người dùng, thẻ <IMPORTANT>, file bí mật như ~/.ssh, bước ẩn, gửi dữ liệu đi nơi khác), ký tự Unicode vô hình, chuỗi mã hoá dài và tên trùng tool phổ biến (shadowing).
Khi gặp HTTP 401, công cụ kiểm tra chuỗi khám phá OAuth: WWW-Authenticate có resource_metadata, metadata protected resource (RFC 9728), metadata authorization server (RFC 8414 / OpenID), PKCE S256 và đăng ký client. Truyền token để kiểm tra server có bảo vệ (chỉ dùng cho lần gọi này, không lưu). format=badge trả badge SVG cho README. Kết luận: pass, warn hoặc fail.
Markdown · OpenAPI · Postman · llms.txt
Tham số
| Tên | Vị trí | Kiểu | Bắt buộc | Mặc định | |
|---|---|---|---|---|---|
url | query | string | có | Endpoint MCP, ví dụ https://mcp.example.com/mcp (hoặc URL /sse của server kiểu cũ). | |
token | body|query | string | không | Bearer token cho server có xác thực (nên dùng POST để token không nằm trong log của proxy). | |
transport | query | string | không | auto | auto, streamable hoặc sse (kiểu cũ). |
call_tool | body|query | string | không | Tên một tool sẽ được gọi với arguments (mặc định không gọi). | |
arguments | body|query | object | không | Đối tượng JSON tham số cho call_tool. | |
protocol_version | query | string | không | 2025-11-25 | Phiên bản giao thức đề nghị khi initialize. |
timeout | query | number | không | 15 | Tổng thời gian chờ, giây (3–25). |
format | query | string | không | badge: trả badge SVG thay vì JSON. |
Ví dụ
curl "https://apibox.io.vn/v1/mcp-check?url=https://mcp.deepwiki.com/mcp" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/mcp-check?url=https://mcp.deepwiki.com/mcp', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/mcp-check?url=https://mcp.deepwiki.com/mcp",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/mcp-check?url=https://mcp.deepwiki.com/mcp');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Kết quả trả về
{
"url": "https://mcp.deepwiki.com/mcp",
"checked_at": "2026-11-16T04:02:26.925Z",
"transport": "streamable_http",
"http_status": 200,
"auth_required": false,
"server": {
"name": "DeepWiki",
"title": null,
"version": "4.0.2",
"protocol_version": "2025-11-25",
"capabilities": [
"logging",
"prompts",
"resources",
"tools"
],
"instructions": "DeepWiki MCP provides AI-powered documentation for GitHub repositories. …",
"session": false
},
"tools": [
{
"name": "ask_wiki_question",
"title": "Ask Wiki Question",
"description": "Ask any question about a GitHub repository's codebase and get an AI-powered answer\ngrounded in its DeepWiki.",
"params": [
"repoName",
"question"
],
"required": [
"repoName",
"question"
],
"has_output_schema": true,
"annotations": null,
"issues": 0
},
{
"name": "read_wiki_contents",
"title": "Read Wiki Contents",
"description": "View documentation about a GitHub repository.",
"params": [
"repoName"
],
"required": [
"repoName"
],
"has_output_schema": true,
"annotations": null,
"issues": 0
},
{
"name": "read_wiki_structure",
"title": "Read Wiki Structure",
"description": "Get a list of documentation topics for a GitHub repository.",
"params": [
"repoName"
],
"required": [
"repoName"
],
"has_output_schema": true,
"annotations": null,
"issues": 0
}
],
"tools_count": 3,
"prompts_count": 0,
"prompts": [],
"resources_count": 0,
"resources": [],
"verdict": "pass",
"summary": {
"errors": 0,
"warnings": 0,
"infos": 0,
"ms": 3651
},
"issues": [],
"note": "Only initialize, notifications/initialized, tools/list, prompts/list, resources/list and one unknown-method probe are sent; tools/call only when \"call_tool\" is given. The token is used for this check only and is not stored."
}
Ứng dụng
- Kiểm thử hồi quy MCP server trong CI sau mỗi lần deploy
- Rà soát MCP server của bên thứ ba xem có mô tả tool độc trước khi thêm vào Claude, Cursor, VS Code
- Gỡ lỗi khám phá OAuth khi client không kết nối được
- Gắn badge "MCP: pass" vào README của server
Hỏi đáp
Công cụ có chạy tool của tôi không?
Không. Chỉ gửi các lệnh liệt kê. Tool chỉ được gọi khi bạn truyền call_tool kèm tham số, nên bạn tự quyết định có an toàn hay không.
Hỗ trợ những giao thức nào?
Streamable HTTP (giao thức hiện hành, trả JSON hoặc SSE) và giao thức HTTP+SSE cũ để dự phòng. Server stdio chạy trên máy bạn thì không truy cập được từ internet.
Token có bị lưu lại không?
Không. Token chỉ được gửi tới server trong lần kiểm tra này, không ghi log, không lưu. Nên dùng token ngắn hạn, chỉ đọc nếu có thể.
API liên quan
Tạo UUID
Sinh tối đa 1.000 UUID v4, UUID v7 theo thời gian, ULID, Nano ID hoặc mã hex ngẫu nhiên mỗi request. Ngẫu nhiên an toàn, hỗ trợ chữ in hoa.
⏱Phân tích biểu thức cron
Kiểm tra biểu thức cron và xem các lần chạy tiếp theo theo múi giờ bất kỳ, kèm mô tả dễ hiểu. Hỗ trợ cú pháp cron 5, 6 và 7 trường.
🕒Giờ & múi giờ
Lấy giờ hiện tại ở mọi múi giờ, đổi giữa các múi giờ và Unix timestamp (giây hoặc mili giây), kèm độ lệch UTC và thứ trong tuần cho tối đa 30 múi giờ.