cybercraftsolutionsllc/trust-gated-agent-example
Trust-gated AI agent examples. Check CraftedTrust before connecting to any MCP server. Python (LangGraph) + TypeScript.
Platform-specific configuration:
{
"mcpServers": {
"trust-gated-agent-example": {
"command": "npx",
"args": [
"-y",
"trust-gated-agent-example"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Reference implementations showing how to make AI agents check CraftedTrust before connecting to any MCP server. If a server scores D or F, the agent refuses to connect.
This is the "SSL certificate check for AI agents" pattern.
Add CraftedTrust to your agent's MCP config:
{
"mcpServers": {
"craftedtrust": {
"url": "https://mcp.craftedtrust.com/api/v1/mcp",
"description": "Check trust scores before connecting to MCP servers"
}
}
}Your agent now has access to 6 tools:
| Tool | Description | |---|---| | check_trust | Look up trust score by URL or npm name | | scan_server | Trigger a live security scan | | search_registry | Search 4,200+ indexed MCP servers | | get_stats | Ecosystem statistics | | pay_for_certification | Initiate USDC certification payment | | verify_payment | Verify on-chain payment |
Before your agent connects to any new MCP server:
check_trust on CraftedTrustSee `python/trust_gated_agent.py` for a complete LangGraph agent that gates MCP connections through CraftedTrust.
cd python
pip install -r requirements.txt
python trust_gated_agent.pySee `typescript/trust-gated-client.ts` for a TypeScript MCP client that checks trust scores before connecting.
cd typescript
npm install
npx tsx trust-gated-client.tsAgent receives task → needs mcp.example.com
↓
Agent calls CraftedTrust check_trust("mcp.example.com")
↓
Score: 82/100, Grade: B ← Safe
↓
Agent connects to mcp.example.com ✓Agent receives task → needs sketchy-server.xyz
↓
Agent calls CraftedTrust check_trust("sketchy-server.xyLoading reviews...