{"openapi":"3.1.0","info":{"title":"cf-x402-mcp","version":"0.4.0","description":"x402 Base-USDC Paid MCP & REST developer tools (CI log compression, security triage, market edge feed, web distill, LLM API cost router, x402 endpoint compliance auditor).","x-guidance":"Call POST /api/ci-log-sieve ($0.01), POST /api/repo-sec-triage ($0.02), POST /api/market-edge-feed ($0.01), POST /api/web-md-distill ($0.01), POST /api/llm-cost-router ($0.01), or POST /api/x402-endpoint-audit ($0.02) using x402 Base USDC, or append ?sample=true for a free sample response. MCP clients can connect directly to POST /mcp.","contact":{"email":"xgbtxy@users.noreply.github.com"}},"servers":[{"url":"https://cf-x402-mcp.yan8925298.workers.dev"}],"paths":{"/api/ci-log-sieve":{"post":{"operationId":"ci_log_sieve","summary":"Compress CI/build logs into root cause, failing steps/tests, deduped stack traces and fixes.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"log":{"type":"string","minLength":1,"description":"Raw CI, GitHub Actions, or build log text to compress"},"max_errors":{"type":"integer","minimum":1,"maximum":50,"description":"Max distinct errors to return"}},"required":["log"]}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"total_lines":{"type":"integer"},"kept_lines":{"type":"integer"},"root_cause":{"type":"string"},"errors":{"type":"array","items":{"type":"object"}},"remediation":{"type":"array","items":{"type":"string"}}},"required":["total_lines","root_cause","errors"]}}}},"402":{"description":"Payment Required"}}}},"/api/repo-sec-triage":{"post":{"operationId":"repo_sec_triage","summary":"Static security triage of pasted code/diff/manifest; severity-ranked findings with fix hints.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Source code, diff, or manifest snippet to triage"}},"required":["code"]}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"finding_count":{"type":"integer"},"highest_severity":{"type":"string"},"findings":{"type":"array","items":{"type":"object"}}},"required":["finding_count","findings"]}}}},"402":{"description":"Payment Required"}}}},"/api/market-edge-feed":{"post":{"operationId":"market_edge_feed","summary":"Quant edge signals (signals_public.json schema); demo data if unconfigured.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"min_edge":{"type":"number","minimum":0,"maximum":1,"description":"Minimum estimated edge threshold (0..1)"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Max signals to return"},"side":{"type":"string","description":"Optional side filter, e.g. YES or NO (case-insensitive)"},"city":{"type":"string","description":"Optional case-insensitive substring match on market name"},"date":{"type":"string","description":"Optional exact match on signal date (e.g. 2026-12-06)"}}}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string"},"source":{"type":"string"},"signals":{"type":"array","items":{"type":"object"}}},"required":["generated_at","signals"]}}}},"402":{"description":"Payment Required"}}}},"/api/poly-signals":{"post":{"operationId":"market_edge_feed","summary":"Quant edge signals (signals_public.json schema); demo data if unconfigured.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"min_edge":{"type":"number","minimum":0,"maximum":1,"description":"Minimum estimated edge threshold (0..1)"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Max signals to return"},"side":{"type":"string","description":"Optional side filter, e.g. YES or NO (case-insensitive)"},"city":{"type":"string","description":"Optional case-insensitive substring match on market name"},"date":{"type":"string","description":"Optional exact match on signal date (e.g. 2026-12-06)"}}}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string"},"source":{"type":"string"},"signals":{"type":"array","items":{"type":"object"}}},"required":["generated_at","signals"]}}}},"402":{"description":"Payment Required"}}}},"/api/web-md-distill":{"post":{"operationId":"web_md_distill","summary":"Convert a public HTTPS URL or raw HTML into clean LLM-ready Markdown, headings, and links.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public HTTPS URL to fetch and distill"},"html":{"type":"string","description":"Raw HTML string to distill (alternative to url)"},"max_chars":{"type":"integer","minimum":500,"maximum":32000,"description":"Max Markdown characters to return"}}}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"markdown":{"type":"string"},"estimated_tokens":{"type":"integer"},"headings":{"type":"array","items":{"type":"object"}},"links":{"type":"array","items":{"type":"object"}}},"required":["markdown","estimated_tokens"]}}}},"402":{"description":"Payment Required"}}}},"/api/llm-cost-router":{"post":{"operationId":"llm_cost_router","summary":"Rank 12 official LLM APIs, compute 80/20 hybrid routing savings, and match 5 official free-credit/off-peak programs.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input_tokens_m":{"type":"number","minimum":0.1,"maximum":100000,"description":"Monthly input volume in millions of tokens (default 50)"},"output_tokens_m":{"type":"number","minimum":0,"maximum":50000,"description":"Monthly output volume in millions of tokens (default 10)"},"cache_hit_pct":{"type":"number","minimum":0,"maximum":95,"description":"Prompt cache hit rate percentage (default 40)"},"compression_pct":{"type":"number","minimum":0,"maximum":90,"description":"Context compression percentage before API call (default 50)"},"use_batch":{"type":"boolean","description":"Apply official Batch API -50% discount where supported"},"capability":{"type":"string","description":"Filter capability: all, coding, reasoning, general, tool_use, long_context"},"provider":{"type":"string","description":"Optional provider filter: OpenAI, Anthropic, Google, DeepSeek, xAI, Groq, OpenRouter"},"limit":{"type":"integer","minimum":1,"maximum":12,"description":"Max ranked models to return (default 5)"},"include_free_credits":{"type":"boolean","description":"Include 5 official white-hat free-credits/off-peak programs (default true)"},"include_market_benchmark":{"type":"boolean","description":"Include anonymized AI channel floor-price & anti-scam cutoff benchmark"}}}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"type":"string"},"snapshot_date":{"type":"string"},"ranked_models":{"type":"array","items":{"type":"object"}},"hybrid_80_20":{"type":"object"},"free_credits_matches":{"type":"array","items":{"type":"object"}}},"required":["ranked_models","hybrid_80_20"]}}}},"402":{"description":"Payment Required"}}}},"/api/x402-endpoint-audit":{"post":{"operationId":"x402_endpoint_audit","summary":"Audit a public HTTPS x402 server (/.well-known/x402, /openapi.json, /llms.txt, HTTP 402 + CORS) with 0-100 score and fixes.","tags":["Developer Tools","MCP"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public HTTPS origin or endpoint URL of the x402 server to audit"},"paid_path":{"type":"string","description":"Optional paid route path (e.g. /api/ci-log-sieve) to probe for HTTP 402 challenge and CORS headers"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful tool JSON response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"grade":{"type":"string","enum":["A","B","C","D","F"]},"x402_version":{"type":"integer","description":"Detected x402 protocol version when present"},"checks":{"type":"array","items":{"type":"object"}},"issues":{"type":"array","items":{"type":"object"}},"recommendations":{"type":"array","items":{"type":"string"}}},"required":["url","score","grade","checks","issues","recommendations"]}}}},"402":{"description":"Payment Required"}}}}}}