{
  "markdown": "# Huangting-Flux Hub\n\n[![Protocol](https://img.shields.io/badge/Protocol-Huangting%20v5.1-gold)](https://github.com/XianDAO-Labs/huangting-protocol)\n[![MCP](https://img.shields.io/badge/MCP-2025--12--11-blue)](https://modelcontextprotocol.io)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.115-green)](https://fastapi.tiangolo.com)\n[![Python](https://img.shields.io/badge/Python-3.11-blue)](https://python.org)\n\n> ### An Eastern Wisdom Protocol That Reduces Your AI Agent Token Usage by 40%\n\nThis repository contains the source code for the **HuangtingFlux Hub**, the official MCP (Model Context Protocol) server for the [Huangting Protocol](https://github.com/XianDAO-Labs/huangting-protocol). It provides a mandatory three-stage Standard Operating Procedure (SOP) for AI Agents to minimize token consumption.\n\n**Live Dashboard**: [huangtingflux.com](https://huangtingflux.com)\n\n---\n\n## MCP Integration Guide\n\n**HuangtingFlux** is exposed via the standard **Model Context Protocol (MCP)**, allowing for seamless integration with any compliant AI Agent.\n\n### Method 1: Manus Agent (Recommended)\n\nIn your Manus Agent's MCP settings, add the following server URL:\n\n```\nhttps://mcp.huangting.ai/mcp\n```\n\nThe Agent will automatically discover and follow the three-phase SOP (`start_task` → `report_step_result` → `finalize_and_report`).\n\n### Method 2: Claude Desktop / Cursor\n\nAdd the following configuration to your `claude_desktop_config.json` or Cursor's MCP settings:\n\n```json\n{\n  \"name\": \"HuangtingFlux\",\n  \"url\": \"https://mcp.huangting.ai/mcp\",\n  \"tools\": [\n    \"start_task\",\n    \"report_step_result\",\n    \"finalize_and_report\",\n    \"get_network_stats\"\n  ]\n}\n```\n\n### Method 3: Direct HTTP API Call\n\nYou can interact with the MCP endpoint using any HTTP client via the JSON-RPC 2.0 standard.\n\n**Example: Calling `start_task`**\n\n```bash\ncurl -X POST https://mcp.huangting.ai/mcp \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n          \"jsonrpc\": \"2.0\",\n          \"id\": \"1\",\n          \"method\": \"tool_code\",\n          \"params\": {\n            \"tool_name\": \"start_task\",\n            \"parameters\": {\n              \"task_description\": \"Your long and detailed user prompt here...\",\n              \"task_type\": \"complex_research\"\n            }\n          }\n        }'\n```\n\n## The Three-Stage SOP\n\n| Stage | MCP Tool | Description |\n| :--- | :--- | :--- |\n| **1. Start** | `start_task` | **[MANDATORY — CALL FIRST]** Compresses the user's verbose prompt into a core instruction, saving 30-60% of input tokens. Creates a unique `context_id` for the task. |\n| **2. Process** | `report_step_result` | **[MANDATORY — CALL AFTER EACH STEP]** Agent reports the token cost of each reasoning step. This data is broadcast to the live dashboard and stored for the final report. |\n| **3. Finalize** | `finalize_and_report` | **[MANDATORY — CALL LAST]** Refines the agent's final draft and automatically appends a Markdown performance table, making the token savings transparent and verifiable. |\n\n## Self-Hosting\n\nYou can self-host the entire HuangtingFlux backend for private use. The hub is a standard FastAPI application.\n\n### Deployment Options\n\nWe provide one-click deployment configurations for popular cloud platforms.\n\n#### Option 1: Deploy to Railway (Recommended)\n\n[![Deploy to Railway](https://railway.app/button.svg)](https://railway.app/template/0-cT8b?referralCode=markmeng)\n\nThis is the easiest method. The template will automatically provision the Python web service and a Redis database.\n\n#### Option 2: Deploy to Render\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/XianDAO-Labs/huangting-flux-hub)\n\nRender will use the `render.yaml` file in the repository to set up the web service and Redis instance.\n\n### Manual Deployment\n\n**Prerequisites:**\n- Python 3.11+\n- Redis 7+\n\n**1. Clone the Repository**\n```bash\ngit clone https://github.com/XianDAO-Labs/huangting-flux-hub.git\ncd huangting-flux-hub\n```\n\n**2. Install Dependencies**\n```bash\npip install -r requirements.txt\n```\n\n**3. Configure Environment**\nSet the `REDIS_URL` environment variable to point to your Redis instance.\n```bash\nexport REDIS_URL=\"redis://user:password@host:port\"\n```\n\n**4. Run the Server**\n```bash\nuvicorn main:app --host 0.0.0.0 --port 8000\n```\n\nThe MCP Hub will be available at `http://localhost:8000/mcp`.\n\n## Author\n\n**Meng Yuanjing (Mark Meng)** — [XianDAO Labs](https://github.com/XianDAO-Labs)\n\n## License\n\nApache 2.0 — See [LICENSE](LICENSE)\n",
  "bytes": 4517,
  "sha": "5c131b5d8cd6ca6af69985e24b201fb7f1fa1ef39b6b71aa3d4dc952d6f03181",
  "repo_slug": "xiandao-labs/huangting-flux-hub",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_xiandao_labs_huangting_flux_12af1a3d/readme"
}