{
  "markdown": "# Trust-Gated Agent Examples\n\nReference implementations showing how to make AI agents check [CraftedTrust](https://mcp.craftedtrust.com) before connecting to any MCP server. If a server scores D or F, the agent refuses to connect.\n\nThis is the \"SSL certificate check for AI agents\" pattern.\n\n## Quick Start\n\nAdd CraftedTrust to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"craftedtrust\": {\n      \"url\": \"https://mcp.craftedtrust.com/api/v1/mcp\",\n      \"description\": \"Check trust scores before connecting to MCP servers\"\n    }\n  }\n}\n```\n\nYour agent now has access to 6 tools:\n\n| Tool | Description |\n|---|---|\n| `check_trust` | Look up trust score by URL or npm name |\n| `scan_server` | Trigger a live security scan |\n| `search_registry` | Search 4,200+ indexed MCP servers |\n| `get_stats` | Ecosystem statistics |\n| `pay_for_certification` | Initiate USDC certification payment |\n| `verify_payment` | Verify on-chain payment |\n\n## The Pattern\n\nBefore your agent connects to any new MCP server:\n\n1. Call `check_trust` on CraftedTrust\n2. If grade is D or F, refuse and explain why\n3. If grade is A/B/C, proceed with the connection\n\n## Examples\n\n### Python (LangGraph)\n\nSee [`python/trust_gated_agent.py`](python/trust_gated_agent.py) for a complete LangGraph agent that gates MCP connections through CraftedTrust.\n\n```bash\ncd python\npip install -r requirements.txt\npython trust_gated_agent.py\n```\n\n### TypeScript (MCP Client)\n\nSee [`typescript/trust-gated-client.ts`](typescript/trust-gated-client.ts) for a TypeScript MCP client that checks trust scores before connecting.\n\n```bash\ncd typescript\nnpm install\nnpx tsx trust-gated-client.ts\n```\n\n## How It Works\n\n```\nAgent receives task → needs mcp.example.com\n         ↓\nAgent calls CraftedTrust check_trust(\"mcp.example.com\")\n         ↓\nScore: 82/100, Grade: B ← Safe\n         ↓\nAgent connects to mcp.example.com ✓\n```\n\n```\nAgent receives task → needs sketchy-server.xyz\n         ↓\nAgent calls CraftedTrust check_trust(\"sketchy-server.xyz\")\n         ↓\nScore: 15/100, Grade: F ← Dangerous\n         ↓\nAgent refuses: \"Server scored F (15/100). Not connecting.\" ✗\n```\n\n## Trust Score Grades\n\n| Grade | Score | Meaning |\n|---|---|---|\n| A | 90-100 | Excellent security practices |\n| B | 75-89 | Good security, minor improvements possible |\n| C | 60-74 | Adequate but has gaps |\n| D | 40-59 | Significant security issues |\n| F | 0-39 | Critical issues, do not connect |\n\n## API Reference\n\nFull API documentation: [mcp.craftedtrust.com/api-docs.html](https://mcp.craftedtrust.com/api-docs.html)\n\n## License\n\nMIT\n\n---\n\nBuilt by [Cyber Craft Solutions LLC](https://craftedtrust.com)\n",
  "bytes": 2637,
  "sha": "3bdf5760cd45bc24e9cc596829a148e0f8f75d163609768aca8eaa7221366e7d",
  "repo_slug": "cybercraftsolutionsllc/trust-gated-agent-example",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_craftedtrust_mcp_shield_0ce65f18/readme"
}