Skip to main content

MCPS -- MCP Secure

Cryptographic identity, message signing, and trust verification for the Model Context Protocol.

The HTTPS of the agent era. MCP becomes MCPS.

Install

pip install mcp-secure

Quick Start

from mcp_secure import generate_key_pair, create_passport, sign_passport, verify_passport_signature
from mcp_secure import sign_message, verify_message, sign_tool, verify_tool

# Generate keys
keys = generate_key_pair()

# Create and sign a passport
passport = create_passport(
    name="my-agent",
    version="1.0.0",
    public_key=keys["public_key"],
    capabilities=["read", "write"],
)

# Trust Authority signs the passport
ta_keys = generate_key_pair()
signed = sign_passport(passport, ta_keys["private_key"])
assert verify_passport_signature(signed, ta_keys["public_key"])

# Sign MCP messages
envelope = sign_message(
    {"jsonrpc": "2.0", "method": "tools/list", "id": 1},
    signed["passport_id"],
    keys["private_key"],
)

# Verify
result = verify_message(envelope, keys["public_key"])
assert result["valid"]

# Tool integrity
tool = {"name": "read_file", "description": "Read a file", "inputSchema": {"type": "object"}}
sig = sign_tool(tool, keys["private_key"])
assert verify_tool(tool, sig, keys["public_key"])

What MCPS Adds to MCP

Feature Description
Agent Passports ECDSA P-256 signed identity credentials
Message Signing Every JSON-RPC message wrapped in signed envelope
Tool Integrity Signed tool definitions prevent poisoning
Replay Protection Nonce + 5-min timestamp window
Revocation Real-time passport revocation via Trust Authority
Trust Levels L0 (unsigned) to L4 (audited)

OWASP MCP Top 10

Mitigates 8/10 OWASP MCP vulnerabilities: tool poisoning, supply chain attacks, auth bypass, shadow servers, and more.

Links

License

MIT -- CyberSecAI Ltd

Metadata

Release files for mcp-secure 1.0.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 mcp-secure 1.0.0
File Size Uploaded Provenance Actions
mcp_secure-1.0.0.tar.gz 8.5 kB Without provenance Details for mcp_secure-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-secure 1.0.0
File Interpreter ABI Platform Actions
mcp_secure-1.0.0-py3-none-any.whl Python 3 none any Details for mcp_secure-1.0.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / mcp_secure-1.0.0.tar.gz

Download URL mcp_secure-1.0.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dbc2dce0e23d3ab90722e1de8f57f2021d3d243130311e9492626d1543f16a87
BLAKE2b-256 checksum
How to use checksums
bcb470b35b238594cc64b27f67a93c488d3b67b7869406a44f9051e74d7f2a82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / mcp_secure-1.0.0-py3-none-any.whl

Download URL mcp_secure-1.0.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba131c88e2a05e2b26ba215e52a8a1feefedde154f21ee8944190c1101bfee55
BLAKE2b-256 checksum
How to use checksums
10010b7cdcfa7dbcebb3990f9d1fe2f54ba5a77d0575957cadd675861d1953aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for mcp-secure 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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