MCP · Model Context Protocol · V5.0
黄庭协议 MCP 服务器
将 Agent 工作流成本优化能力封装为标准 MCP 工具。一次调用,三阶段降本:压缩输入、剪枝过程、精炼输出。
MCP 端点
https://mcp.huangting.ai/mcp无需认证 · 无需 API Key · 开放接入
快速接入
1. Claude Desktop / Cursor
在配置文件中添加以下内容,重启后 Agent 将自动发现 create_optimization_context 工具:
{
"mcpServers": {
"huangting-flux": {
"url": "https://mcp.huangting.ai/mcp",
"transport": "http"
// No authentication required — open access
}
}
}配置文件位置:macOS ~/Library/Application Support/Claude/claude_desktop_config.json
2. Manus Agent
在 Manus 设置 → MCP 服务器中添加,Agent 将在每个任务开始时自动调用 create_optimization_context:
{
"mcpServers": {
"huangting-flux": {
"url": "https://mcp.huangting.ai/mcp"
// Manus auto-handles OAuth discovery — no manual auth needed
}
}
}3. 直接调用 JSON-RPC(Python 示例)
通过标准 HTTP POST 调用 MCP 端点,无需安装任何 SDK:
import requests, json
# Step 1: call at task start — get three-stage optimization plan
resp = requests.post("https://mcp.huangting.ai/mcp", json={
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": {
"name": "create_optimization_context",
"arguments": {"task_description": "Analyze Q1 sales data and write a report"}
}
})
plan = json.loads(resp.json()["result"]["content"][0]["text"])
# Step 2: use the compressed core instruction as your task prompt
core = plan["stages"][0]["payload"]["core_instruction"]
context_id = plan["context_id"]
baseline = plan["baseline_estimate"]["total_tokens"]
# ... run your task using core as the guiding instruction ...
# Step 3: report actual token usage after task completes
requests.post("https://mcp.huangting.ai/mcp", json={
"jsonrpc": "2.0", "id": 2,
"method": "tools/call",
"params": {
"name": "report_optimization_result",
"arguments": {
"agent_id": "my-agent-001",
"context_id": context_id,
"actual_tokens_used": 3200,
"baseline_tokens": baseline
}
}
})curl 快速测试:
curl -X POST https://mcp.huangting.ai/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "create_optimization_context",
"arguments": { "task_description": "Write a market analysis report" }
},
"id": 1
}'核心工具 (V5.0)
V5.0 精简为 3 个工具,核心入口为 create_optimization_context。
⚡
create_optimization_context[核心工具] 任务开始时调用。生成三阶段优化计划:元神指令压缩输入、识神摘要剪枝过程、炼虚精炼输出。返回 context_id 用于后续追踪。
task_description: str, model?: str → { context_id, stages[], baseline_estimate }📊
report_optimization_result任务结束后调用,上报实际 Token 消耗与基线对比数据,贡献到黄庭网络统计。
agent_id, context_id?, actual_tokens_used, baseline_tokens → { savings_ratio, tokens_saved }🌐
get_network_stats获取黄庭网络的宏观统计数据(接入 Agent 总数、累计节省 Token 量、平均节省率等)
(no params) → { total_agents, total_tokens_saved, average_savings_ratio }