Skip to content

Carlos-Projects/mcp-attest

MCP Attest πŸ”

CI PyPI version Python License Coverage pre-commit GitHub stars Star History

Verify, trust, connect. MCP Attest is a security extension for the Model Context Protocol that verifies server identity, integrity, and permissions before allowing a client to connect. Based on the paper Attested Tool-Server Admission (Alfredo Metere, May 2026).


What it does 🎯

  • Identity Verification β€” Verify MCP server identity via TLS certificates, cryptographic signatures, or DIDs
  • Integrity Attestation β€” Generate and verify SHA-256 manifests of exposed server tools
  • Permission Auditing β€” Evaluate requested vs declared permissions (least privilege principle)
  • Capability Fingerprinting β€” Create unique server capability fingerprints to detect changes
  • Trust Score Calculation β€” Calculate trust scores (0–100) based on identity, integrity, and permissions
  • Revocation Checking β€” Verify if a server has been revoked from a trust list
  • Policy Generation β€” Generate MCPGuard-compatible access policies based on trust scores

What makes it unique πŸ†

Capability What it does Why it matters
Multi-factor identity TLS certs + crypto signatures + DIDs Defense in depth β€” no single point of trust
Capability fingerprinting SHA-256 hash of exposed tools Detect tool drift, tampering, or supply-chain attacks
Trust scoring Weighted 0–100 score from 4 dimensions Quantified risk decisions, not gut feelings
MCPGuard integration Auto-generates access policies Drop-in security for existing MCP deployments

Architecture πŸ—οΈ

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client     β”‚     β”‚              MCP Attest CLI                   β”‚
β”‚  (MCP Host)  β”‚     β”‚                                              β”‚
β”‚              β”‚     β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚     β”‚  β”‚Identity β”‚  β”‚Integrity β”‚  β”‚Permissions  β”‚  β”‚
β”‚  β”‚  Your  β”‚  │────┼─▢│Verify   │──│Attest    │──│Audit        β”‚  β”‚
β”‚  β”‚  App   β”‚  β”‚     β”‚  β”‚(TLS/DID β”‚  β”‚(Manifest β”‚  β”‚(Least       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚     β”‚  β”‚ /Crypto)β”‚  β”‚ /Fp)     β”‚  β”‚ Privilege)  β”‚  β”‚
β”‚       β”‚      β”‚     β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚      β”‚     β”‚       β”‚            β”‚               β”‚         β”‚
β”‚       β–Ό      β”‚     β”‚       ▼────────────▼───────────────▼         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚     β”‚                   β”‚                         β”‚
β”‚  β”‚  MCP   β”‚  β”‚     β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚  β”‚ Server β”‚  β”‚     β”‚           β”‚ Trust Scorer  β”‚                 β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚     β”‚           β”‚ (0–100 score) β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
                     β”‚                   β”‚                         β”‚
                     β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”                 β”‚
                     β”‚           β”‚    Policy     β”‚                 β”‚
                     β”‚           β”‚   Generator   │──▢ MCPGuard     β”‚
                     β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start ⚑

# Install from PyPI
pip install mcp-attest

# Or from source
git clone https://github.com/Carlos-Projects/mcp-attest
cd mcp-attest
pip install -e ".[dev]"

# Verify a server's identity, integrity, and trust
mcp-attest verify --server https://mcp.example.com --manifest manifest.json

# Generate a capability fingerprint
mcp-attest fingerprint --server https://mcp.example.com

# Calculate trust score
mcp-attest trust --server https://mcp.example.com

# Generate MCPGuard access policy
mcp-attest policy --server https://mcp.example.com --min-score 75

Python API 🐍

from mcp_attest import Attester

attester = Attester()
report = await attester.full_attestation(
    server_url="https://mcp.example.com",
)

print(f"Trust score: {report.trust.score}/100")
print(f"Identity: {'βœ…' if report.identity.verified else '❌'}")
print(f"Integrity: {report.integrity.status.value}")

Comparison πŸ“Š

Capability MCP Attest Raw MCP Client mcp-scan
TLS identity verification βœ… Multi-method Basic ❌
Cryptographic signatures βœ… RSA-2048 SHA-256 ❌ ❌
DID verification βœ… did:web + did:key ❌ ❌
Capability fingerprinting βœ… SHA-256 manifest hash ❌ ❌
Trust scoring βœ… Weighted (4 dimensions) ❌ ❌
Permission auditing βœ… Least privilege scoring ❌ ❌
Revocation checking βœ… Configurable lists ❌ ❌
MCPGuard policy export βœ… Auto-generate YAML ❌ ❌
SARIF reporting βœ… ❌ βœ…

Ecosystem πŸ”—

Tool Integration
MCPGuard Runtime policy enforcement middleware
MCPscop Dashboard visualization of attestation reports
mcpwn Offensive security testing against attestation baseline
mcp-taxonomy Canonical classification taxonomy for MCP security

Development πŸ› οΈ

pip install -e ".[dev]"
ruff check .
mypy src/mcp_attest/
pytest

Academic References πŸ“š

Contributing 🀝

See CONTRIBUTING.md for development guidelines.

Security πŸ”’

Found a vulnerability? See SECURITY.md.

License πŸ“„

MIT β€” See LICENSE for details.

About

πŸ” Attested Tool-Server Admission for MCP β€” verify identity, integrity, and trust of MCP servers before connecting

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages