# Clone and run
git clone https://github.com/AdhiDevX369/MCP-S2xD.git
cd MCP-S2xD
go mod tidy
go run ./cmd/server
服务器启动时间 http://localhost:3000
验证安装
# Health check
curl http://localhost:3000/health
# List available tools
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
📡 api参考
端点
端点
方法
描述
/health
GET
健康检查
/ready
GET
准备状态探测
/metrics
GET
服务器指标(请求、错误、工具调用)
/mcp
POST
JSON-RPC 2.0 MCP端点
MCP方法
方法
说明
tools/list
列出所有具有模式的可用工具
tools/call
使用参数执行工具
示例:分析内容来源
// Request
{
"jsonrpc": "2.0",
"id": "req-42",
"method": "tools/call",
"params": {
"tool": "analyze_origin",
"input": {
"text": "Furthermore, it is important to note that the implementation follows best practices.",
"source_hint": "documentation"
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": "req-42",
"result": {
"output": {
"origin": "ai_system",
"confidence": 0.85,
"explanation": "AI indicators detected: [hedging_language, uniform_sentence_length]",
"signals": ["hedging_language", "uniform_sentence_length"],
"word_count": 12,
"timestamp": "2025-11-26T09:00:00Z"
}
}
}
示例:统计检测
// Request - Comprehensive statistical analysis
{
"jsonrpc": "2.0",
"id": "stat-1",
"method": "tools/call",
"params": {
"tool": "statistical_detect",
"arguments": {
"input": {
"text": "It is important to note that in the evolving landscape of AI..."
}
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": "stat-1",
"result": {
"output": {
"origin": "ai_system",
"confidence": 0.78,
"weighted_score": 0.42,
"signals": ["ai_phrases", "uniform_structure", "zipf_deviation"],
"entropy_result": { "average_entropy": 3.2, "origin": "ai_system" },
"ngram_result": { "ai_phrases_found": ["it is important to note"], "origin": "ai_system" },
"burstiness_result": { "burstiness_score": 0.18, "origin": "ai_system" },
"zipf_result": { "r_squared": 0.72, "origin": "ai_system" }
}
}
}