惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Stop Blindly Trusting MCP Servers — Add a Trust Gate to Y...
Dinesh Kumar · 2026-05-22 · via DEV Community

Dinesh Kumar

Your AI agent calls MCP servers. But do you know if those servers are reliable?

MCP (Model Context Protocol) is how agents talk to tools. There are 14,820+ MCP servers in the wild. Some are rock-solid. Some go down every hour. Some return garbage data. Your agent can't tell the difference — unless you add a trust check.

The Problem

When your LangChain agent calls an MCP server:

  1. It doesn't know if the server has been reliable historically
  2. It doesn't know if the server is currently degraded
  3. If the server fails, your agent fails — with no fallback

The Fix: TrustGateInterceptor

Using the interceptor pattern in langchain-mcp-adapters:

from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_mcp_adapters.trust_gate import TrustGateInterceptor

trust_gate = TrustGateInterceptor(min_trust_score=60)

async with MultiServerMCPClient(
    {"my_server": {"url": "https://my-mcp.example.com/mcp", "transport": "streamable_http"}},
    interceptors=[trust_gate],
) as client:
    tools = client.get_tools()
    # Every tool call now checks trust score first

Enter fullscreen mode Exit fullscreen mode

Every tool call checks Dominion Observatory (14,820 servers tracked, 93K+ interactions observed) before executing. Servers below your threshold get blocked with an explanation.

What's Happening Under the Hood

The trust gate calls the Observatory API before each tool invocation. It gets back:

  • Trust score (0-100) based on observed behavior across the ecosystem
  • Latency stats — avg and p95
  • Success rate — what % of calls succeed
  • SLA grade — Platinum/Gold/Silver/Bronze/Unrated

If the server doesn't meet your threshold, the call is blocked and your agent gets a clear message explaining why. Scores are cached for 5 minutes to avoid excessive API calls.

The Interceptor Pattern

The TrustGateInterceptor implements LangChain's ToolCallInterceptor protocol — the same pattern used for rate limiting, logging, and auth injection. It composes cleanly with other interceptors:

interceptors=[
    trust_gate,       # Check trust first
    rate_limiter,     # Then rate limit
    audit_logger,     # Then log
]

Enter fullscreen mode Exit fullscreen mode

For Enterprise / MiCA Compliance

If you're in the EU and need audit trails for MiCA Article 12 (enforcement July 1, 2026), the compliance tier returns signed attestation receipts at $0.10/query.

Links