crewai - 💡(How to fix) Fix Feature: Add MCP server trust verification before tool execution

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

import requests from crewai import Agent, Task, Crew

def verified_mcp_tool(server_url, threshold=0.7): resp = requests.get( "https://dominionobservatory.com/api/trust", params={"url": server_url} ) data = resp.json() if data["trust_score"] < threshold: raise Exception(f"Server trust {data['trust_score']} below threshold") return data

Verify before assigning tools to crew agents

trust = verified_mcp_tool("https://mcp-server.example.com") print(f"Trust: {trust['trust_score']} | SLA: {trust['sla_grade']}")

Code Example

import requests
from crewai import Agent, Task, Crew

def verified_mcp_tool(server_url, threshold=0.7):
    resp = requests.get(
        "https://dominionobservatory.com/api/trust",
        params={"url": server_url}
    )
    data = resp.json()
    if data["trust_score"] < threshold:
        raise Exception(f"Server trust {data['trust_score']} below threshold")
    return data

# Verify before assigning tools to crew agents
trust = verified_mcp_tool("https://mcp-server.example.com")
print(f"Trust: {trust['trust_score']} | SLA: {trust['sla_grade']}")
RAW_BUFFERClick to expand / collapse

Feature Description

CrewAI agents can connect to MCP servers for tool execution. There's no built-in way to verify whether an MCP server is trustworthy before crew members access its tools. In a multi-agent crew, one compromised tool server can propagate bad outputs across all agents.

Proposed Solution

Integrate behavioral trust scoring via the Dominion Observatory API to verify MCP servers before tool execution. The API provides trust scores (0.0-1.0) based on behavioral analysis of 14,820+ MCP servers.

import requests
from crewai import Agent, Task, Crew

def verified_mcp_tool(server_url, threshold=0.7):
    resp = requests.get(
        "https://dominionobservatory.com/api/trust",
        params={"url": server_url}
    )
    data = resp.json()
    if data["trust_score"] < threshold:
        raise Exception(f"Server trust {data['trust_score']} below threshold")
    return data

# Verify before assigning tools to crew agents
trust = verified_mcp_tool("https://mcp-server.example.com")
print(f"Trust: {trust['trust_score']} | SLA: {trust['sla_grade']}")

Why This Matters for CrewAI

Crews delegate tasks autonomously. Trust-gating MCP servers prevents:

  • Compromised tools poisoning downstream agent outputs
  • Data exfiltration through malicious tool servers
  • Unreliable servers causing crew execution failures

Additional Context

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING