MOSS integration for Model Context Protocol (MCP) - Protocol-level governance for AI agent tools
Project description
moss-mcp
Protocol-level governance for Model Context Protocol (MCP) using ML-DSA-44 post-quantum cryptography.
Overview
MOSS MCP integration signs ALL MCP tool calls with NIST FIPS 204 post-quantum cryptography. By intercepting at the MCP transport layer, MOSS governs every tool invocation regardless of the agent framework.
| Approach | Coverage | Bypassable? |
|---|---|---|
| Framework SDKs | Per-framework | Yes |
| MCP Integration | All tools | No |
Installation
pip install moss-mcp
Quick Start
from mcp import Client
from moss_mcp import wrap_mcp_client
# Wrap MCP client - all tool calls are now signed
moss_client = wrap_mcp_client(client, agent_id="my-agent")
# Use normally - signing happens automatically
result = await moss_client.call_tool("send_email", {
"to": "user@example.com",
"body": "Hello"
})
Integration Options
Option 1: Client Wrapper
from moss_mcp import wrap_mcp_client
moss_client = wrap_mcp_client(client, agent_id="my-agent")
Option 2: MCP Server
from moss_mcp import MOSSMCPServer
server = MOSSMCPServer(agent_id="email-service")
@server.tool()
async def send_email(to: str, body: str) -> str:
return f"Sent to {to}"
Option 3: Middleware
from moss_mcp import MOSSMCPMiddleware
middleware = MOSSMCPMiddleware(
agent_id="my-service",
block_on_policy_violation=True,
)
Configuration
| Variable | Description | Default |
|---|---|---|
MOSS_API_KEY |
Enterprise API key | None (local mode) |
MOSS_API_URL |
API endpoint | https://api.mosscomputing.com |
Policy Enforcement
from moss_mcp.server import PolicyViolationError
try:
await moss_client.call_tool("execute_trade", {"amount": 1000000})
except PolicyViolationError as e:
print(f"Blocked: {e.reason}")
Causal Chaining
result1 = await sign_tool_request_async("analyze_data", {...}, agent_id="agent-1")
result2 = await sign_tool_request_async(
"make_decision",
{...},
agent_id="agent-2",
parent_sig=result1.signature_id
)
Links
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 moss_mcp-0.1.0.tar.gz.
File metadata
- Download URL: moss_mcp-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0143625c54048de881e1dae34d9614f0a881b2887c9889c34f8512f3e17132b
|
|
| MD5 |
0da533979ee76ca6cde879b50280e8ad
|
|
| BLAKE2b-256 |
4fc551a06388b44254c267ede42e19c3cc978baca452a7277a06f3661b03975c
|
File details
Details for the file moss_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moss_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f49dc992dc4ba3fe050f7c89eb95935a38bde3f38e0980c52c260153abc8f398
|
|
| MD5 |
34b0614f703264d73765c5e54c0384eb
|
|
| BLAKE2b-256 |
1b743b0c9a03b6a261223b6f4454fc2263e875315e2a754e02fa3e387da58785
|