从 64 到 100:站擎自己是怎么拿到 excellent 的
2026-10-07,站擎上线第 129 个工具「智能体就绪度诊断」。第一件事是拿自己跑一遍——结果只拿了 64 分。以下是完整的 24 小时修复记录。
100
EXCELLENT
智能体就绪度 · 7 项全通过
从 64 分(fair)到 100 分(excellent),7 个维度里 5 项有明确提升。
AI 爬虫声明
48 → 100
Markdown 协商
50 → 100
MCP 端点
40 → 100
API 目录
40 → 100
智能体认证
40 → 100
五步修复全过程
1
补全 13 个 AI 爬虫声明(48 → 100)
初始 robots.txt 只声明了 6 个 AI 爬虫,缺 ChatGPT-User / OAI-SearchBot / Claude-Web / Bytespider / Amazonbot / Applebot-Extended / Meta-ExternalAgent 共 7 个。
User-Agent: GPTBot
User-Agent: ChatGPT-User
User-Agent: OAI-SearchBot
User-Agent: ClaudeBot
User-Agent: Claude-Web
User-Agent: anthropic-ai
User-Agent: PerplexityBot
User-Agent: Google-Extended
User-Agent: CCBot
User-Agent: Bytespider
User-Agent: Amazonbot
User-Agent: Applebot-Extended
User-Agent: Meta-ExternalAgent
Allow: /
2
配置 Markdown 内容协商(50 → 100)
当 AI 智能体发送 Accept: text/markdown 时,服务器返回 .md 版本而不是 HTML。Token 消耗降低 60%,引用质量提升。
location = / {
root /www/wwwroot/zq/public;
add_header Vary Accept always;
if ($http_accept ~* "markdown") {
rewrite ^ /index.md last;
}
try_files /home.html =404;
}
location = /index.md {
root /www/wwwroot/zq/public;
default_type "text/markdown; charset=utf-8";
add_header Vary Accept always;
}
3
暴露 OpenAPI 目录(40 → 100)
让智能体自动发现站点的可用接口。在 /.well-known/openapi.json 部署 OpenAPI 3.0 规范。
location ~ ^/\.well-known/ {
root /www/wwwroot/zq/public;
try_files $uri =404;
default_type application/json;
add_header Cache-Control "public, max-age=3600" always;
add_header Access-Control-Allow-Origin "*" always;
}
4
声明 MCP 端点(40 → 100)
MCP(Model Context Protocol)是 Anthropic 在 2024 年提出的智能体调用标准。声明后,Claude Desktop 等客户端可直接调用站点工具。
// public/.well-known/mcp.json
{
"name": "站擎",
"version": "1.0.0",
"transport": { "type": "http", "endpoint": "...", "method": "POST" },
"tools": [
{ "name": "seo_audit", "description": "..." },
{ "name": "ssl", "description": "..." }
]
}
5
声明 OAuth 2.1 授权元数据(40 → 100)
让智能体可以以用户身份安全调用站点接口。在 /.well-known/oauth-authorization-server 暴露授权服务器元数据。
// public/.well-known/oauth-authorization-server
{
"issuer": "https://zq.kuailexue.com.cn",
"authorization_endpoint": "...",
"token_endpoint_auth_methods_supported": ["client_secret_basic", "none"],
"code_challenge_methods_supported": ["S256"],
"scopes_supported": ["read", "tools:run"]
}