Skip to main content

MCP Trust Server for AgentMesh

MCP server that exposes AgentMesh trust management as tools for AI agents via the Model Context Protocol. Compatible with Claude, GPT, and any MCP-capable client.

What it does

Provides six trust-management tools over MCP:

Tool Description
check_trust Check if an agent is trusted — returns trust score
get_trust_score Detailed trust score breakdown
establish_handshake Initiate a cryptographic trust handshake with a peer
verify_delegation Verify a scope chain is valid
record_interaction Record an interaction outcome to update trust
get_identity Get this server's DID, public key, and capabilities

Trust is scored across multiple dimensions (0–1000 each).

Getting Started

Prerequisites: Python 3.11 or newer, pip, and an MCP-capable client such as Claude Desktop.

python -m venv .venv
source .venv/bin/activate
pip install mcp-trust-server
AGENTMESH_AGENT_NAME=my-trust-server mcp-trust-server

The server starts with in-memory storage by default. Set AGENTMESH_MIN_TRUST_SCORE or AGENTMESH_STORAGE_BACKEND before launch to customize the local policy.

Installation

pip install mcp-trust-server

Or install from the repository:

cd agent-governance-python/agent-mesh/packages/mcp-trust-server
pip install -e ".[dev]"

Configuration

Environment Variable Description Default
AGENTMESH_AGENT_NAME Agent name for this server instance mcp-trust-agent
AGENTMESH_MIN_TRUST_SCORE Minimum trust threshold (0–1000) 500
AGENTMESH_STORAGE_BACKEND Storage backend (memory or redis) memory

Usage

Run directly

python -m mcp_trust_server

Or via the console script:

mcp-trust-server

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "agentmesh-trust": {
      "command": "python",
      "args": ["-m", "mcp_trust_server"],
      "env": {
        "AGENTMESH_AGENT_NAME": "my-trust-server",
        "AGENTMESH_MIN_TRUST_SCORE": "500"
      }
    }
  }
}

Using with pip install

{
  "mcpServers": {
    "agentmesh-trust": {
      "command": "mcp-trust-server"
    }
  }
}

Tool Details

check_trust(agent_did: str) -> dict

Quick trust check. Returns whether the agent meets the minimum trust threshold, overall score, and trust level.

get_trust_score(agent_did: str) -> dict

Full trust breakdown — overall score, trust level, interaction count, and last-updated timestamp.

establish_handshake(peer_did: str, capabilities: list[str]) -> dict

Creates a challenge for a trust handshake. Returns handshake ID, signature, and status.

verify_delegation(agent_did: str, delegator_did: str, capability: str) -> dict

Validates that a delegation from delegator_did to agent_did for the given capability is trustworthy.

record_interaction(peer_did: str, outcome: str, details: str) -> dict

Records an interaction with a peer and adjusts trust scores. Valid outcomes: success (+10), failure (−20), timeout (−10), partial (+5).

get_identity() -> dict

Returns this server instance's DID, name, Ed25519 public key, and granted capabilities.

Example Interaction

User: Check if agent did:mesh:abc123 is trusted

Claude calls check_trust(agent_did="did:mesh:abc123")
→ {
    "agent_did": "did:mesh:abc123",
    "trusted": true,
    "overall_score": 500,
    "trust_level": "standard",
    "dimensions": {
      "competence": 500,
      "integrity": 500,
      "availability": 500,
      "predictability": 500,
      "transparency": 500
    },
    "min_trust_threshold": 500
  }

Development

cd agent-governance-python/agent-mesh/packages/mcp-trust-server
pip install -e ".[dev]"
pytest tests/ -v

License

Apache-2.0

Metadata

Release files for agentmesh_mcp_trust 3.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentmesh_mcp_trust 3.7.0
File Size Uploaded Provenance
agentmesh_mcp_trust-3.7.0.tar.gz 10.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentmesh_mcp_trust 3.7.0
File Interpreter ABI Platform
agentmesh_mcp_trust-3.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / agentmesh_mcp_trust-3.7.0.tar.gz

Download URL agentmesh_mcp_trust-3.7.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bdd984ab4a7134d969ef33cebe456401b78fc07d1d2e47877d1a04eefd455f6c
BLAKE2b-256 checksum
How to use checksums
6a38c32b04e70a3be4527159a29627cbd9c4ad8ff2cb03a451de3c3114312d26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / agentmesh_mcp_trust-3.7.0-py3-none-any.whl

Download URL agentmesh_mcp_trust-3.7.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cca47d0a9dba0541915474ce5031b49ecad8ac8c306e29ae4d33daecceb063b
BLAKE2b-256 checksum
How to use checksums
a143e73e8b4539cee4f1d03b49fdf72885a570df753d6fb305f2a630e9df5c41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for agentmesh_mcp_trust 3.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page