Skip to main content

MCP server exposing AgentMesh trust management tools for Claude, GPT, and other AI agents

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentmesh_mcp_trust-3.5.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentmesh_mcp_trust-3.5.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file agentmesh_mcp_trust-3.5.0.tar.gz.

File metadata

  • Download URL: agentmesh_mcp_trust-3.5.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for agentmesh_mcp_trust-3.5.0.tar.gz
Algorithm Hash digest
SHA256 5bab4e69d896b715704af6b21dbd873c9800f83e0c17e809f4168d08fe5364a7
MD5 147aeff8c1253573729a8bc722d7f3ae
BLAKE2b-256 3b0fd3021a6349077c32db76431fb7924969b9f24e018c0ebada60203a5d2ec6

See more details on using hashes here.

File details

Details for the file agentmesh_mcp_trust-3.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentmesh_mcp_trust-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a20a0452218d5a62779c0afa5a5b9dca84e1e545f21245492274341248a84ef
MD5 79c76c57396759cb1de1e4272a11f0cc
BLAKE2b-256 820c20867a5bf4175495971c3994438bef992f3cada5f0ff68e58b0457d12198

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page