Sequential Thinking MCP Server
حالة الخادم: {{status}}
عنوان الخادم الداخلي: http://127.0.0.1:{{mcp_port}}
روابط مفيدة:
- /health — تحقق من استجابة MCP server
- /tools — وصف الأدوات المكتشفة (إن وُجدت)
ملاحظات التشغيل
لتشغيل محليًا:
docker build -t hf-seqthink .
docker run -p 7860:7860 -p 8080:8080 hf-seqthink
"""
@app.route('/')
def index():
try:
r = requests.get(f"http://127.0.0.1:{MCP_PORT}/health", timeout=1.5)
status = 'UP' if r.status_code == 200 else f'DEGRADED ({r.status_code})'
except Exception as e:
status = f'DOWN ({e})'
return render_template_string(HTML, status=status, mcp_port=MCP_PORT)
@app.route('/health')
def health():
try:
r = requests.get(f"http://127.0.0.1:{MCP_PORT}/health", timeout=1.5)
return (r.text, r.status_code, {'Content-Type': 'text/plain'})
except Exception as e:
return jsonify({'status':'down','error':str(e)}), 503
@app.route('/tools')
def tools():
# بعض خوادم MCP تكشف endpoints أخرى؛ نحاول قراءة root JSON إن وُجد
try:
r = requests.get(f"http://127.0.0.1:{MCP_PORT}/", timeout=1.5)
return (r.text, r.status_code, {'Content-Type': 'text/html'})
except Exception as e:
return jsonify({'status':'down','error':str(e)}), 503
if __name__ == '__main__':
app.run(host='0.0.0.0', port=7860)