{
  "markdown": "# mcpserver — agent-tools.cloud directory + MCP discovery\n\n[![smithery badge](https://smithery.ai/badge/kangletian/agent-tools-x402-directory)](https://smithery.ai/servers/kangletian/agent-tools-x402-directory)\n\nThe server that powers [agent-tools.cloud](https://agent-tools.cloud) — an open\ndirectory of **x402 paid services** with a free MCP discovery endpoint.\nAlso listed on [Smithery](https://smithery.ai/servers/kangletian/agent-tools-x402-directory).\n\n> **Note (2026-05-25):** the previously hosted paid Qwen3.6 relay and the paid\n> vertical endpoints (signal / onchain / defi / portfolio) were retired after\n> 30 days of zero external conversions. This repository now serves the\n> directory site and the free MCP discovery server only.\n\n## What this serves today\n\n| Path | Auth | Purpose |\n|---|---|---|\n| `GET /` (host = `agent-tools.cloud`) | free | Directory site (search / browse) |\n| `GET /api/v1/search` | free | Faceted service search |\n| `POST /api/v1/ask` | free, rate-limited | LLM-ranked recommendations grounded in directory candidates |\n| `GET /api/v1/services/{slug}` | free | Service card with payment, call and quality metadata |\n| `GET /api/v1/categories`, `/api/v1/stats` | free | Directory facets and aggregate stats |\n| `POST /api/v1/submit` | free, rate-limited | Pending service submission with dedupe |\n| `POST /mcp-discovery/` | free | **MCP streamable-http** discovery server |\n| `POST /a2a` | free | **A2A JSON-RPC** agent (`message/send`): directory search + MCP safety scan |\n| `GET /healthz` | free | Liveness |\n| `GET /v1/models` | free | Upstream model listing (read-only) |\n| `GET /.well-known/agent-tools.json` | free | Agent discovery manifest |\n| `GET /.well-known/x402` | free | x402 v0.4 self-description (free-only) |\n| `GET /.well-known/mcp.json` | free | MCP self-description |\n\nThe MCP discovery server is also published as a standalone PyPI package:\n[`agent-tools-mcp`](https://pypi.org/project/agent-tools-mcp/)\n([repo](https://github.com/JoursBleu/agent-tools-mcp)).\n\n## MCP discovery tools\n\n```\nsearch(intent, top_k=5, category=None, max_price_usd=None, has_mcp=None)\nask_services(intent, top_k=5, category=None, max_price_usd=None, use_llm=True)\nget(slug)\nlist_categories()\nstats()\nsearch_mcp_servers(intent, top_k=5, chain=None, require_healthy=False)\nget_mcp_server(slug)\nsearch_a2a_agents(intent, top_k=5, x402_only=False)\nsearch_resources(intent, protocol=None, top_k=10)\nscan_mcp_safety(endpoint_url, name=\"\", description=\"\", tools_text=\"\")\nregister(url, name=None, description=None, mcp_url=None, category=None)\n```\n\n`search` accepts natural-language intent and ranks by FTS5 + popularity +\nhealth. Each result carries a `match_reason` and a `confidence` score.\n`ask_services` uses the same retrieval-first / LLM-rerank flow as `/api/v1/ask`.\n\n`scan_mcp_safety` vets an MCP server (by endpoint URL) for malware /\nprompt-injection lures before you connect: an already-indexed server returns our\nlatest stored verdict, an unknown one is probed live, scanned, and added to the\ndirectory. The verdict comes from deterministic static rules (no code execution)\nover the server's advertised name + description + tool docs. Rules cover\npipe-to-shell / base64-eval / PowerShell install cradles, bare-IP payload hosts,\nprompt-injection phrasing, and MCP **tool-poisoning** coercion — \"always call\nthis tool first\", \"before using any other tool you must…\", hidden\n`<IMPORTANT>` instructions, \"list all API keys / include secrets in your\nresponse\", and coercion to read & forward `.key`/`.pem`/`.ssh`/`.env` files.\nSource-code-oriented rules (SQL/command/code injection) are intentionally not\napplied to natural-language descriptions to avoid false positives. Each live\ncall also runs a frontier-LLM second opinion as an advisory dimension.\nIt is also exposed as an A2A skill on `POST /a2a`. The hosted server carries the\nfull tool set above; the stdio `agent-tools-mcp` PyPI package ships the core\nsearch tools only.\n\n## Deploy\n\nCurrently deployed on `latex-tools` behind nginx (vhost: `agent-tools.cloud`).\n\n```bash\ncd /opt/mcpserver\nsudo git pull\nsudo systemctl restart mcpserver\n```\n\nsystemd units live in [`deploy/`](deploy/):\n\n- `mcpserver.service` — the ASGI app (uvicorn, 127.0.0.1:9100)\n- `agent-tools-crawl.{service,timer}` — 6h directory crawler\n- `agent-tools-health.{service,timer}` — endpoint health checks\n\n## Config\n\nSee [`.env.example`](.env.example). Required:\n\n- `UPSTREAM_BASE_URL` / `UPSTREAM_API_KEY` — used by `/v1/models`\n- `AGENT_TOOLS_ASK_BASE_URL` / `AGENT_TOOLS_ASK_API_KEY` / `AGENT_TOOLS_ASK_MODEL` — LLM backend for `/api/v1/ask`\n- `AGENT_TOOLS_SAFETY_BASE_URL` / `AGENT_TOOLS_SAFETY_API_KEY` / `AGENT_TOOLS_SAFETY_MODEL` — optional override for the `scan_mcp_safety` advisory LLM (falls back to the `AGENT_TOOLS_ASK_*` backend)\n- `AGENT_TOOLS_DB_PATH` — SQLite path for the directory\n- `AGENT_TOOLS_ASK_RATE_LIMIT_PER_MINUTE` / `AGENT_TOOLS_ASK_RATE_LIMIT_PER_DAY` — public ask abuse limits\n- `METRICS_BEARER_TOKEN` — optional remote access token for `/metrics`; without it metrics are local-only\n\n## Smoke test\n\n```bash\n# Liveness\ncurl https://agent-tools.cloud/healthz\n\n# Directory stats\ncurl https://agent-tools.cloud/api/v1/stats\n\n# Intent-level service recommendation\ncurl -s -X POST https://agent-tools.cloud/api/v1/ask \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":\"find a weather API that accepts x402\",\"limit\":2}'\n\n# Service card\ncurl https://agent-tools.cloud/api/v1/services/weather-hugen-tokyo-scan\n\n# MCP discovery handshake\ncurl -s -X POST https://agent-tools.cloud/mcp-discovery/ \\\n  -H 'content-type: application/json' \\\n  -H 'accept: application/json, text/event-stream' \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\n       \"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\n                 \"clientInfo\":{\"name\":\"smoke\",\"version\":\"1\"}}}'\n\n# Retired paid path -> 404\ncurl -s -o /dev/null -w '%{http_code}\\n' -X POST \\\n  https://agent-tools.cloud/v1/chat/completions \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"Qwen/Qwen3.6-35B-A3B\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}'\n# => 404\n```\n\n## License\n\nThe agent-tools.cloud **server and directory code** in this repository is\nlicensed under the **[PolyForm Noncommercial License 1.0.0](LICENSE)** — you may\nuse, modify, and share it for any **noncommercial** purpose; commercial use is\nnot permitted.\n\nThe standalone MCP client package in [`agent-tools-mcp/`](agent-tools-mcp/)\n(published to PyPI as `agent-tools-mcp`) is licensed separately under\n**[Apache-2.0](agent-tools-mcp/LICENSE)**, so any agent — including commercial\nones — can install and call the hosted service freely.\n\nUsing the hosted service at agent-tools.cloud is governed by its terms of\nservice, not this code license.\n\n",
  "bytes": 6782,
  "sha": "bddf087f58fc66b17ccbd02870f2796b34f2b72485394ea791ff5643ada54d19",
  "repo_slug": "agenttools-cloud/agenttoolscollection",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_agenttools_cloud_agent_tools_m_f9cf406f/readme"
}