Skip to content

MCP and OpenAPI

Toprak Ahmet Aydoğmuş edited this page Nov 30, 2026 · 2 revisions

T-Zero Algorithm MCP Server and OpenAPI Reference

Two separate surfaces

T-Zero Algorithm exposes more than one interface. They must not be conflated:

Surface Source of truth Transport Endpoint
Packaged MCP server server.json and Python package MCP over stdio tzero-mcp
Hosted demo API openapi.yaml HTTP submission plus Server-Sent Events Public Hugging Face Space
Generated docs Octri API reference Web documentation Published docs site

The OpenAPI spec is not an HTTP endpoint for the local MCP server. It describes the hosted Gradio app only.

MCP package manifest

The repository manifest identifies:

  • MCP server name: io.github.toprakahmetaydogmus/tzero
  • Package: tzero-mcp
  • Manifest version in the source snapshot: 12.3.4
  • Transport: stdio

The JSON manifest is the authoritative machine-readable package metadata. Always compare it with the version of the package actually installed in the client.

Local MCP configuration

Python module launcher:

{
  "mcpServers": {
    "tzero": {
      "command": "python",
      "args": ["-m", "tzero_mcp"]
    }
  }
}

uvx launcher:

{
  "mcpServers": {
    "tzero": {
      "command": "uvx",
      "args": ["tzero-mcp"]
    }
  }
}

Use the configuration format expected by the specific MCP client. The project README contains client-specific paths and auto-setup commands.

MCP registration modes and tool names

The current implementation in tzero/tzero_mcp.py uses two mutually exclusive decorator groups. The default is canonical; setting TZERO_MCP_TOOL_MODE to all, legacy, or 47 selects the alternate group.

An AST scan of the checked-in source finds 14 canonical registrations and 51 alternate registrations, with four names shared between those groups. A code comment still labels the alternate group as 47 tools, and the repository README lists 21 canonical names. Those figures disagree with the actual decorator declarations in the source snapshot.

Use the connected server's tools/list response as the runtime source of truth for the installed package. The source-derived signatures, handler names, and individual line links are in MCP-Tool-Reference. This page does not claim that a particular release exposes all names.

Hosted Gradio API flow

The OpenAPI document models the public app at:

https://toprakke4-tzero-token-reducer.hf.space

The observed route prefix is /gradio_api. Calls use an asynchronous two-step pattern:

  1. POST /gradio_api/call/{api_name} with JSON body containing an ordered data array.
  2. Read the returned event_id.
  3. GET /gradio_api/call/{api_name}/{event_id} and consume its text/event-stream response.

The spec includes these named operations:

  • process_code_compression
  • run_hallucination_guard_controller
  • run_impact_analysis_controller
  • run_auto_vault_controller
  • run_code_healer_controller
  • calculate_roi_controller
  • generate_mcp_config_controller
  • _run_anti_rea_audit_controller

The UI may expose additional generated or duplicate callback names. They are not included in the curated OpenAPI surface.

Data handling warning

The hosted Space is a public remote service. A request containing source code sends that code outside the user's machine to the Space host. Do not send private repositories, credentials, tokens, customer data, or confidential code to this public API. The OpenAPI file contains no API key and does not add authentication to the hosted service.

The local stdio MCP server and local CLI have different data boundaries. Remote model use, hosted demos, package downloads, metrics, and optional web searches are described in the repository privacy policy.

Version drift

The source manifest reports 12.3.4. The hosted OpenAPI description records the Space UI version observed when that spec was prepared, which may differ from main. Treat hosted request schemas as deployment-specific and re-check /gradio_api/info and the live Space before depending on them.

References

Clone this wiki locally