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 mcps-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 mcps-secure 1.0.0
File Size Uploaded
mcps_secure-1.0.0.tar.gz 14.3 kB Details

Built distribution (wheel)

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

Total release size: 28.1 kB

Release files / mcps_secure-1.0.0.tar.gz

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

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

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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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