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
- Website: mcp-secure.dev
- npm: mcp-secure
- Spec: SPEC.md
License
MIT -- CyberSecAI Ltd
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcps_secure-1.0.0.tar.gz
(14.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcps_secure-1.0.0.tar.gz.
File metadata
- Download URL: mcps_secure-1.0.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aca0db027f2294c58f19cfb9f982649e629b1a1dc21964ab256dfd8f5ab538ff
|
|
| MD5 |
3578eedbf168e246a823577e82898d89
|
|
| BLAKE2b-256 |
ed5533cbb1ae4900e34b90ef5648462b6b03a8a5064925121ccaf0fa5f1916bc
|
File details
Details for the file mcps_secure-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mcps_secure-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f786f4d7883958528c07c4d47b61f9bbdb7796e9bbe7cc09fa912d9fae7b30
|
|
| MD5 |
1c691c55b0b33cbcef03023a9e918e2d
|
|
| BLAKE2b-256 |
135a1ffee53f96a48468ee8d65c0f7fdeb19943eacc42ae7c8753bb138a56cdb
|