Slipknot V4.1 Lite - Lightweight Topological Arbitration MCP Coprocessor
A lightweight topological arbitration MCP server for multi-agent clusters, using Topological Data Analysis to resolve decision conflicts and enable consensus among agents.
README
Slipknot V4.1 Lite - Lightweight Topological Arbitration MCP Coprocessor Underlying Mathematical Consensus Protocol for Multi-Agent Clusters | 7-Day Rapid Deployment Edition
๐ฏ Project Positioning Slipknot is an AI infrastructure project that combines Topological Data Analysis (TDA) with Multi-Agent Systems. Its core positioning is the "Underlying Mathematical Consensus Protocol for Multi-Agent Clusters" / "Lightweight Topological Arbitration MCP Coprocessor".
Exclusive Differentiation Barriers: Topological Consensus Court: Uses persistent graph Wasserstein/Bottleneck distances as a mathematically neutral yardstick to resolve decision-making conflicts and deadlocks among multiple Agents. Reward Evolution Flywheel: Agents feed back business rewards, and Bayesian optimization automatically iterates TDA hyperparameters, making the data increasingly accurate with use. Prototype of Federated Topological Privacy Computing: Only lightweight topological skeletons are uploaded while raw data remains local, ensuring compliance. Industry-Adaptive Plugins: The same topological computation results are automatically translated into actionable business instructions for Agents in corresponding industries.
๐ Quick Start
Option 1: Pure FastAPI Version (Recommended, Zero Dependencies) bash Install basic dependencies pip install -r requirements.txt
One-click start python dev_start.py
Access services Health Check: http://127.0.0.1:8000/health API Docs: http://127.0.0.1:8000/docs MCP Endpoint: http://127.0.0.1:8000/mcp Tools List: http://127.0.0.1:8000/mcp/tools
Option 2: FastMCP Standard Version (Standard MCP Protocol) bash Create virtual environment and install full dependencies python -m venv venv source venv/bin/activate pip install -r requirements.txt
Start FastMCP service python -m slipknot.gateway
Access services SSE Endpoint: http://127.0.0.1:8000/sse HTTP Endpoint: http://127.0.0.1:8000/mcp
Option 3: Docker Deployment bash chmod +x docker-run.sh ./docker-run.sh
๐งช Running Tests bash Core functionality tests (no need to start the service) python scripts/demo_test.py
Gateway API tests (requires service to be started first) python dev_start.py & python scripts/gateway_test.py
๐ฆ Project Structure text slipknot-lite/ โโโ slipknot/ โ โโโ init.py # Version declaration โ โโโ core/ # TDA core computation layer โ โ โโโ accel.py # Numba JIT acceleration functions โ โ โโโ engine.py # Topological analysis engine โ โโโ consensus/ # Topological Consensus Court โ โ โโโ models.py # Pydantic data models โ โ โโโ court.py # Consensus arbitration engine โ โโโ storage/ # Storage backend (Dual-mode) โ โ โโโ backend.py # Memory/Redis automatic fallback โ โโโ task/ # Task pool โ โ โโโ pool.py # Thread pool task scheduling โ โโโ flywheel/ # Evolution flywheel โ โ โโโ filter.py # Reward filter โ โ โโโ optimizer.py # Bayesian optimizer โ โโโ plugins/ # Industry plugins โ โ โโโ energy.py # Energy storage scheduling โ โ โโโ quant.py # Quantitative trading โ โ โโโ fraud.py # Risk control & fraud โ โโโ gateway.py # FastMCP standard gateway โ โโโ gateway_simple.py # Pure FastAPI gateway โโโ scripts/ โ โโโ demo_test.py # Core functionality tests โ โโโ gateway_test.py # Gateway API tests โโโ tmp/ # Test data directory โโโ dev_start.py # Local one-click start script โโโ Dockerfile # Production container image โโโ docker-run.sh # Container one-click deployment โโโ requirements.txt # Dependency list โโโ .env.example # Environment variables template โโโ README.md # Project documentation
๐ง Core Features
TDA Topological Analysis Engine Adaptive Sampling: Default upper limit of 3000, lower limit of 80, automatically adapts to data scale. UMAP Dimensionality Reduction: Manifold learning preserves topological structures. Persistent Homology Computation: Supports H0/H1/H2 three-order hole detection. Singularity Identification: Automatically identifies anomalous data points. Numba JIT Acceleration: Just-in-time compilation for core computational loops.
Topological Consensus Court Dual-Layer Distance Determination: Bottleneck for rapid screening + Wasserstein for precise computation. Three-Tier Verdicts: CONSENSUS_FAST / CONSENSUS / TOPOLOGICAL_DIVERGENCE. Weaker Agent Identification: Automatically marks the Agent with lower confidence during divergence. Mathematically Neutral Arbitration: Pure topological distance, free from subjective bias.
Reward Self-Evolution Flywheel Reward Cleansing: Extreme value truncation + 3ฯ anomaly detection. Bayesian Optimization: Gaussian process surrogate model + gp_minimize. Industry Parameter Isolation: Independent hyperparameter optimization for each industry. Automatic Triggering: Triggers optimization for every 50 valid Rewards.
Industry-Adaptive Plugins Industry Plugin Core Capabilities Energy Storage Scheduling energy Load cycle identification, charge/discharge strategies, fault warning
Quantitative Trading quant Market cycle detection, position management, hedging strategies
Risk Control & Fraud fraud Syndicate identification, transaction loop closure, risk grading
๐ API Endpoints
Pure FastAPI Version (gateway_simple.py)
Health Check http GET /health
Get Tools List http GET /mcp/tools Authorization: Bearer enterprise-agent-key-2026
Call MCP Tool http POST /mcp Authorization: Bearer enterprise-agent-key-2026 X-Agent-Role: energy_storage Content-Type: application/json
{ "name": "submit_tda", "arguments": { "csv_path": "tmp/grid_load.csv", "industry": "energy" } }
Available Tools submit_tda - Submit topological data analysis task Parameters: csv_path (file path), industry (industry type) Returns: data_id + task status get_insight - Get topological analysis results and industry instructions Parameters: data_id, agent_role (Agent role) Returns: Business insights + operational instructions + raw topological data arbitrate - Multi-Agent topological consensus arbitration Parameters: state_a, state_b (topological states of two Agents) Returns: Arbitration verdict + distance metrics + weaker Agent identification send_reward - Feed back business Reward to drive self-evolution Parameters: agent_id, industry, reward, params Returns: Cleansed Reward value
โ๏ธ Configuration
Environment Variables env Service Configuration PORT=8000 MAX_WORKERS=4
Storage Configuration USE_REDIS=0 REDIS_URL=redis://localhost:6379/0
Security Configuration AGENT_TOKEN=enterprise-agent-key-2026
TDA Default Parameters N_NEIGHBORS=15 MIN_DIST=0.1 HOLE_THRESHOLD=0.1 TOP_K=5
Default Token enterprise-agent-key-2026
๐ฏ Use Cases
Smart Manufacturing Production line multi-Agent scheduling conflict arbitration Equipment anomaly topological pattern recognition Quality fluctuation cycle detection
New Energy Energy storage cluster load scheduling Power grid peak-valley topological analysis Photovoltaic output prediction optimization
Quantitative Finance Multi-strategy Agent consensus arbitration Market cycle topological identification Risk topological early warning
Financial Risk Control Anti-fraud multi-Agent cross-validation Syndicate transaction topological detection Anomalous behavior pattern recognition
๐ Performance Features Numba JIT Acceleration: 5-10x speedup for core loops. Dual-Layer Distance Determination: Fast return in 80% of scenarios, 3-5x overall speedup. Adaptive Sampling: Automatic downsampling for large datasets to ensure response time. Dual-Mode Storage: Zero-dependency memory mode, scalable Redis mode. Thread Pool Concurrency: Supports parallel processing of multiple tasks.
๐ Security Features File Sandbox: Only allows reading files within whitelisted directories. Token Authentication: All API calls require a Bearer Token. Audit Logs: All arbitration operations are written to audit logs. Parameter Validation: Strict type validation via Pydantic.
๐ Version Evolution Version Positioning Core Features V1.0 Standalone Tool Basic TDA analysis + CSV input
V2.0 Enterprise Middleware FastAPI gateway + caching + authentication
V3.0 Platformization SDK + plugin system + visualization
V4.0 Consensus Protocol A2A communication + Topological Court + Evolution Flywheel
V4.1 Lite Rapid Deployment Lightweight architecture + zero dependencies + 7-day delivery
๐ Development Roadmap [ ] V4.2: Federated Topological Privacy Computing [ ] V4.5: Distributed Swarm Cluster [ ] V5.0: Cross-Industry Plugin Marketplace [ ] V5.5: Visual Topological Graph [ ] V6.0: ASI-Level Topological Awareness Kernel
๐ค Tech Stack Core Computation: NumPy, Numba, UMAP, Ripser, GUDHI Web Framework: FastAPI, Uvicorn Data Models: Pydantic Optimization Algorithms: Scikit-Optimize, POT MCP Protocol: FastMCP (Optional) Deployment: Docker
๐ Contact Project Repository: [GitHub] Technical Documentation: [Wiki] Issue Tracking: [Issues]
Slipknot V4.1 Lite - Empowering Multi-Agent Clusters with Mathematical-Grade Consensus
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.